Hi All,
I'm struggling with "rules" for the below situation, who can help me with the issue?
Goal:
After system boot, switch the OLED screen off after 30 seconds.
When motion is detected switch the screen on for 30 seconds and then switch off again.
Problem:
The OLED screen will only stay on for 1 sec, but not for 30 seconds as coded below after motion detection.
Current rule:
On System#Boot do //When the ESP boots, do
timerSet,1,30 //Set Timer 1 for the next event in 30 seconds
endon
On Rules#Timer=1 do //When Timer1 expires, do
OLEDCMD,off
endon
on Motion#Detection=1 do
timerSet,2,30
OLEDCMD,on
endon
on Rules#Timer=2 do
OLEDCMD,off
endon
Thanks!
OLED screen off timer rule
Moderators: grovkillen, Stuntteam, TD-er
Re: OLED screen off timer rule
I am not an expert, but my rule for OLED on an off looks like that:neffe wrote: ↑02 Mar 2021, 20:30
Current rule:
On System#Boot do //When the ESP boots, do
timerSet,1,30 //Set Timer 1 for the next event in 30 seconds
endon
On Rules#Timer=1 do //When Timer1 expires, do
OLEDCMD,off
endon
on Motion#Detection=1 do
timerSet,2,30
OLEDCMD,on
endon
on Rules#Timer=2 do
OLEDCMD,off
endon
Code: Select all
on Clock#Time=All,22:00 do //will run once a day at noon
oledframedcmd,display,off
endon
on Clock#Time=All,08:00 do //will run once a day at noon
oledframedcmd,display,on
endon
--
ESP8266, ESPEasy (always latest mega release in use ), and Domoticz (only beta versions )
ESP8266, ESPEasy (always latest mega release in use ), and Domoticz (only beta versions )
Re: OLED screen off timer rule
Please be aware that if an OLED is turned on for prolonged time, the risk of image-burn-in is quite real.
So setting a display time-out, either by the configuration settings on the OLED(Framed) configuration using a button or sensor to wake-up, or by rules (when having more complex time-out requirements) is a 'good thing'.
So setting a display time-out, either by the configuration settings on the OLED(Framed) configuration using a button or sensor to wake-up, or by rules (when having more complex time-out requirements) is a 'good thing'.
/Ton (PayPal.me)
Re: OLED screen off timer rule
Your rules look legit. Perhaps you have a hidden unprintable character within your rules that is corrupting execution. Copy/past the entire rule file into an editor (e.g. notepad++) that shows native ASCII values. This will allow you to confirm the rule's text is clean.Problem:
The OLED screen will only stay on for 1 sec, but not for 30 seconds as coded below after motion detection.
- Thomas
Re: OLED screen off timer rule
Definitively, especially when it is located in the bedroom, because these small, little things are really bright.Ath wrote: ↑01 Jun 2021, 15:45 Please be aware that if an OLED is turned on for prolonged time, the risk of image-burn-in is quite real.
So setting a display time-out, either by the configuration settings on the OLED(Framed) configuration using a button or sensor to wake-up, or by rules (when having more complex time-out requirements) is a 'good thing'.
--
ESP8266, ESPEasy (always latest mega release in use ), and Domoticz (only beta versions )
ESP8266, ESPEasy (always latest mega release in use ), and Domoticz (only beta versions )
Who is online
Users browsing this forum: Google [Bot] and 134 guests