Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State script execution interval #30

Open
lakars opened this issue Aug 17, 2020 · 1 comment
Open

State script execution interval #30

lakars opened this issue Aug 17, 2020 · 1 comment

Comments

@lakars
Copy link

lakars commented Aug 17, 2020

The state script I'm using is just executed twice, once after reboot, and then 4 seconds later. Is there something I can do to have it executed every 5 seconds or is it an issue of my installation.

@pponce
Copy link
Owner

pponce commented Sep 10, 2020

The state script you point this plugin to in the config executes every time Apple HomeKit checks for state. This happens for me when I go into the Apple home app and navigate away from a room that has the accessory in it and then navigate back to the room. Or if you exit the Apple home app then reopen it.

You could move to running a state script that executes as often as you want and creates or deletes a file to designate on or off state of an accessory. You could leverage cron for example to have it execute every hour for example.
Then you can have this plugin use the existence of a file instead of a state script to set on or off state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants