Closed aav7fl closed 4 years ago
Looks like there's a problem with the casing of ValueIDKey
. JSON lookup uses ValueIdKey
, but expects the former.
return this->sendSimpleStatus(mgr->enablePoll(msg["ValueIdKey"].GetUint64(), msg["Intensity"].GetUint()));
Thanks for looking into this. I Just pushed a fix.
Is there a good way to find the ValueIDKey? Right now I'm getting it from my HA core.entity_registry... which I know there has to be a better way inside the MQTT commands. I just haven't found it.
Its right there in both the Topic and Payload.
Is this enablepoll command something I will need to enable every boot, on every config update, or something else?
As long as you keep your ozwcache file, it should only need to be set once.
Is the enablepoll adding a PollInterval behind the scenes to the options.xml file that ozw (non-wrapper) reads, or is that more for a global polling setting? https://github.com/OpenZWave/open-zwave/wiki/Config-Options#optionsxml
You can update via the MQTT interface (sorry, its missing from the documentation) - https://github.com/OpenZWave/qt-openzwave/blob/master/qt-ozwdaemon/mqttcommands/setPollInterval.cpp
What additional information can I provide to help debug this?
Test when the new docker images appear (in a few hours at most)
Built locally, looks good.
[20200522 23:43:26.624 PDT] [ozw.mqtt.commands] [debug]: Got "OpenZWave/1/command/enablepoll/" Message: "{\n \"ValueIDKey\": 281475317252130,\n \"Intensity\": 2\n}"
[20200522 23:43:26.625 PDT] [ozw.library] [info]: Info - Node: 20 EnablePoll for HomeID 0xf83a19d3, value(cc=0x31,in=0x01,id=0x02)--poll list has 1 items
Is there a good way to find the ValueIDKey? Right now I'm getting it from my HA core.entity_registry... which I know there has to be a better way inside the MQTT commands. I just haven't found it.
Its right there in both the Topic and Payload.
Yep. I see it there. But I had to find it from HA before I was able to use it in the topic.
What topic would I call to get a list of the ValueIDKey for a given node?
Test when the new docker images appear (in a few hours at most)
Looks like the new image is working great! Thanks for fixing this so quickly @kpine + @Fishwaldo!
I'm trying to enable polling for a z-wave (non-plus) device with (possibly) buggy firmware. One of the nodes seems to require polling to get updated.
(This is exploring troubleshooting options from https://github.com/OpenZWave/open-zwave/issues/2215#issuecomment-632480262)
One of my attempted solutions is to enable polling (the correct way) via the qz-openzwave mqtt commands.
Previously I was manually editing the
poll_intensity
value in myozwcache_0x*.xml
file to force polling:I'm pretty sure that's not the the correct way to do this. Based on the documentation, I should be able to enable polling for a specific ValudeIDKey though an MQTT topic.
https://github.com/OpenZWave/qt-openzwave/blob/master/docs/MQTT.md#enablepoll
However, when I send the payload though
OpenZWave/1/command/enablepoll/
, qt-openzwave crashes.qt-openzwave Crash Log
Crash Log
```txt [20200522 13:43:49.298 UTC] [qt.mqtt.connection.verbose] [debug]: void QMqttConnection::transportReadReady(), [20200522 13:43:49.298 UTC] [qt.mqtt.connection.verbose] [debug]: Received PUBLISH, [20200522 13:43:49.298 UTC] [qt.mqtt.connection.verbose] [debug]: Finalize PUBLISH: topic: QMqttTopicName("OpenZWave/1/command/enablepoll/") payloadLength: 46, [20200522 13:43:49.299 UTC] [ozw.mqtt.commands] [debug]: Got "OpenZWave/1/command/enablepoll/" Message: "{\"ValueIDKey\":1407374938882098,\"Intensity\":96}", ozwdaemon: /usr/include/rapidjson/document.h:1053: rapidjson::GenericValueqt-openzwave Crash Dump
Here's the crash dump (as a zip since GitHub doesn't like *.dmp files): 324eebee-d923-4c90-a3ba5380-78664f7d.zip
MQTT Topic and Payload that crashed qt-openzwave
Topic:
OpenZWave/1/command/enablepoll/
Payload:{"ValueIDKey":1407374938882098,"Intensity":96}
Other Helpful Information
MQTT ValueIDKey Info
Output from
OpenZWave/1/node/3/instance/3/commandclass/49/value/1407374938882098/
Questions
Is there a good way to find the
ValueIDKey
? Right now I'm getting it from my HAcore.entity_registry
... which I know there has to be a better way inside the MQTT commands. I just haven't found it.Is this
enablepoll
command something I will need to enable every boot, on every config update, or something else?Is the
enablepoll
adding aPollInterval
behind the scenes to theoptions.xml
file that ozw (non-wrapper) reads, or is that more for a global polling setting? https://github.com/OpenZWave/open-zwave/wiki/Config-Options#optionsxmlWhat additional information can I provide to help debug this?
Thanks for taking a look!