Zwave2mqtt don't listen command

Hello

I use zwave2mqtt, I want to poll some node manually, so I send command like openzwave/1/command/requestnodedynamic or others, but I don’t have anything append, no trace in logs.
openzwave is the prefix set in settings.

Am I doing something wrong ?

Thanks

I have not done this before, but I think I have about figured this out for you.

The mqtt format is:
<mqtt_prefix>/_CLIENTS/ZWAVE_GATEWAY-<mqtt_name>/api/<api_name>/set JSON args

where:

  • <mqtt_name> is from your GUI->Settings->mqtt->Name.
  • <mqtt_prefix> is from your GUI->Settings->mqtt->Prefix. In your case its openzwave
  • <api_name> - If you actually want to use the requestnodedynamic, then the OZW API is RequestNodeDynamic (uint32 const _homeId, uint8 const _nodeId)
    and the <api_name> has to have the first letter downcased so it will be requestNodeDynamic.
  • JSON args is the MQTT message/value for this topic and will contain the JSON string { “args”: “0xYYYYYYYY”, “N” ] } where 0xYYYYYYYY is replaced by your home-id found at the top of your GUI, and “N” is the integer of your node-id.

As an example, if you use mosquito, you could publish it using something like:

mosquito_pub -t openzwave/_CLIENTS/ZWAVE_GATEWAY-mymqtt/api/requestNodeDynamic/set'  -m '{"args": [ "0x01234567", "3" ]}'

If at the same time, you snoop on MQTT, you should see something like:

openzwave/_CLIENTS/ZWAVE_GATEWAY-mymqtt/api/requestNodeDynamic/set {"args": [ "0x01234567", "3" ]}
openzwave/_CLIENTS/ZWAVE_GATEWAY-mymqtt/api/requestNodeDynamic {"success":true,"message":"Success zwave api call","result":false,"args":["0x01234567","3"]}

This is all documented, you just have to dig around. Start here:

1 Like

thank you ! I saw this and the doc but I thinked it was limited to the commands here : https://github.com/OpenZWave/Zwave2Mqtt#custom-apis :frowning: