Created At

Jul 15, 2018

Last Update

Jul 30, 2018

Platforms

HC 2

Views

9919

Download

1105

Type Scene

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

  • Copy and paste whole code to the lua editor in HC2
  • Enter ID of your phone in variable phoneID, you can check it using: IP_address_of_your_HC/api/iosDevices, (in my case 16)
  • local phoneID = 16;

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.

14 Comments,  Want to add comment please login
Acbdefb293f11960732faf5c989c06ca

Can a Battery Check be made for Fibaro HC3? I am not aware to do such a thing

932185f28338025d52ae7cc73c18936d

I have used this scene as the basis for a VD that is now also in the market place. It's called "Battery Monitor". In doing so, I also ran in the "V+1" versus" "V" situation, not sure if it is related to what you are experiencing: The battery levels will be returned for the master devices. My VD also checks if the device is dead or not. I started checking for dead devices because even if the device is dead, it will keep returning its last battery level. That check will return a list of the child devices (master_id_+1, master_id+2, ...), Weird, but that is what I found in my attempts to solve it. More details in the code of the VD, it may give some clues.

A458be69ee1a66a19fa075f0174f9b40

Solved: change "V+1" to "v" - search replace all. It works then.

A458be69ee1a66a19fa075f0174f9b40

I have exactly the same problem as raeædk also ):

64ba61cdf40f72351ec4cb1f99f68c2e

I had the same problem with realdk. Has there been any change on HC2 that has invalidated the code or should something be set?

© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback