Setting configuration parameter 8 on GE Z-Wave Motion Dimmer 26933 fails with the following message (from ozwdaemon logs):
2020-07-28 02:15:20.329278214 [20200728 2:15:20.328 UTC] [ozw.mqtt.commands] [debug]: Got "OpenZWave/1/command/setvalue/" Message: "{\"ValueIDKey\": 2251799941349398, \"Value\": null}"
2020-07-28 02:15:20.330266679 [20200728 2:15:20.329 UTC] [ozw.mqtt.commands.setValue] [warning]: Incorrect Field Type (Short) for "setvalue" : Value: 0
2020-07-28 02:15:20.339244437 [20200728 2:15:20.330 UTC] [ozw.mqtt.commands] [warning]: Message Processing for "setvalue" failed: "{\"ValueIDKey\": 2251799941349398, \"Value\": null}"
The config value has a type of "short" in OZW 26933-motion-dimmer.xml for config parameter 8.
The mosquitto logs look similar:
OpenZWave/1/command/setvalue/ {"ValueIDKey": 2251799941349398, "Value": null}
OpenZWave/1/event/setvalue/ {
"status": "failed",
"error": "Incorrect Field Type for Value: Not Short: ",
"TimeStamp": 1595909513
}
I was trying to set the value 1 from Home Assistant Developer Tools ozw.set_config_parameter Service call with the following data:
node_id: 7
parameter: 8
value: 1
configuration.yamlNo relevant configuration in yaml. Entirely done through UI.
See above in description.
Originally filed against qt-openzwave at https://github.com/OpenZWave/qt-openzwave/issues/138. They said that the problem lies with the Open Z-Wave integration in Home Assistant not supporting short type.
Short type is missing from async_set_config_parameter, so it sends a payload of None.
Happy to send a PR: https://github.com/DanielBaulig/core/tree/DanielBaulig-issue-38307
Note that I do not have a full dev environment for HA setup and probably have not done my due diligence in terms of testing, etc.
Unfortunately there's no ValueType.SHORT defined by the upstream python module, so I don't think it's that simple.
I think that's the reason it wasn't implemented.
This is simply mapping into a C++ API value, right?
http://www.openzwave.com/dev/classOpenZWave_1_1ValueID.html#a219b3db5db3d9ba422003edf4a16d06e
Should we also add some other types while we're at it? At least BitSet and Raw seem to be missing, too.
This is simply mapping into a C++ API value, right?
Yes, and No. The data is coming from mqtt as strings (see below), which was converted from the C++ type. Your two fixes looks correct to me. You can test it easily enough w/o a dev environment by copying those two files into your HA installation. The dependency will need to be updated first with an actual release version before it can be used here though.
{
"Label": "InstallerIcon",
"Value": 1536,
"Units": "",
"ValueSet": false,
"ValuePolled": false,
"ChangeVerified": false,
"Min": -32768,
"Max": 32767,
"Type": "Short",
"Instance": 1,
"CommandClass": "COMMAND_CLASS_ZWAVEPLUS_INFO",
"Index": 1,
"Node": 3,
"Genre": "System",
"Help": "Icon File to use for the Installer Application",
"ValueIDKey": 281475041165334,
"ReadOnly": true,
"WriteOnly": false,
"Event": "valueAdded",
"TimeStamp": 1595896171
}
Should we also add some other types while we're at it? At least BitSet and Raw seem to be missing, too.
Probably doesn't hurt. Submit the PR and see how it goes. 馃槃
You can test it easily enough w/o a dev environment by copying those two files into your HA installation.
I'm running HA from the Docker Image. I guess I have to update the Docker file to copy in the patched files?
Yeah, I usually just exec into the container, find the file (cd / ; find . -name 'foo.py') to get the exact location, then just wget the individual files from the github PR (use the raw link) and replace the originals. Quick and dirty, but works temporarily.
2020-07-28 05:24:46.065752414 [20200728 5:24:46.065 UTC] [ozw.mqtt.commands] [debug]: Got "OpenZWave/1/command/setvalue/" Message: "{\"ValueIDKey\": 2251799941349398, \"Value\": 1}"
2020-07-28 05:24:46.066628773 [20200728 5:24:46.066 UTC] [ozw.mqtt.commands.setValue] [info]: Setting 2251799941349398 to Value QVariant(uint, 1)
2020-07-28 05:24:46.067257006 [20200728 5:24:46.066 UTC] [ozw.values] [debug]: setData Called for Row 36 With Value QVariant(uint, 1)
2020-07-28 05:24:46.067839387 [20200728 5:24:46.067 UTC] [ozw.values] [debug]: valueModel Changed! QTOZW_ValueIds::Value - 36 : QVariant(uint, 1)
2020-07-28 05:24:46.068405027 [20200728 5:24:46.068 UTC] [ozw.values] [debug]: valueModel Changed! vidKey: 2251799941349398 QVariant(uint, 1)
2020-07-28 05:24:46.069179462 [20200728 5:24:46.068 UTC] [ozw.library] [info]: Info - Node: 7 Value::Set - COMMAND_CLASS_CONFIGURATION - Z-Wave Command Dim Rate - 8 - 1 - 1
2020-07-28 05:24:46.069899230 [20200728 5:24:46.069 UTC] [ozw.library] [info]: Info - Node: 7 Configuration::Set - Parameter=8, Value=1 Size=2
2020-07-28 05:24:46.070644757 [20200728 5:24:46.070 UTC] [ozw.library] [debug]: Detail - Node: 7 Queuing (Send) ConfigurationCmd_Set (Node=7): 0x01, 0x0d, 0x00, 0x13, 0x07, 0x06, 0x70, 0x04, 0x08, 0x02, 0x00, 0x01, 0x25, 0x28, 0x92
2020-07-28 05:24:46.071932036 [20200728 5:24:46.071 UTC] [ozw.library] [debug]: Detail - Node: 7 Queuing (Send) ConfigurationCmd_Get (Node=7): 0x01, 0x0a, 0x00, 0x13, 0x07, 0x03, 0x70, 0x05, 0x08, 0x25, 0x29, 0x93
2020-07-28 05:24:46.072923708 [20200728 5:24:46.072 UTC] [ozw.mqtt.commands] [info]: Processed Message for "setvalue" : "{\"ValueIDKey\": 2251799941349398, \"Value\": 1}"
2020-07-28 05:24:46.073222741 [20200728 5:24:46.072 UTC] [ozw.library] [info]: Info - Node: 7 Sending (Send) message (Callback ID=0x28, Expected Reply=0x13) - ConfigurationCmd_Set (Node=7): 0x01, 0x0d, 0x00, 0x13, 0x07, 0x06, 0x70, 0x04, 0x08, 0x02, 0x00, 0x01, 0x25, 0x28, 0x92
2020-07-28 05:24:46.073789641 [20200728 5:24:46.073 UTC] [ozw.library] [info]: Info - Node: 7 Encrypted Flag is 0
2020-07-28 05:24:46.082255899 [20200728 5:24:46.081 UTC] [ozw.library] [debug]: Detail - Node: 7 Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2020-07-28 05:24:46.082819799 [20200728 5:24:46.082 UTC] [ozw.library] [debug]: Detail - Node: 7 ZW_SEND_DATA delivered to Z-Wave stack
2020-07-28 05:24:46.102057655 [20200728 5:24:46.101 UTC] [ozw.library] [debug]: Detail - Node: 7 Received: 0x01, 0x18, 0x00, 0x13, 0x28, 0x00, 0x00, 0x02, 0x00, 0xcf, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x10
2020-07-28 05:24:46.102333596 [20200728 5:24:46.102 UTC] [ozw.library] [debug]: Detail - Node: 7 ZW_SEND_DATA Request with callback ID 0x28 received (expected 0x28)
2020-07-28 05:24:46.102526186 [20200728 5:24:46.102 UTC] [ozw.library] [info]: Info - Node: 7 Request RTT 28 Average Request RTT 28
2020-07-28 05:24:46.102756164 [20200728 5:24:46.102 UTC] [ozw.library] [debug]: Detail - Node: 7 Extended TxStatus: Time: 20, Hops: 0, Rssi: -49 --- --- --- ---, AckChannel: 0, TxChannel: 0, RouteScheme: Last Working Route, Route: 0 0 0 0, RouteSpeed: 100K, RouteTries: 1, FailedLinkFrom: 0, FailedLinkTo: 0
2020-07-28 05:24:46.102948365 [20200728 5:24:46.102 UTC] [ozw.library] [debug]: Detail - Node: 7 Expected callbackId was received
2020-07-28 05:24:46.103127104 [20200728 5:24:46.103 UTC] [ozw.library] [debug]: Detail - Node: 7 Expected reply was received
2020-07-28 05:24:46.103304879 [20200728 5:24:46.103 UTC] [ozw.library] [debug]: Detail - Node: 7 Message transaction complete
2020-07-28 05:24:46.103483932 [20200728 5:24:46.103 UTC] [ozw.library] [debug]: Detail - Node: 7 Removing current message
2020-07-28 05:24:46.103729559 [20200728 5:24:46.103 UTC] [ozw.library] [info]: Info - Node: 7 Sending (Send) message (Callback ID=0x29, Expected Reply=0x04) - ConfigurationCmd_Get (Node=7): 0x01, 0x0a, 0x00, 0x13, 0x07, 0x03, 0x70, 0x05, 0x08, 0x25, 0x29, 0x93
2020-07-28 05:24:46.103913056 [20200728 5:24:46.103 UTC] [ozw.library] [info]: Info - Node: 7 Encrypted Flag is 0
2020-07-28 05:24:46.111442845 [20200728 5:24:46.111 UTC] [ozw.library] [debug]: Detail - Node: 7 Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2020-07-28 05:24:46.111641731 [20200728 5:24:46.111 UTC] [ozw.library] [debug]: Detail - Node: 7 ZW_SEND_DATA delivered to Z-Wave stack
2020-07-28 05:24:46.131109899 [20200728 5:24:46.130 UTC] [ozw.library] [debug]: Detail - Node: 7 Received: 0x01, 0x18, 0x00, 0x13, 0x29, 0x00, 0x00, 0x02, 0x00, 0xcf, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x11
2020-07-28 05:24:46.131321859 [20200728 5:24:46.131 UTC] [ozw.library] [debug]: Detail - Node: 7 ZW_SEND_DATA Request with callback ID 0x29 received (expected 0x29)
2020-07-28 05:24:46.131495097 [20200728 5:24:46.131 UTC] [ozw.library] [info]: Info - Node: 7 Request RTT 27 Average Request RTT 27
2020-07-28 05:24:46.131702317 [20200728 5:24:46.131 UTC] [ozw.library] [debug]: Detail - Node: 7 Extended TxStatus: Time: 20, Hops: 0, Rssi: -49 --- --- --- ---, AckChannel: 0, TxChannel: 0, RouteScheme: Last Working Route, Route: 0 0 0 0, RouteSpeed: 100K, RouteTries: 1, FailedLinkFrom: 0, FailedLinkTo: 0
2020-07-28 05:24:46.131881648 [20200728 5:24:46.131 UTC] [ozw.library] [debug]: Detail - Node: 7 Expected callbackId was received
2020-07-28 05:24:46.143647955 [20200728 5:24:46.143 UTC] [ozw.library] [debug]: Detail - Node: 7 Received: 0x01, 0x0e, 0x00, 0x04, 0x00, 0x07, 0x06, 0x70, 0x06, 0x08, 0x02, 0x00, 0x01, 0xcf, 0x00, 0x46
2020-07-28 05:24:46.143851415 [20200728 5:24:46.143 UTC] [ozw.library] [info]: Info - Node: 7 Response RTT 39 Average Response RTT 39
2020-07-28 05:24:46.144029931 [20200728 5:24:46.143 UTC] [ozw.library] [debug]: Detail - Node: 7 Value Updated: old value=3, new value=1, type=short
2020-07-28 05:24:46.144213651 [20200728 5:24:46.144 UTC] [ozw.library] [debug]: Detail - Node: 7 Changes to this value are not verified
2020-07-28 05:24:46.144421259 [20200728 5:24:46.144 UTC] [ozw.library] [info]: Info - Node: 7 Received Configuration report: Parameter=8, Value=1
2020-07-28 05:24:46.144589072 [20200728 5:24:46.144 UTC] [ozw.library] [debug]: Detail - Node: 7 Expected reply and command class was received
2020-07-28 05:24:46.144754662 [20200728 5:24:46.144 UTC] [ozw.library] [debug]: Detail - Node: 7 Message transaction complete
2020-07-28 05:24:46.144919012 [20200728 5:24:46.144 UTC] [ozw.library] [debug]: Detail - Node: 7 Removing current message
2020-07-28 05:24:46.145131268 [20200728 5:24:46.145 UTC] [ozw.library] [debug]: Detail - Node: 7 Notification: ValueChanged CC: COMMAND_CLASS_CONFIGURATION Instance: 1 Index: 8
2020-07-28 05:24:46.145353247 [20200728 5:24:46.145 UTC] [ozw.notifications] [debug]: Notification pvt_valueChanged: 2251799941349398 Thread: 0xb3cd2010
2020-07-28 05:24:46.145859499 [20200728 5:24:46.145 UTC] [ozw.mqtt.publisher] [debug]: Publishing Event valueChanged: 2251799941349398
Working! Going to send out these pull requests.
Are you aware of if there is any documentation on what format qt-openzwave's MQTT interface is expecting the Raw and BitSet types in?
Are you aware of if there is any documentation on what format qt-openzwave's MQTT interface is expecting the Raw and BitSet types in?
https://github.com/OpenZWave/qt-openzwave/blob/master/docs/MQTT.md
Raw is almost completely unused, I'm not sure it even works. There are only two devices that set that type, I have one of them, and I don't think I ever got it functioning.
In fact, I know for certain Raw and Decimal types are not valid config value types. They are used for other values though, just not config.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I'll close here. I think this is solved and we have reworked a lot around setting the config lately. Please let us know if there's still something not working as expected.