I'm having a strange problem: with R108 all seems to work fine.
I'm using a H108 5 channel dimmer with ESPEasy R108, which receives MQTT messages (from pimatic) like this one : "/h801_kitchen/pwm/15" with a value between 0-1024. Hardly ever needs a reboot.
I just tried updating it via the webinterface to R120, this works well, the ESP reboots and is responsive from a browser (pwm, fade all works great). Though when I send an MQTT message as stated above (exactly the same, nothing changed in my pimatic config, also happens when using a manual MQTT tool) the ESP seems to crash. I need to powercycle it before it gets responsive again.
The log shows no strange messages, just the normal boot sequence and that it is connected to the MQTT broker.
Reprogramming the firmware to R108 makes it all work again (all done via web interface).
I tried building R120 myself, the problem still applies (R120 builds fine, no problems).
ESP R120 crashes upon receiving MQTT message
Moderators: grovkillen, Stuntteam, TD-er
Re: ESP R120 crashes upon receiving MQTT message
most problems with crashed here in the forum had to to with power-issues.
may you check this?
http://www.esp8266.nu/index.php/Power
may you check this?
http://www.esp8266.nu/index.php/Power
Re: ESP R120 crashes upon receiving MQTT message
Power should be fine as it is an LED controller with a beefy supply. Also with R108 all works fine, via wifi everything works fine as well. This really seems to be MQTT related if you're asking me 

Re: ESP R120 crashes upon receiving MQTT message
Bug confirmed. It was introduced with the 'fade' option for pwm.
It will be fixed in R127, but in the mean time, you could use the newer command method to set pwm, using the 'cmd' topic:
So in your case this would be like this:
Or wait for the next release...
Technical background on this bug:
When using the old <template>/pwm/<pin> command, TempEvent->Par3 is left uninitialized, because at that time, only two parameters where used and you can only provide two parameters using this method.
In R108 this uninitialized int seems to result in a zero value. Causing no issue.
In R120 this results in a huge value (>1 billion msec), causing the system to delay for a very long time, effectively 'hanging'.
It shows that uninitialized values can have different and unexpected behaviour accross different builds.
It will be fixed in R127, but in the mean time, you could use the newer command method to set pwm, using the 'cmd' topic:
Code: Select all
<template>/cmd
pwm,<pin>,<value>,[<fade>]
Code: Select all
/h801_kitchen/cmd
pwm,15,<value>
Or wait for the next release...
Technical background on this bug:
When using the old <template>/pwm/<pin> command, TempEvent->Par3 is left uninitialized, because at that time, only two parameters where used and you can only provide two parameters using this method.
In R108 this uninitialized int seems to result in a zero value. Causing no issue.
In R120 this results in a huge value (>1 billion msec), causing the system to delay for a very long time, effectively 'hanging'.
It shows that uninitialized values can have different and unexpected behaviour accross different builds.
Re: ESP R120 crashes upon receiving MQTT message
Ah thanks a lot! This indeed solves my problem.
As I was updating to R120 with the intention to be able to use the fade option, I am now using a quick workaround while waiting on R127.
Pimatic currently does not support adding a value for the fade time AFAIK, so I am now just using the newer command format and hardcoded a fade time of 1024 in the firmware. Works great for now
Thanks again for your assistance!
As I was updating to R120 with the intention to be able to use the fade option, I am now using a quick workaround while waiting on R127.
Pimatic currently does not support adding a value for the fade time AFAIK, so I am now just using the newer command format and hardcoded a fade time of 1024 in the firmware. Works great for now

Thanks again for your assistance!
Who is online
Users browsing this forum: No registered users and 13 guests