No Rules without wifi?
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
No Rules without wifi?
Hi all,
I control my chicken door with espeasy and some rules.
I was always under the assumption that wifi is only needed after boot in oder to get NTP time and for the normal operations espeasy is working autonomously.
But it happened in the last weeks twice that after repeater was disconneted rules were not working and doors did not open.
So I was wondering why rules are not working, while NTP should have been available before and correct time was set.
Any ideas?
thx
I control my chicken door with espeasy and some rules.
I was always under the assumption that wifi is only needed after boot in oder to get NTP time and for the normal operations espeasy is working autonomously.
But it happened in the last weeks twice that after repeater was disconneted rules were not working and doors did not open.
So I was wondering why rules are not working, while NTP should have been available before and correct time was set.
Any ideas?
thx
Re: No Rules without wifi?
Only recent builds have a new feature to store the time in RTC.
So at a warm boot, the unit will then restore the last known time from RTC.
Older builds don't have any clue of the time after a reboot, if there is no NTP available.
This was added in this commit: https://github.com/letscontrolit/ESPEas ... 60da90fd1f
So if your build was from before mega-20200228 it will not have this feature.
Still after a cold boot (power cycle), the unit will have lost the last known time.
So at a warm boot, the unit will then restore the last known time from RTC.
Older builds don't have any clue of the time after a reboot, if there is no NTP available.
This was added in this commit: https://github.com/letscontrolit/ESPEas ... 60da90fd1f
So if your build was from before mega-20200228 it will not have this feature.
Still after a cold boot (power cycle), the unit will have lost the last known time.
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
Hi, I am not talking about a reboot of the D1 mini, but just loosing wifi signal.
So my assumption is, that espeasy should work fully (incl rules) once wifi is lost and NTP time was successfull set while wifi was available.
But I just see that the uptime is 13hrs, so it must have rebooted last night. Question is why it rebooted, as it was not me rebooting it.
So my assumption is, that espeasy should work fully (incl rules) once wifi is lost and NTP time was successfull set while wifi was available.
But I just see that the uptime is 13hrs, so it must have rebooted last night. Question is why it rebooted, as it was not me rebooting it.
Re: No Rules without wifi?
Well it can reboot for lots and lots of reasons.
For one, please check the value set for Connection Failure Threshold: (Tools -> Advanced at the end of the page)
If that's set to something other than 0, it will reboot after set connection attempts.
Also try a more recent build, like 20200426 (not the latest if you're having a flash chip with vendor ID 0x20)
This will at least let you keep the time in RTC at reboot.
For one, please check the value set for Connection Failure Threshold: (Tools -> Advanced at the end of the page)
If that's set to something other than 0, it will reboot after set connection attempts.
Also try a more recent build, like 20200426 (not the latest if you're having a flash chip with vendor ID 0x20)
This will at least let you keep the time in RTC at reboot.
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
Connection Failure Threshold: 0 and I am already on mega-20200426
Vendor: 0xC2
Any other ideas?
Vendor: 0xC2
Any other ideas?
Re: No Rules without wifi?
Probably it has experienced a power-loss then.TungstenE2 wrote: ↑19 May 2020, 13:09 Connection Failure Threshold: 0 and I am already on mega-20200426
Vendor: 0xC2
Any other ideas?
Or for some reason, the checksum in the RTC was not correct.
If the checksum is not correct at boot, the RTC will be cleared and thus you will loose any stored time information.
RTC checksum can be corrupted if it reboots while updating the information in RTC.
For such a setup, I guess the only proper way is to use an external clock.
The existing I2C clock chips out there are not yet turned into a plugin by me.
Another option can be to use a GPS module. Maybe a bit overkill and also not a good solution when running on batteries, but I guess that's not the case in your setup.
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
I do not believe in power-loss as powered by AC adapter.
Need to keep an eye on it.
The wifi was disconnected about 24hrs ago, but reboot about 17hrs ago, so in the middle of the night.
Wifi reconnected about 5hrs ago.
Need to keep an eye on it.
The wifi was disconnected about 24hrs ago, but reboot about 17hrs ago, so in the middle of the night.
Wifi reconnected about 5hrs ago.
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
Hi all,
I found my chicken door not working last night.
This morning I was investigating and it seems like all rules are gone.
It was working yesterday morning fine and I did not do any changes to the rules.
Any idea how this can happen? Seems like the D1 mini reboots sometimes by itself.
Can this cause a loos of rules? All other settings and devices are still available.
Not sure if I have the latest rules version as backup.
thx
I found my chicken door not working last night.
This morning I was investigating and it seems like all rules are gone.
It was working yesterday morning fine and I did not do any changes to the rules.
Any idea how this can happen? Seems like the D1 mini reboots sometimes by itself.
Can this cause a loos of rules? All other settings and devices are still available.
Not sure if I have the latest rules version as backup.
thx
Re: No Rules without wifi?
Rules gone, but also the settings?
If the unit does not detect a correct file system at boot, it formats the file system and starts all over again.
But that implies the settings are also wiped to default, not only a missing rules file.
If the unit does not detect a correct file system at boot, it formats the file system and starts all over again.
But that implies the settings are also wiped to default, not only a missing rules file.
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
all settings and devices are still available and working.
Only rules are gone. Also rules page looks strange. Please see issue with included screenshots.
https://github.com/letscontrolit/ESPEasy/issues/3081
Only rules are gone. Also rules page looks strange. Please see issue with included screenshots.
https://github.com/letscontrolit/ESPEasy/issues/3081
Re: No Rules without wifi?
Have you been using the Rules with 'Old Engine' option disabled? I think it was default off a couple of releases ago, but been (re-)enabled by default shortly after that. This setting is hiding in the Tools / Advanced Settings page.
/Ton (PayPal.me)
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
Bingo!
Rules Settings/Old Engine was disabled.
This caused Rules to disappear and destroy Rules page.
Is this a bug or a feature?
Rules Settings/Old Engine was disabled.
This caused Rules to disappear and destroy Rules page.
Is this a bug or a feature?
Re: No Rules without wifi?
Well, it's supposed to be a feature to create 1 rules file per event, but I'm not sure how to define a user-defined event here, as the # is a mandatory item in the name.
'Been there, done that' kinda situation (till I found that Old Engine checkbox )
/Ton (PayPal.me)
-
- Normal user
- Posts: 123
- Joined: 03 Apr 2018, 21:46
Re: No Rules without wifi?
Okay, strange. I also tried to create new rules with new engine but always got an error for the name, but no detailed info about what was wrong with the name. Tried to search the wiki but no solution found.
So this issue is fixed for me and I will stay with old rules engine.
But the original issue with the device rebooting randomly and rules not working due to missing time after wifi lost is still pending. Will observe this.
So this issue is fixed for me and I will stay with old rules engine.
But the original issue with the device rebooting randomly and rules not working due to missing time after wifi lost is still pending. Will observe this.
Who is online
Users browsing this forum: No registered users and 141 guests