Hardware Watchdog Reboots and send data to LCD from a json

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Hardware Watchdog Reboots and send data to LCD from a json

#1 Post by megamarco83 » 27 Aug 2020, 10:05

hi, i have two kind of issue:

1) i'm on espeasy
bin = ESP_Easy_mega-20190903_normal_core_241_ESP8266_4M1M.bin
System Libraries = ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support

i receive very frequently randomly reboot, and the reason is:
Reset Reason: Hardware Watchdog

i never change the release because of reason 2) of the topic:

2) connected to this esp (nodemcu) i have two devices: 1 DHT22 to monitor the temperature/humidity and 1 Display - LCD2004 to show the temperature and some datas that i take from a bash script that send to LCD the data to show.

here the script:

Code: Select all

#!/bin/sh
### lcd

curl -s http://192.168.0.198/control?cmd=lcdcmd,clear

# import live consumi 
    #from  JSON
x2=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Consumi1'])"`
curl -s "http://192.168.0.198/control?cmd=lcd,2,1,Consumi+$x2+W"


# import live produzione
      # con JSON
x1=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Produzione2'])"`
x4=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Immissioni4'])"`
curl -s "http://192.168.0.198/control?cmd=lcd,3,1,Prod+$x1+W%20Im+$x4+W"


# import live prelievi
      # con JSON
x3=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Prelievi3'])"`
AC=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Temperatura Boiler11'])"`
curl -s "http://192.168.0.198/control?cmd=lcd,4,1,Prel+$x3+W%20Boil$AC+C"


# import live immissioni
		# con JSON
x4=`cat /dev/shm/mN_LIVEMEMORY.json | python -c "import sys, json; print(json.load(sys.stdin)['Immissioni4'])"`
curl -s "http://192.168.0.195/control?cmd=oled,5,2,Immisio+$x4+W"
this is the Json where i take data:

Code: Select all

{"UTC":1598515314,"Consumi1":"2387.5","Produzione2":"2498.5","Prelievi3":"0","Immissioni4":"111","Autoconsumo5":"2388","temperatura6":"25.1","Umidit\u00e07":"97.0","PrelieviF18":"0","PrelieviF239":"0","New 1010":"0","Temperatura Boiler11":"49.25","Boiler12":"1230"}
i create a service with timer on raspberry that start and loop the bash script every 15seconds, so i have the LCD that report every 15seconds frash data.

if i update to the latest version of ESP i find issue on reporting data, i'm able the see the letters, but not the numeric part taken from the Json.
i see that it happened on the espeasy firmware after 2019

if i would like to change the way of reporting the data to lcd, may i use mqtt?
it will be better? in what way i can extract the data that i need from the json and report to lcd connected to espeasy?
thanks

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hardware Watchdog Reboots and send data to LCD from a json

#2 Post by TD-er » 27 Aug 2020, 11:10

I guess start of September last year was just a few weeks before the issues with WiFi reconnects were (finally) fixed.
So for the WDT reboots, I would suggest to use a later build, at least some build of late September, begin of October 2019.

About the missing updates. Can you check the "Tolerant last parameter" in Tools->Advanced? (later builds)
I guess the 2nd issue may be related to the more strict command parameter parsing introduced somewhere around November.

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: Hardware Watchdog Reboots and send data to LCD from a json

#3 Post by megamarco83 » 27 Aug 2020, 11:58

TD-er wrote: 27 Aug 2020, 11:10 I guess start of September last year was just a few weeks before the issues with WiFi reconnects were (finally) fixed.
So for the WDT reboots, I would suggest to use a later build, at least some build of late September, begin of October 2019.
hi TD-er, related to suggestion of using some build of late September, begin of October 2019 i think that it's already that one, now i'm on:
ESP_Easy_mega-20190903_normal_core_241_ESP8266_4M1M.bin
so begin of October 2019...
TD-er wrote: 27 Aug 2020, 11:10 About the missing updates. Can you check the "Tolerant last parameter" in Tools->Advanced? (later builds)
Screenshot_2020-08-27 ESP12_198.png
Screenshot_2020-08-27 ESP12_198.png (20.91 KiB) Viewed 5614 times
where is it Tolerant last parameter" ?
that's the end of the meny: Tools->Advanced?
TD-er wrote: 27 Aug 2020, 11:10 I guess the 2nd issue may be related to the more strict command parameter parsing introduced somewhere around November.
how shoule be parsed in the latest build the command?
thanks

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hardware Watchdog Reboots and send data to LCD from a json

#4 Post by TD-er » 27 Aug 2020, 12:31

The tolerant parsing parameter is only present in builds of the last few months, so you will not find it in 2019 builds.

If you have it present, it will be one of the first check boxes on the Tools => Advanced page.

The reason I'm asking to check it, is because it seems like you have a space or comma in the last parameter of the LCD command.
And it may be hard to encode those in the http url, so by relaxing the strict parameter parsing it may be working again in the latest builds (the ones after somewhere November 2019)

Post Reply

Who is online

Users browsing this forum: No registered users and 138 guests