Closed itProfi closed 4 years ago
Can you please provide the JSON string from sonoff?
This one with tele/AC1/STATE={"Time": ,...
Are you sure, that your ALL clients have all different names (clientIds)
22:52:31 MQT: tele/pump/SENSOR = {"Time":"2019-10-21T22:52:31","ENERGY":{"TotalStartTime":"2019-09-29T21:07:46","Total":[36.130,3.869,27.505],"Yesterday":1.643,"Today":2.468,"Period":0,"Power":3,"ApparentPower":12,"ReactivePower":11,"Factor":0.26,"Voltage":222,"Current":0.05}} Yes, of course all different names -
I install lastest JS-controller, sonoff 2.2.3- the same things
I see, that sonoff driver maybe skips each second? teleperiod (in picture teleperiod=5)
Yes, driver not parse any teleperiod..just randomise..maybe mqtt part guilty?
After update to version 2.3.0 (lastest, bump) -time - same errors: And new erros:
sonoff.0 | 2019-10-22 19:50:01.810 | error | (17548) After: {"Time":"2019-10-22T19:50:01","DS18B20":{"Temperature":24.4},"BME280":{"Temperature":24.3,"Humidity":55.7,"Pressure":766},"BH1750":{"Illuminance":0},"PressureUnit":"mmHg","TempUnit":"C
-- | -- | -- | --
sonoff.0 | 2019-10-22 19:50:01.810 | error | (17548) Before: {"Time":"2019-10-22T19:50:01","DS18B20":{"Temperature":24.4},"BME280":{"Temperature":24.3,"Humidity":55.7,"Pressure":766},"BH1750":{"Illuminance":0},"PressureUnit":"mmHg","TempUnit":"
This code work:)
Any chances?
Any chances?
So in fact the device is generating an invalid JSON by using "NaN" as a value or how I should understand the topic now ... with your code fix ... The official fix would be to have the device send valid JSON ;-) Yes we could check the incoming text to hopefully detect a NaN value (and hope that it not part of any string which would lead to a wrong replace) ...
Look here - https://github.com/arendst/Tasmota/issues/4147 It seems that it was updated to have correct JSON already a year ago... Or I'm wrong?
Sorry but this is not helpful. If there are problems with js-controller 2.0 please provide more details in an own issue or forum.
Controller 2 is the Future base and so the adapter or controller needs to be fixed!
Thanks for all! I upgrade js-controller-2.21 and redis databse and all fine!
Hello, friends! When i send JSON from 15 esp8266 with lastest Tasmota, JSON, which send on sonoff is well..But when it's pasing, the time, for example is not correct.. JS-controller is 2.0.34..
Maybe in my case with thins thing: "npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3" ??