Closed tnkaiser closed 6 years ago
HI @tnkaiser,
I think this wasn't reported before. Does this happen also when you set the brightness via web UI? Oder directly via REST call? Or only via MQTT call from homeassist?
Regards Tobias
AMQTT ---> reboot (via the popup slider when the light is turned on) Direct MQTT --->reboot (via third party MQTT client), but only sporadically (sometimes, when the JSON string is sent WITHOUT anything else... i.e. {"brightness":25} it works, other times it hangs WebUI --->works, no reboot websockets --->seems to work, no reboot.
OK, then this seems to be related to MQTT. Strange that it happens fot both MQTT and AMQTT. What kind of board do you use? And what is returned when you call http://YOUR_IP/esp_status
Regards Tobias
Hi all,
As you are waiting for an answer for about a month and I am having the same issue this is what I can provide for an analysis: {"HOSTNAME":"BadWaschtisch","version":"2.1.4","heap":23504,"sketch_size":449056,"free_sketch_space":2695168,"flash_chip_size":4194304,"flash_chip_real_size":4194304,"flash_chip_speed":40000000,"sdk_version":"2.2.1(cfd48f3)","core_version":"2_4_2","cpu_freq":80,"chip_id":1458208,"animation_lib":"WS2812FX","pin":4,"number_leds":100,"button_mode":"ON","amqtt":"ON","home_assistant":"ON","legacy_animations":"ON","esp8266_http_updateserver":"ON","arduino_ota":"ON","state_save":"SPIFFS"}
Maybe on thing more: If I set the brightness via "normal" MQTT Interface.
BadWaschtisch/in
%100
There is no reboot. It looks like it is always if you are using the Topics for "Home Assistant".
Best Michael
@MNatzke Thank you for your investigations.
@debsahu I couldn't reproduce this. Do you have an idea why this seems to only happen with the homeassistant topics?
Hi Tobias,
feel free to contact me if you need further investigations/tests with my system.
Without a deeper look into the source code I can identify some differences between MQTT for Home Assistant and the "normal" MQTT. The payload of the homeassistant topic has a different format as the payload for the MQTT API (which is the format of the Websocket API). There might be an issue with the parser of the homeassistant payload. And the content of the payload is different. Setting the brightness via MQTT API does send the value for the brightness only but via the homeassistant topic there will be sent an "ON" Statement as well.
What else can i provide.. I was experimenting with the RGBW Version of McLightning on the same NodeMCU. Maybe there are some "leftovers" of that in the EEPROM? I can offer to use a brand new NodeMCU with the latest McLightning version (none RGBW) and/or changing the PIN for the LED/Button (hope that's not the issue because I just ordered new PCBs for my installations ;-) )
Regards Michael
I'll add that I just installed this on a D1 Mini and I'm having the same issue with the AMQTT library. Even sending a message with only the brightness causes core dump.
{ "brightness":25 }
Below is my esp_status if it's useful.
{"HOSTNAME":"McLighting01","version":"2.1.4","heap":26224,"sketch_size":444400,"free_sketch_space":2699264,"flash_chip_size":4194304,"flash_chip_real_size":4194304,"flash_chip_speed":40000000,"sdk_version":"2.2.1(cfd48f3)","core_version":"2_4_2","cpu_freq":80,"chip_id":1458415,"animation_lib":"WS2812FX","pin":2,"number_leds":50,"button_mode":"ON","amqtt":"ON","home_assistant":"ON","legacy_animations":"ON","esp8266_http_updateserver":"ON","arduino_ota":"ON","state_save":"SPIFFS"}
Don't have any idea why there is a issue with JSON parsing. I'll investigate!
Shame issue with AMQTT and HA
{"HOSTNAME":"McLighting01","version":"2.1.4","heap":26432,"sketch_size":438064,"free_sketch_space":2707456,"flash_chip_size":4194304,"flash_chip_real_size":4194304,"flash_chip_speed":40000000,"sdk_version":"2.2.1(cfd48f3)","core_version":"2_4_2","cpu_freq":80,"chip_id":1458376,"animation_lib":"WS2812FX","pin":14,"number_leds":136,"button_mode":"ON","amqtt":"ON","home_assistant":"ON","legacy_animations":"ON","esp8266_http_updateserver":"ON","state_save":"SPIFFS"}
@MNatzke @MrPaulAR @mkova186 could you anyone try the develop version and update arduinojson to latest(6.4.0-beta) as well?
I am on a trip with my family starting tomorrow. If I could not manage to test it tonight i'll test it in a week. Will give you a feedback asap.
btw.: I already had Arduinojson installed in 6.4.0-beta
same here, already had Arduinojson installed in 6.4.0-beta
just downgrade the Arduinojson to 6.1.0-beta and no issue, all working as it should. Tnx
Same here, downgraded to 6.1.0-beta and it's all working fine. Thanks for figuring out
Just tested the development version with 6.4.0-beta and YES everything is working very well. arduionojson 6.4.0-beta wit the master branch causes a crash once i try to change the brightness.
Thank you!
If this has been discussed previously, please point me in the direction.
//#define USE_NEOANIMATIONFX // Uses NeoAnimationFX, PIN is ignored & set to RX/GPIO3 or UART method: D4/GPIO2, see: https://github.com/debsahu/NeoAnimationFX
define USE_WS2812FX // Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
// Neopixel
define PIN D1 // PIN (14 / D5) where neopixel / WS2811 strip is attached
define NUMLEDS 300 // Number of leds in the strip
define BUILTIN_LED 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
define BUTTON 4 // Input pin (4 / D2) for switching the LED strip on / off, connect this PIN to ground to trigger button.
const char HOSTNAME[] = "McLighting01"; // Friedly hostname
define HTTP_OTA // If defined, enable ESP8266HTTPUpdateServer OTA code.
//#define ENABLE_OTA // If defined, enable Arduino OTA code.
define ENABLE_AMQTT // If defined, enable Async MQTT code, see: https://github.com/marvinroger/async-mqtt-client
//#define ENABLE_MQTT // If defined, enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API
define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active
define ENABLE_BUTTON // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control
define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
//#define ENABLE_LEGACY_ANIMATIONS
MQTT: Recieved [home/McLighting01_ha/state/in]: {"state": "ON", "brightness": 132}
Exception (28): epc1=0x40227e7e epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: sys sp: 3fffea70 end: 3fffffb0 offset: 01a0
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset