Created At

Jul 15, 2018

Last Update

Jul 30, 2018

Platforms

HC 2

Views

10411

Download

1133

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
Cfaf05781a59deb7092b60c8f6cb9fcb

Not working for me... HC2 v4.510.

1b3d3af63ca6fc0d2403ed0ce928f41b

Could you provide more details? Do you have some error/information? I using this scene also on 4.510 without any problem.

2ddb8628c94e5548b4e975802ddb2a5a

Hello, it doesn't work for me, here is the message : lua:27 attempt to concatenate a nil value

1b3d3af63ca6fc0d2403ed0ce928f41b

@Francis Mory what software version on HC you have? Did you try to rewrite the scene?

2ddb8628c94e5548b4e975802ddb2a5a

Hello, 4.18 for my software. I only copy/past the scene and ad the ID of my phone

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