Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Default on change event for some properties #132

@sColin16

Description

@sColin16

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions