How to get the frame number of an oled frame device
Posted: 10 Apr 2024, 10:45
Dear community,
comming from tasmota I am trying to do the first steps using ESPeasy.
My goal is to present a couple of mqtt data on an oled display.
The framed display together with a button seems to perfectly fit to this task.
Up to now a set of four values were displayed and can be replaced by the next four values using the button.
Unfortunately the value were not updated if they were changed in the background as long as no button press were done.
Updating could be easily done by executing, e.g.
OledFramedCmd,Frame 1(2,3,4)
in an appropriate rule with a recurring timer. Therefore, I need to know which frame is currently displayed to refresh exactly this frame.
My rule currently likes like this (the if-clause is of course not working ...)
On System#Boot do timerSet,1,5 Endon
On Rules#Timer=1 do
If display#Frame=1 Do OledFramedCmd,Frame 1 Endon
If display#Frame=2 Do OledFramedCmd,Frame 2 Endon
If display#Frame=3 Do OledFramedCmd,Frame 3 Endon
If display#Frame=4 Do OledFramedCmd,Frame 4 Endon
timerSet,1,1
endon
Does anyone have an idea how to get the number of the displayed frame or even how to get the currently displayed content?
Would be great to get support!
Thank you in advance!
Oliver
comming from tasmota I am trying to do the first steps using ESPeasy.
My goal is to present a couple of mqtt data on an oled display.
The framed display together with a button seems to perfectly fit to this task.
Up to now a set of four values were displayed and can be replaced by the next four values using the button.
Unfortunately the value were not updated if they were changed in the background as long as no button press were done.
Updating could be easily done by executing, e.g.
OledFramedCmd,Frame 1(2,3,4)
in an appropriate rule with a recurring timer. Therefore, I need to know which frame is currently displayed to refresh exactly this frame.
My rule currently likes like this (the if-clause is of course not working ...)
On System#Boot do timerSet,1,5 Endon
On Rules#Timer=1 do
If display#Frame=1 Do OledFramedCmd,Frame 1 Endon
If display#Frame=2 Do OledFramedCmd,Frame 2 Endon
If display#Frame=3 Do OledFramedCmd,Frame 3 Endon
If display#Frame=4 Do OledFramedCmd,Frame 4 Endon
timerSet,1,1
endon
Does anyone have an idea how to get the number of the displayed frame or even how to get the currently displayed content?
Would be great to get support!
Thank you in advance!
Oliver