Watchdog in ESP8266 / Tasmota?

802 views
Skip to first unread message

Laurentp

unread,
May 12, 2020, 12:05:25 PM5/12/20
to TasmotaUsers
Hi  there,
as I experienced a hangup in Sonoff Basic R2 today (no MQTT, no WWW, not even PING), which I plan to use as solar thermostate, I have a question,
- is there some HARDWARE watchdog on ESP (implemented in Tasmota)? To reset ESP in such case.

Another question (maybe someone already knows), is if it is possible to "dim" readings from Tasmota (MQTT) in OpenHAB2, in case Tasmota stops transmitting data? As for now (6.6.0) if ESP stops transmitting OH2 shows last reading with no info about failure.

Philip Knowles

unread,
May 12, 2020, 1:30:55 PM5/12/20
to Laurentp, TasmotaUsers

I don’t think that Tasmota has such a facility. Normally if a device goes AWOL it goes into AP mode and I’m not sure you can guarantee that you will keep the configuration.

In terms of openHAB, every tele-period the time/date is sent as part of the message. At its simplest you can display the last update time next to the value in your sitemap. You could also run a cron rule at the same timing as the teleperiod which gets reset by the arrival of the teleperiod message, Other alternatives are to use the Network binding to ping from a cron rule or set a rule in the Sonoff which turns off a dummy output which a cron rule turns on (if the output stays on you know the Sonoff has failed).

Regards

 

Phil K

 

Sent from Mail for Windows 10

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/a4559c54-edda-4a58-83d2-5b2c970bbc0f%40googlegroups.com.

 

Michael Ingraham

unread,
May 12, 2020, 1:45:13 PM5/12/20
to TasmotaUsers
I have a device that I use as an appliance notification device (when the clothes dryer is done). I know I have a fault with this device (probably insufficient power). When the appliance is consuming power, the PZEM transmits the data to the ESP8266 (running Tasmota). I find that when the device is "active", it hangs. It'll run for days when we don;t use the dryer. In any case, the fault Tasmota reports after it reboots is "WDT fault" - i.e., watchdog timer. I don't know if this is programmed into Tasmota or if this comes from the Arduino Core. Nevertheless, there is some sort of watchdog capability. I just don't know what triggers it. To my knowledge there is no configuration either. All of the watchdog detection is "internal" to the code.

Laurentp

unread,
May 12, 2020, 3:23:10 PM5/12/20
to TasmotaUsers
Device simply hung up. Like it does not exist. No ping, no AP mode. Just frozen.
Disconnect from mains for few seconds did not help. Disconnect for 2-3 min did.

I am looking for some solution in OH2 too (second question). But using watchdog on ESP is essential.
Does ESP implement this in hardware at least (long time I have read datasheet), if it does, maybe there is a way to implement it in Tasmota ? (Tasmota is based on "bare" Espressif SDK or on top of something other?).

W.P.


W dniu wtorek, 12 maja 2020 19:30:55 UTC+2 użytkownik Philip Knowles napisał:

I don’t think that Tasmota has such a facility. Normally if a device goes AWOL it goes into AP mode and I’m not sure you can guarantee that you will keep the configuration.

In terms of openHAB, every tele-period the time/date is sent as part of the message. At its simplest you can display the last update time next to the value in your sitemap. You could also run a cron rule at the same timing as the teleperiod which gets reset by the arrival of the teleperiod message, Other alternatives are to use the Network binding to ping from a cron rule or set a rule in the Sonoff which turns off a dummy output which a cron rule turns on (if the output stays on you know the Sonoff has failed).

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: Laurentp
Sent: 12 May 2020 17:05
To: TasmotaUsers
Subject: Watchdog in ESP8266 / Tasmota?

 

Hi  there,
as I experienced a hangup in Sonoff Basic R2 today (no MQTT, no WWW, not even PING), which I plan to use as solar thermostate, I have a question,
- is there some HARDWARE watchdog on ESP (implemented in Tasmota)? To reset ESP in such case.

Another question (maybe someone already knows), is if it is possible to "dim" readings from Tasmota (MQTT) in OpenHAB2, in case Tasmota stops transmitting data? As for now (6.6.0) if ESP stops transmitting OH2 shows last reading with no info about failure.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.

Laurentp

unread,
May 12, 2020, 3:25:04 PM5/12/20
to TasmotaUsers

Philip Knowles

unread,
May 12, 2020, 3:42:30 PM5/12/20
to Laurentp, TasmotaUsers

The Watchdog timer is to reboot if the main programme hangs. There’s a hardware and software watchdog but it’s at OS level. If the programme (Tasmota) hangs the watchdog isn’t reset and the ESP8266 will restart. There’s information on the Espressif website. It should come up ‘gracefully’ but if there’s a repeated series of faults in a short space of time Tasmota will eventually reset to defaults.

 

Mike, I wonder if your problem is a voltage ‘spike’ or a brown out. My device has been running on my main incomer without any errors but, of course, it is not near any devices producing EMPs etc.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: Laurentp
Sent: 12 May 2020 20:23
To: TasmotaUsers
Subject: Re: Watchdog in ESP8266 / Tasmota?

 

Device simply hung up. Like it does not exist. No ping, no AP mode. Just frozen.
Disconnect from mains for few seconds did not help. Disconnect for 2-3 min did.

I am looking for some solution in OH2 too (second question). But using watchdog on ESP is essential.
Does ESP implement this in hardware at least (long time I have read datasheet), if it does, maybe there is a way to implement it in Tasmota ? (Tasmota is based on "bare" Espressif SDK or on top of something other?).

W.P.

W dniu wtorek, 12 maja 2020 19:30:55 UTC+2 użytkownik Philip Knowles napisał:

I don’t think that Tasmota has such a facility. Normally if a device goes AWOL it goes into AP mode and I’m not sure you can guarantee that you will keep the configuration.

In terms of openHAB, every tele-period the time/date is sent as part of the message. At its simplest you can display the last update time next to the value in your sitemap. You could also run a cron rule at the same timing as the teleperiod which gets reset by the arrival of the teleperiod message, Other alternatives are to use the Network binding to ping from a cron rule or set a rule in the Sonoff which turns off a dummy output which a cron rule turns on (if the output stays on you know the Sonoff has failed).

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: Laurentp
Sent: 12 May 2020 17:05
To: TasmotaUsers
Subject: Watchdog in ESP8266 / Tasmota?

 

Hi  there,

as I experienced a hangup in Sonoff Basic R2 today (no MQTT, no WWW, not even PING), which I plan to use as solar thermostate, I have a question,
- is there some HARDWARE watchdog on ESP (implemented in Tasmota)? To reset ESP in such case.

Another question (maybe someone already knows), is if it is possible to "dim" readings from Tasmota (MQTT) in OpenHAB2, in case Tasmota stops transmitting data? As for now (6.6.0) if ESP stops transmitting OH2 shows last reading with no info about failure.

--

You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/a4559c54-edda-4a58-83d2-5b2c970bbc0f%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/5ad17962-d881-47e1-8904-1b7e0ea2d1be%40googlegroups.com.

 

Michael Ingraham

unread,
May 12, 2020, 4:09:01 PM5/12/20
to TasmotaUsers
Phil - I just live with my one WDT device that has this issue because I'm just using it for Dryer done notifications (not total power measurement)... and timing is not critical (if we get notified within one minute or three that the dryer is done, the world won't stop spinning :wink:). But, yes, it could have something to do with where the device is located and the proximity to the heating coil and other interference from the dryer.

W.P. - If the device hangs and indeed reboots with a WDT fault, you will be able to trap that in OH2. At boot, Tasmota reports several boot messages (INFO1-INFO3) and one of these contains the restart reason. Also `Status 1` will report `"RestartReason":"Hardware Watchdog"`.

hasen naeem

unread,
May 12, 2020, 5:47:12 PM5/12/20
to TasmotaUsers
Hi, 

Will it be possible to enable scheduled restart, maybe for every 24 hours or in a week, i have seen some devices this was enabled. 

Thanks
Hasen. 

Michael Ingraham

unread,
May 12, 2020, 6:06:45 PM5/12/20
to TasmotaUsers
You can set up a `Time#Minute=nnn` where `nnn` is the number of seconds after midnight to trigger the rule which invokes `Restart 1`. You can configure a timer that triggers on a certain day of the week at a certain time... and when the timer triggers the rule sends the restart. Otherwise, you can send the command from OH on whatever schedule you want.
Reply all
Reply to author
Forward
0 new messages