Closed mycroes closed 5 years ago
Nice problem. Will investigate tomorrow. I probably have to do better message analyzing.
@arendst Is that by any chance something I could fix as newbie to ESP8266? I'm a C# developer (professionally) but I have a fondness for programming in general (and have done more than just C# in the past as well). I must admit though that I haven't even installed PlatformIO, never programmed my Arduino Uno, but this doesn't sound like a hard issue to handle...
@arendst I'm guessing the problem arises from xdrv_07_domoticz.ino:177: nvalue = domoticz["nvalue"];
, which is definitely not there in the JSON. (Yes, installed PlatformIO now :smile:)
Me too. Didn't find the time yet.
Please correct me if I'm wrong, but I think the following could fix it: Line 182 original:
if ((idx > 0) && (nvalue >= 0) && (nvalue <= 15)) {
proposed:
if ((idx > 0) && nvalue.success() && (nvalue >= 0) && (nvalue <= 15)) {
I have no clue how to build or anything, but this seems to make sense after checking the ArduinoJson source.
Err that won't work, nvalue
is int16_t
. However JsonObject[<string>]
should return a JsonObjectSubscript
which has .success()
and templated conversion (is that what it's called in C++?).
Thx for your suggestions.
Just released the fix. Pls test and if OK just close this issue.
@mycroes
Hi
Have you managed to test it?
No sorry, didn't get to it yesterday... I'll test it soon and I'll close the issue then (from the code change it seems fixed).
Can't confirm it works yet. Downloaded sonoff.bin from 4208bad from thehackbox.org/tasmota/, but now the sonoff is unreachable over network most of the time. Sometimes the web UI works for something like half a minute, but it's kinda unusable now.
I guess I have to solder header pins to update it using esptool, it didn't work the previous time when I attempted to wire it up using a breadboard and loose connections.
So I soldered the header, flashed 6.2.1 back in, everything seemed to be fine (didn't test extensively, but web interface was working). Then flashed the above mentioned sonoff.bin, same issue. Web interface works sometimes, but most of the times a single request is all it'll handle. Went back to 6.2.1 again, everything fine so far.
It's a Sonoff Basic, I'm not sure if it ought to be able to just use the sonoff.bin or if that could be too much for it's limited resources already, but for now that's all I could try. I can try to do a custom build with some features disabled, but honestly I would be kinda disappointed if that's what it takes to run newer Tasmota versions on my Sonoffs.
status 0
:Output after crash:
I'm using sonoff.bin version 6.2.1 (manual download from releases page). I have 3 devices that are working fine individually, but since I created a screne (type group) to group them in Domoticz one of the devices seems to have issues. I subscribed to
domoticz/out
with MQTT.fx to see what messages are being send and noticed Domoticz also sends a message for the scene/group itself. The body of the message is as follows:Sending this message manually (using MQTT.fx) causes an identical restart of the Sonoff.
I'm not sure if it's normal (this is my first Domoticz install, I'm running a Docker container and had no issues at all setting it up), but idx 2 is used both by the scene/group and the Sonoff. I added my Sonoffs first, so they have idx 1, 2, 3 and 4 (of which one is having issues since I started using it, but that's out of the scope of this issue). I added a scene first and then the group, so probably the scene had idx 1 before I deleted it, and the group has idx 2.
Is it absolutely wrong that the scene/group has the same idx as the Sonoff (and do you perhaps have any clue how that could have happened), or is there something more I should have configured to prevent the exception?