Syntaxis for reboot via rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
BartSr
Normal user
Posts: 122
Joined: 27 Sep 2019, 17:45

Syntaxis for reboot via rules

#1 Post by BartSr » 28 Jul 2023, 19:11

Hi
An esp32 is used to monitor a ventilationsystem. It appears that the system crashes after about a month being online. Probably caused by memory problems. As it's hard to figure out how to overcome the grow of used memory I will go for the lazy way : regular reboot. Seems not to be difficult apart from the fact that I do'nt know the correct syntax forcing a reboot by rules. So anyone who can tell me or give a link to information ?
Thanks!

Bart

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Syntaxis for reboot via rules

#2 Post by Ath » 28 Jul 2023, 19:19

For executing a reboot, the aptly named "reboot" command can be used... :lol:

Edit: No direct link available, but it's on this documentation page
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Syntaxis for reboot via rules

#3 Post by Ath » 28 Jul 2023, 19:25

BartSr wrote: 28 Jul 2023, 19:11 An esp32 is used to monitor a ventilationsystem. It appears that the system crashes after about a month being online. Probably caused by memory problems. As it's hard to figure out how to overcome the grow of used memory
Of course we are interested in finding the actual cause of this issue, so a few questions:

- What plugins and Controllers are used in that monitoring setup?
- What release of ESPEasy is installed on the system? Have you tried updating to the latest already
- Do you have the Syslog feature active/in use?
/Ton (PayPal.me)

BartSr
Normal user
Posts: 122
Joined: 27 Sep 2019, 17:45

Re: Syntaxis for reboot via rules

#4 Post by BartSr » 28 Jul 2023, 21:36

Ath, just put in rules reboot? Without any sys or % or ...?

The code was custom made ( by other person) based upon 8266 but that gave way to high processor load. So switched to a 32. Lots of comm has been between TD-er and Johan (the programmer) times ago. It uses modbus from Duco vent system as input. Johan used the code, stripped out all not required for this configuration and compiled. It makes monitoring possible of CO2 values, %open of valves, temp, humidity% , % off vent speed.
Bart

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Syntaxis for reboot via rules

#5 Post by Ath » 28 Jul 2023, 22:06

The only requirement is that the reboot command is in an event handler (on <eventname> do / endon), that is triggered in some way, to be executed.

If you want that reboot to happen, say, every Sunday at 01:00, that could be an event handler like:

Code: Select all

on System#Clock=Sun,01:00 do
  reboot // Reboot every Sunday at 01:00 to help keep the system 'stable'
endon
This requires some time source, like NTP, GPS or a RTC clock configured.
/Ton (PayPal.me)

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

Re: Syntaxis for reboot via rules

#6 Post by TD-er » 28 Jul 2023, 23:01

Or you set a timer for let's say a week from boot.
86400 seconds a day :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 29 guests