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

Persist state across Homebridge reboots? #3

Closed
name99-org opened this issue Aug 5, 2020 · 5 comments
Closed

Persist state across Homebridge reboots? #3

name99-org opened this issue Aug 5, 2020 · 5 comments

Comments

@name99-org
Copy link

Like other users I love this plugin and the way you can effectively use it with CarPlay to run scenes when you leave and return to the house.
(Basically you can have various scenes triggered by when the dummy garage door opens or closes. I trigger lights, door locks, burglar alarm, cameras, etc.
The advantage of using dummy garage, even if you have a smart garage door, like I do, is that you don't want the scenes triggered by opening the real door, because then they will trigger whenever you open/close the garage door to move out the lawn mower or whatever. By keying the scenes off the dummy door, you can ensure that changing the dummy door state correlates with actual intent to leave the house.)

But there is one small bug which is the following: Given the setup I described above, the normal way I use the dummy door is that I leave home, I tell CarPlay to close the dummy door, and the state of the door when I am away is "closed". Likewise when I return home the dummy door is opened and its state, while I am home, is "open". So far so good.
Now assume that I restart HomeBridge for some reason (maybe a plugin is updated, maybe macOS is updated). When HomeBridge (and in particular homebridge-dummy-garage) restarts, it restarts in the state "closed", not in the state it was occupying before the restart (which was probably "open".) This confused the heck out of me the first two times it happened, when I got into the car and CarPlay displayed the garage door in the wrong state, and scared me that maybe there was something fundamentally unreliable about my setup!

So I'd suggest that either this be treated as a bug, or at least be treated as an option for some users, that after a reboot, dummy garage be restored to the same open/close state that it had before the reboot. Does that make sense?

@rasod
Copy link
Owner

rasod commented Aug 5, 2020

Interesting, I’ve never thought of that use case. I’ll have to do some research as I’m not 100% sure how to accomplish saving the state between restarts.

@name99-org
Copy link
Author

name99-org commented Aug 5, 2020 via email

@rasod
Copy link
Owner

rasod commented Aug 11, 2020

@name99-org I just published 1.2.0 which should keep the state of the door between restarts. Hopefully it works since I could only test on my development environment. My main environment is grossly out of date and i'm not looking forward to updating it.

@rasod rasod closed this as completed Aug 11, 2020
@name99-org
Copy link
Author

name99-org commented Aug 12, 2020 via email

@name99-org
Copy link
Author

name99-org commented Aug 13, 2020 via email

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