Created At
Jul 15, 2018
Created By mysmarthome-cba-pl
Scene check battery level of all battery-operated devices.
Created At
Jul 15, 2018
Last Update
Jul 30, 2018
Platforms
HC 2
Views
2902
Download
409
FUNCTIONS
The scene checks the status of all battery devices and displays information about battery levels in the debug window. It will also inform you if the level drops below 20%
INSTALATION
HOW TO USE
Manually - just press start button
Automatically – you need to add at the beginning of the code:
local t = os.date("*t")
--scene will be performed every 19th at 10:20
if (t.day == 19) and (t.hour == 10) and (t.min == 20) then
--remember to add "end" of the end of whole code
end
this will cause the scene to start automatically once a month at a given time.
RIGHTS
I allow code to be reuse or change. Also labels can be translated and adjust.
Hey, For autostart working you need to add %% autostart at the second line of the code, (just above %% properties) otherwise there is NO TRIGGER . Then Fibaro will autorun this scene always, and check the date if it is time to check the battery For best practices add sleep command before the last "end" fibaro:sleep(60*1000) --script waits for 60 sec before checking time again to see if the battery's need to be checked
Great!
Hello, when i modify the code ti works. I've changed the "+1" for each devices and let empty.
Hello, 4.18 for my software. I only copy/past the scene and ad the ID of my phone
Hi I copied the code exactly as per download without trying to have it run automatically. I am getting this error message. Can you please advise what is wrong or needs to be changed? Thanks [DEBUG] 16:43:25: 2019-09-10 16:43:25.148362 [ fatal] Unknown exception: /opt/fibaro/scenes/266.lua:27: attempt to concatenate a nil value