1

I have a setup where I am running a simple mosquito server for MQTT. I then run the Z-Wave JS ui project to interact with my zwave devices. This works great and I see the messages showing up in MQTT for example here is me turning on then back off the light...

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876065,"value":1698588451955}
2023-10-29 10:14:36:043

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876065,"value":1698588451955}
2023-10-29 10:14:36:043

Topic: zwave/Bedroom_Light/37/0/targetValueQoS: 0
{"time":1698588876077,"value":true}
2023-10-29 10:14:36:053

Topic: zwave/Bedroom_Light/37/0/targetValueQoS: 0
{"time":1698588876077,"value":true}
2023-10-29 10:14:36:054

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876079,"value":true}
2023-10-29 10:14:36:054

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876079,"value":true}
2023-10-29 10:14:36:055

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876094,"value":true}
2023-10-29 10:14:36:068

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876094,"value":true}
2023-10-29 10:14:36:068

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876316,"value":1698588876093}
2023-10-29 10:14:36:292

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876316,"value":1698588876093}
2023-10-29 10:14:36:293

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876494,"value":1698588876093}
2023-10-29 10:14:36:467

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876494,"value":1698588876093}
2023-10-29 10:14:36:468

Topic: zwave/Bedroom_Light/37/0/targetValueQoS: 0
{"time":1698588876510,"value":false}
2023-10-29 10:14:36:485

Topic: zwave/Bedroom_Light/37/0/targetValueQoS: 0
{"time":1698588876510,"value":false}
2023-10-29 10:14:36:485

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876511,"value":false}
2023-10-29 10:14:36:485

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876511,"value":false}
2023-10-29 10:14:36:486

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876526,"value":false}
2023-10-29 10:14:36:502

Topic: zwave/Bedroom_Light/37/0/currentValueQoS: 0
{"time":1698588876526,"value":false}
2023-10-29 10:14:36:503

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876743,"value":1698588876526}
2023-10-29 10:14:36:717

Topic: zwave/Bedroom_Light/lastActiveQoS: 0
{"time":1698588876743,"value":1698588876526}

Now with this working I would like to publish a message to turn on the light instead of using the web ui. To do this I try to publish the message I saw...

zwave/Bedroom_Light/37/0/targetValue
{"time":1698588451956,"value":true}

But nothing happens and I don't see the current value message to confirm it was changing. What am I missing how do I get the ZWave device to toggle via MQTT?

After playing a bit it seems to me like Z-Wave-JS-UI isn't properly handling the requests from MQTT. It seems to be publishing to it just fine. Still not sure what I am missing.

2
  • maybe because the timestamp is old ... epochconverter.com
    – jsotola
    Oct 29, 2023 at 19:20
  • Does the date matter for playback or something if so how old is too old? Made a date in the slight future and tried the same way but did not help
    – Jackie
    Oct 29, 2023 at 19:54

1 Answer 1

0

So I had to read back through the documentation, however, it appears there is a /set that needs to be added to the topic path so instead of zwave/Bedroom/Bedroom_Light/37/0/targetValue is should be zwave/Bedroom/Bedroom_Light/37/0/targetValue/set. Also I could leave out the timestamp and just send this...

{"value":true}

Now it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.