cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

Issue calling zwave_set_config_parameter #67

Closed silfa718 closed 4 years ago

silfa718 commented 4 years ago

Home Assistant version: 0.106.4

ozwdaemon version or add-on version: 1.0.13

homeassistant-zwave_mqtt version:0.0.7

Can't get zwave_mqtt.set_config_parameter to work

If i go to the service call window and do

Screenshot 2020-02-25 at 7 18 35 AM - Edited

I see this in the logs.

[20200225 7:18:28.916 EST] [qt.mqtt.connection.verbose] [debug]: Finalize PUBLISH: topic: QMqttTopicName("OpenZWave/1/command/setvalue/") payloadLength: 48

[20200225 7:18:28.917 EST] [qt.mqtt.connection] [debug]: qint32 QMqttConnection::sendControlPublish(const QMqttTopicName&, const QByteArray&, quint8, bool, const QMqttPublishProperties&) QMqttTopicName("OpenZWave/1/event/setvalue/") Size: 123 bytes. QoS: 0 Retain: false [20200225 7:18:28.917 EST] [qt.mqtt.connection.verbose] [debug]: bool QMqttConnection::writePacketToTransport(const QMqttControlPacket&) DataSize: 155 [20200225 7:18:28.917 EST] [ozw.mqtt.commands.setValue] [warning]: Incorrect Field Type (Integer) for "SetValue" : Value: 5 [20200225 7:18:28.917 EST] [ozw.mqtt.commands] [warning]: Message Processing for "SetValue" failed: "{\"ValueIDKey\": 5910974621810708, \"Value\": \"Red\"}" [20200225 7:18:28.918 EST] [qt.mqtt.connection.verbose] [debug]: void QMqttConnection::transportReadReady() [20200225 7:18:28.918 EST] [qt.mqtt.connection.verbose] [debug]: Received PUBLISH [20200225 7:18:28.918 EST] [qt.mqtt.connection.verbose] [debug]: Finalize PUBLISH: topic: QMqttTopicName("OpenZWave/1/event/setvalue/") payloadLength: 123

This is the values to set the bottom status light to red is found here. Screenshot 2020-02-25 at 7 16 45 AM

I've tried both the value Red and 1.

marcelveldt commented 4 years ago

At this time you need to specify the index of the value in the list, it's a bit user unfriendly untill we fix the config panel.

Looks like the manual you're referring too is HomeSeer specific so chance this doesn't correspond with the actual configuration CC options.

TIP: Look at your MQTT messages with a tool calles MQTT Explorer and expand the Configuration Command Class. parameter = index of the config setting you want to change value = id of the value in the list or the value itself (depends on the type)

Schermafbeelding 2020-02-25 om 14 44 35

Schermafbeelding 2020-02-25 om 14 45 17

silfa718 commented 4 years ago

@marcelveldt

Okay I got this, but I am still not sure how to send the service call to make the change:

{ "Label": "Status mode LED 1 (bottom) color", "Value": { "List": [ { "Value": 0, "Label": "Off" }, { "Value": 1, "Label": "Red" }, { "Value": 2, "Label": "Green" }, { "Value": 3, "Label": "Blue" }, { "Value": 4, "Label": "Magenta" }, { "Value": 5, "Label": "Yellow" }, { "Value": 6, "Label": "Cyan" }, { "Value": 7, "Label": "White" } ], "Selected": "Off", "Selected_id": 0 }, "Units": "", "Min": 0, "Max": 7, "Type": "List", "Instance": 1, "CommandClass": "COMMAND_CLASS_CONFIGURATION", "Index": 21, "Node": 6, "Genre": "Config", "Help": "Sets the Status mode LED color", "ValueIDKey": 5910974621810708, "ReadOnly": false, "WriteOnly": false, "ValueSet": false, "ValuePolled": false, "ChangeVerified": false, "Event": "valueAdded", "TimeStamp": 1582609396 }

isabellaalstrom commented 4 years ago

Can you make an example service call from the screenshot you provided @marcelveldt so that we understand better?

isabellaalstrom commented 4 years ago

In this example, how would I change this volume from 100? image

isabellaalstrom commented 4 years ago

I managed to change my config! You need to be looking in "Instance" 1. And then you get the "index" parameter from the view shown above. I now only have trouble figuring out the value since its a bunch of numbers and this really should help but doesn't :D https://community.home-assistant.io/t/aeotec-doorbell-6-zw162/126673/2

isabellaalstrom commented 4 years ago

Also if you want to change anything from instance 2, that's not possible?

isabellaalstrom commented 4 years ago

Answer my self as I get answers in other places :) This is how I change the one in my screenshot above, since its a switch command class, not config... image

kpine commented 4 years ago

Another way change values ~(not config parameters yet)~ would be with OZW Admin. Downloads are available here.

The lingering question is how will these devices be represented in HA? There's no "siren" type (yet?). Closest thing seems to be a media player?

kpine commented 4 years ago

Looks like there is a Doorbell integration, and something like Ring has the concept of a "SirenSwitch", which allows you to turn on/off sirens via a switch. Not sure how volume would work.

marcelveldt commented 4 years ago

Another way change values (not config parameters yet) would be with OZW Admin. Downloads are available here.

The lingering question is how will these devices be represented in HA? There's no "siren" type (yet?). Closest thing seems to be a media player?

Yeah, we're still discussing about that. Media_player seems to be our best bet. Same questions arise at ZHA (Zigbee).

OZW Admin is your best bet atm to change config values until we're a bit further with the hass implementation.

marcelveldt commented 4 years ago

Can you make an example service call from the screenshot you provided @marcelveldt so that we understand better?

You've answered your own question ;-) You were not trying to set a config value but a Command Class value.

isabellaalstrom commented 4 years ago

@marcelveldt Yes :D It's a bit confusing at first..

silfa718 commented 4 years ago

Answer my self as I get answers in other places :) This is how I change the one in my screenshot above, since its a switch command class, not config... image

Thanks for this....pointed me in the right direction and got mine to work as well!

silfa718 commented 4 years ago

Can you make an example service call from the screenshot you provided @marcelveldt so that we understand better?

You've answered your own question ;-) You were not trying to set a config value but a Command Class value.

Closing this, the issue was trying to use the wrong function.