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

Default on change event for some properties #132

Open
sColin16 opened this issue Jun 3, 2019 · 0 comments
Open

Default on change event for some properties #132

sColin16 opened this issue Jun 3, 2019 · 0 comments

Comments

@sColin16
Copy link

sColin16 commented Jun 3, 2019

Many smart home devices will give users a notification when the state of some device has changed when that state change has security implications (e.g. when a garage door opens, doors are unlocked, etc.). Many of these "states" would be appropriately defined as properties (since they could be set), but it would also be useful for them to have an event associated with a change to that property, so that (for example), someone could "subscribe" to that event (in the case of a websocket) to send notifications or handle these important state changes correctly.

I'm not exactly sure how this should be implemented, but I think that some properties should have an event associated with them whenever their values change (or perhaps cross some threshold for number properties). The best way I can think to do that is to include an optional field in the property object with a link to the associated event. It may also be useful to include a field for the link to the associated property in the event object. This would make it easy to connect properties and events that are associated. Since multiple agents could change these properties (devices connected to the gateway, a cloud service, or a smart switch/remote control), I think there are a lot of instances where it would be useful to connect properties and events

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

1 participant