{"action":"closed","issue":{"url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/538","repository_url":"https://api.github.com/repos/marvinroger/homie-esp8266","labels_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/538/comments","events_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/538/events","html_url":"https://github.com/marvinroger/homie-esp8266/issues/538","id":362375500,"node_id":"MDU6SXNzdWUzNjIzNzU1MDA=","number":538,"title":"Crash when going into deep sleep with NodeMCU","user":{"login":"Zero545","id":30326074,"node_id":"MDQ6VXNlcjMwMzI2MDc0","avatar_url":"https://avatars2.githubusercontent.com/u/30326074?v=4","gravatar_id":"","url":"https://api.github.com/users/Zero545","html_url":"https://github.com/Zero545","followers_url":"https://api.github.com/users/Zero545/followers","following_url":"https://api.github.com/users/Zero545/following{/other_user}","gists_url":"https://api.github.com/users/Zero545/gists{/gist_id}","starred_url":"https://api.github.com/users/Zero545/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zero545/subscriptions","organizations_url":"https://api.github.com/users/Zero545/orgs","repos_url":"https://api.github.com/users/Zero545/repos","events_url":"https://api.github.com/users/Zero545/events{/privacy}","received_events_url":"https://api.github.com/users/Zero545/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-20T21:30:55Z","updated_at":"2018-10-06T20:02:51Z","closed_at":"2018-10-06T20:02:51Z","author_association":"NONE","body":"Hello,\r\n\r\nI am using homie-esp8266 release 2.0.0. I just tried to use deepsleep on a NodeMCU I just got. Unfortunatly I am not able to get it working together with Homie. Without Homie deepsleep is working.\r\n\r\nThis is the code I used:\r\n\r\n```\r\n#include <Homie.h>\r\n\r\nvoid onHomieEvent(const HomieEvent& event) {\r\n  switch(event.type) {\r\n    case HomieEventType::MQTT_READY:\r\n      Homie.getLogger() << \"MQTT connected, preparing for deep sleep...\" << endl;\r\n      Homie.prepareToSleep();\r\n      break;\r\n    case HomieEventType::READY_TO_SLEEP:\r\n      Homie.getLogger() << \"Ready to sleep\" << endl;\r\n      Homie.doDeepSleep();\r\n      break;\r\n  }\r\n}\r\n\r\nvoid setup() {\r\n  pinMode(D4, OUTPUT); // Port aus Ausgang schalten\r\n  Homie.setLedPin(D4, LOW);\r\n  Serial.begin(115200);\r\n  Serial << endl << endl;\r\n  Homie.onEvent(onHomieEvent);\r\n  Homie_setFirmware(\"nodemcu-sound-sensor\", \"1.0.0\");\r\n  Homie.setup();\r\n}\r\n\r\nvoid loop() {\r\n  Homie.loop();\r\n}\r\n\r\n```\r\nAnd these are the outputs I get:\r\n\r\n```\r\n💡 Firmware nodemcu-sound-sensor (1.0.0)\r\n🔌 Booting into normal mode 🔌\r\n{} Stored configuration\r\n  • Hardware device ID: bcddc2147dd4\r\n  • Device ID: nodemcu-sound-sensor\r\n  • Name: NodeMCU Sound Sensor\r\n  • Device Stats Interval: 60 sec\r\n  • Wi-Fi: \r\n    ◦ SSID: edesteil\r\n    ◦ Password not shown\r\n  • MQTT: \r\n    ◦ Host: 192.168.0.39\r\n    ◦ Port: 1883\r\n    ◦ Base topic: homie/\r\n    ◦ Auth? yes\r\n    ◦ Username: eweis\r\n    ◦ Password not shown\r\n  • OTA: \r\n    ◦ Enabled? yes\r\n↕ Attempting to connect to Wi-Fi...\r\n✔ Wi-Fi connected, IP: 192.168.0.45\r\nTriggering WIFI_CONNECTED event...\r\n↕ Attempting to connect to MQTT...\r\nSending initial information...\r\n✔ MQTT ready\r\nTriggering MQTT_READY event...\r\nMQTT connected, preparing for deep sleep...\r\nFlagged for sleep by sketch\r\nCalling setup function...\r\nDevice in preparation to sleep...\r\n〽 Sending statistics...\r\n  • Wi-Fi signal quality: 100%\r\n  • Uptime: 0s\r\nNode sound not registered\r\nOffline message acknowledged. Disconnecting MQTT...\r\n✖ MQTT disconnected\r\nTriggering MQTT_DISCONNECTED event...\r\nTriggering READY_TO_SLEEP event...\r\nReady to sleep\r\n💤 Device is deep sleeping...\r\n\r\nException (28):\r\nepc1=0x4022d2d6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000004c depc=0x00000000\r\n\r\nctx: sys \r\nsp: 3fffeb40 end: 3fffffb0 offset: 01a0\r\n```\r\n\r\n\r\nDoes anyone know what could be going wrong in this easy example?\r\n"}}
{"actor":{"display_login":"Zero545"}}