Include and Exclude end devices by sending MQTT payloads on topics #2665
Replies: 11 comments
-
I think what you are looking for is in the MQTT apis: https://zwave-js.github.io/zwavejs2mqtt/#/guide/mqtt?id=apis |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for the quick reply. I have already checed it but I have not able to find information about what should be a mqtt message payload for these different mqtt API? Also, I tried this topic to get node info without any payload but I didn't get any response? <mqtt_prefix>/<?node_location>/<node_name>/nodeinfo what should be a payload value for this? |
Beta Was this translation helpful? Give feedback.
-
Here is an example API call I made to start inclusion: zwave/_CLIENTS/ZWAVE_GATEWAY-Zwavejs2Mqtt/api/startInclusion/set
Response Topic: zwave/_CLIENTS/ZWAVE_GATEWAY-Zwavejs2Mqtt/api/startInclusion Payload: |
Beta Was this translation helpful? Give feedback.
-
You can also use Or call startInclusion by poviding the qrcode raw string in options. |
Beta Was this translation helpful? Give feedback.
-
This is great. I will try that. Is it still also possible to add DSK or QR code to SmartStart list through MQTT? We are thinking to remove UI part and use only MQTT interface to communicate with z-wave JS and manage end devices. We will write MQTT wrapper which will manage this and communicate with backend cloud. What do you think. Is this possible? |
Beta Was this translation helpful? Give feedback.
-
It is possbile yeah, the only 'hard' thing is handling the devices management. I would use the provided UI for that as it's really hard to handle |
Beta Was this translation helpful? Give feedback.
-
Yeah we believe that we can do device management with MQTT wrapper that we will write with assumption that the MQTT broker will retain all end devices related information and whenever any MQTT client will connect with local MQTT broker, it will get all those messages and by using those message we can manage end devices. My only concern is if we remove UI part and use only MQTT to communicate with end devices through Zwave JS, will it work? Does Zwave JS stores information related to included devices or GUI application is responsible for that? |
Beta Was this translation helpful? Give feedback.
-
I just noticed that we don't get any message on MQTT when a device is removed from the network. I subscribed to wildcard topic zwave/# but didn't get any MQTT message after device is removed. |
Beta Was this translation helpful? Give feedback.
-
Question is how do you edit UI settings without UI? Like logging, controller path etc...
You should enable sending mqtt events to mqtt but as I said that is not the best choice. As an alternative you could use the integrated zwave-js-server by enabling it in settings and use it's websocket to handle everything like Home-Assistant team is doing right now |
Beta Was this translation helpful? Give feedback.
-
My understanding was that when user peform any action on UI for settings there must be any JS API which get called. So I was thinking if we may trigger those APIs through MQTT messages by changing mqtt client part of Zwave JS. Let me know if I am wrong. Sorry I am not an expert in JS, backend or front end. I am embedded software developer . |
Beta Was this translation helpful? Give feedback.
-
You could do almost everything using mqtt apis giving that there is also support for custom driver function that you can always use if you need to to something that is not directly supported by exposed APIs. Problem is as I said that processes like the inclusion may be complex in some cases to handle. I developed this application to be a control panel to configure/update/manage devices that is the most complex thing to do with zwave devices and then use mqtt as protocool to get/set the values BTW as I said if you want to try implement that there is support for everything using MQTT, good luck :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
is it possible to include/exclude end devices by through MQTT ? If yes where can I find information related to required topics header and payload?
Beta Was this translation helpful? Give feedback.
All reactions