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
Feature request: include device type in websocket payload #159
Comments
Doesn't the event already carry all needed information?
etc. In my opinion the events should only contain dynamic / changed data, not the static details of the resource — these should be queried via REST API. Otherwise we could reason to include the full resource in each event which would be overkill. |
Great. Didn't know the event contained that info. Currently I have only connected motion sensors and switches so i didn't saw the logic. I agree less is better. Thanks again. |
@ebaauw has written a nice node.js tool to log the websockets events, very handy to see what's happening |
@manup Thanks for the link. I already created a nice node-red flow. I've updated the filtering on specific events. Seems to work fine now. |
I've created a websockets to MQTT bridge. It allows me to publish messages to my MQTT broker.
This way I'm able to respond on motion sensors and switches without polling.
The websocket client is missing some relevant information. It would be great if the
"type": "ZHAPresence"
would be included in the message payload. It would be even nicer if a user would be able to define witch fields should be included in the message.Currently I have a workaround:
if buttonevent is null > switch
else > motion
However when adding more device types this is not the way it should be done. Of course it would be possible to query the rest api on the corresponding ID, this would cause a lot of unneeded requests.
The text was updated successfully, but these errors were encountered: