OpenZWave / qt-openzwave

QT5 Wrapper for OpenZWave
GNU Lesser General Public License v3.0
104 stars 30 forks source link

MQTT command documentation does not match implementation #68

Closed kpine closed 4 years ago

kpine commented 4 years ago

MQTT topics are case sensitive. I tried to issue a refreshNodeInfo command as documented:

topic: OpenZWave/1/command/refreshNodeInfo/ data: {"node": 11"}

There was no response, and ozwdaemon debug logs showed the command was received but no action was taken.

I changed the topic to OpenZWave/1/command/refreshnodeinfo/. That was successful and ozwdaemon replied with OpenZWave/1/event/refreshnodeinfo/. I noticed all the setValue commands issued by Home Assistant are lowercase setvalue as well, not setValue as documented.

I took a look and If I am understanding everything correctly, there are 3 different forms of topic letter-casing being used:

  1. Documentation use camel case with lower case first letter, e.g. refreshNodeInfo.
  2. The MQTT class static method StaticGetCommand() use camel case with upper case first letter, e.g. AssignReturnRoute
  3. The subscription setup code that registers MQTT topics to the class implementations lower cases the class string (e.g. refreshnodeinfo) and listens for the lower case topic.

So either the documentation needs updating, or the implementation should match the docs.

Fishwaldo commented 4 years ago

Thanks!

Fixed. Lets see what breaks?