Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set config parameter for a device due to a bug? in the UI #57

Open
Burningstone91 opened this issue Aug 1, 2020 · 16 comments

Comments

@Burningstone91
Copy link

Hi

I recently migrated to OpenZWave and love it so far, fantasticwork!. One problem though, I tried to set a config parameter for an Aeotec Multisensor. I see the config option, however, when I click on the field to edit it, I see some checkboxes inside other fields which show "temperature, humidity" etc. but I can't check or uncheck the box. Please see the picture below:

image

@SimonG-GH
Copy link

I have a similar issue - unable to set "Send interval for reporting group x" for Aeotec Smart Switch 6. Entry field doesn't seem to accept non-zero entries. Eg. I can set the field to 0, but cannot change it to anything else.

@zikeji
Copy link

zikeji commented Sep 16, 2020

Running into the same problem with the Aotec Smart Switch 6 as well - it appears the data defines the minimum as 0 and the maximum as -1. Which is why it won't change.

The actual XML defines it as 4294967295. But the tech specs define the max as 0x7FFFFFFF (which is 2147483647).

I'm using Hass.IO, so to fix this I SSH'd into the box, jumped into the docker shell for the container (docker exec -it addon_core_zwave /bin/bash, the name might differ though - use docker ps to find yours), and updated the XML file.

I had to make it writeable first.

chmod u+w /data/ozw/config/aeotec/zw096.xml
vi /data/ozw/config/aeotec/zw096.xml

Lines 140, 145, 150 - change the "max" to "2147483647".

I saved the config XML, I restarted the addon in Hass.IO's supervisor page, went to the config -> device -> zw096 page and clicked "Refresh Node".

Once I did that the values updated and the max was no longer "-1". When I went back into the ozw-admin GUI my custom settings were gone. Oh well. I was able to change the interval to 5 (my desired setting) at this point and reset the reporting groups 1, 2, & 3 to 4, 2, and 1 (W, A, V).

This did the trick!

@zikeji
Copy link

zikeji commented Sep 16, 2020

Ah. I notice #33 is also related to this issue. Putting that mention here to connect it.

There is this issue in the open-zwave repo as well: OpenZWave/open-zwave#2308

@Burningstone91
Copy link
Author

I think my issue is not related to this, I think my issue is purely a frontend issue as I'm unable to use the checkboxes and I can't enter anything into the Value field. Can I somehow set these config parameters in another way, like publishing to an MQTT topic?

@zikeji
Copy link

zikeji commented Sep 16, 2020

I think my issue is not related to this, I think my issue is purely a frontend issue as I'm unable to use the checkboxes and I can't enter anything into the Value field. Can I somehow set these config parameters in another way, like publishing to an MQTT topic?

I tried to use the OpenZWave/1/command/setValue endpoint myself but didn't have any success. You're supposed to use the value key ID and send a value.

See here: https://github.com/OpenZWave/qt-openzwave/blob/master/docs/MQTT.md#setvalue

You get the value ID key from the MQTT topic under command class. I'm going to assume your node for the sensor is 15 based on your screenshot, so you'd look under: OpenZWave/1/node/15/instance/1/commandclass - find the CommandClass COMMAND_CLASS_CONFIGURATION (it's 112 for me) then the value will include all the ValueKeyID values and which parameter they control.

If you figure it out definitely let me know since I couldn't get it working.

@kpine
Copy link

kpine commented Sep 16, 2020

The command topics are all lowercase with a trailing slash: OpenZWave/1/command/setvalue/

@zikeji
Copy link

zikeji commented Sep 16, 2020

The command topics are all lowercase with a trailing slash: OpenZWave/1/command/setvalue/

whoever made that header lowerCamelCase is the object of my ire.

@Burningstone91 it worked with that lol.

OpenZWave/1/command/setvalue/ as the public target and the JSON payload like I mentioned. Don't quote the ValueIDKey.

@Burningstone91
Copy link
Author

This did not work for me, but I'm almost sure I did something wrong xD

Here the ValueIDKey from the node (19) I wanted to change the Group1 Reports:
image
And here the info about this parameter from OZW:
image
So, I don't understand what to value to set, the MQTT CommandClass says BitSet, the OZW Admin UI says Bitmask, I'm confused, before using OZW Daemon I could just change the value to e.g. 32 to set it to report temperature only or to 1 to report battery only.
Anyways, I then published the following to OpenZWave/1/commands/setvalue/
{"ValueIDKey": 28428972976767002, "Value": 32}
{"ValueIDKey": 28428972976767002, "Value": 00100000}
And none of them worked.

@kpine
Copy link

kpine commented Sep 23, 2020

Neither 32 nor 00100000 are valid values for a BitSet (according to the docs), and you probably are getting some kind of error back as a response.

The value is an array of the bits you want to set. Note that there's a JSON syntax error in the linked docs. Here's a corrected version of what a BitSet value could be.

"Value": [
    {"Label": "<string label of the Bit you wish to change>",
     "Value": <bool>
    },
    {"Position": <position (as an integer) of the Bit you wish to change>,
     "Value": <bool>
    }
]

Can you post the complete text of the value instead of a screenshot (for the future, prefer text over screenshots)? I would expect "Value" to be showing the current bit values.

@Burningstone91
Copy link
Author

I saw the docs for BitSet formatting, but I have to admit that I have no clue how to find the "string label" or the "position" of the bit.
An example in the docs would be really helpful.

I posted a screenshot, because I was not able to copy the text from the OZW Admin GUI.
Here's the full text:

Which reports need to send automatically in timing intervals for group 1. Bitmask: 10000000 - 128 - Luminance 01000000 - 64 - Humidity 00100000 - 32 - temperature 00010000 - 16 - Ultraviolet 00000001 - 1 Battery 10100000 - 160 - Luminance and Temperature (32+128) 11110001 - 241 - All(1+16+32+64+128)

And in the MQTT explorer screenshot you can see the current value is just an empty list [].

Does this mean I need to publish one payload for each bit of the bitmask that I want to change?
Like this [{4:True}] to set the fourth bit to 1?

@SimonG-GH
Copy link

Same scenario on the same sensor. I also have [] as the current value set.
This is what I am getting from MQTT Explorer.

{ "Label": "Group 1 Reports", "Value": [], "Units": "", "ValueSet": true, "ValuePolled": false, "ChangeVerified": false, "Min": 0, "Max": 0, "Type": "BitSet", "Instance": 1, "CommandClass": "COMMAND_CLASS_CONFIGURATION", "Index": 101, "Node": 6, "Genre": "Config", "Help": "Which reports need to send automatically in timing intervals for group 1. Bitmask: 10000000 - 128 - Luminance 01000000 - 64 - Humidity 00100000 - 32 - Temperature 00010000 - 16 - Ultraviolet 00000001 - 1 - Battery 10100000 - 160 - Luminance and Temperature (32+128) 11110001 - 241 - All (1+16+32+64+128)", "ValueIDKey": 28428972758663194, "ReadOnly": false, "WriteOnly": false, "Event": "valueChanged", "TimeStamp": 1600789423 }

The other issue I am having is related to an Aeotec Switch where it seems the Min for a value is set to 0, and Max to -1.
I note that the Min = 0 and Max = 0 for this parameter as well. Same cause perhaps?

@Burningstone91
Copy link
Author

I finally got it to work, now that I read the docs again, it is clear :)
I published the following payload to OpenZWave/1/command/setvalue/

{"ValueIDKey": 28428972976767002, "Value": [{"Label": "Temperature", "Value": false}, {"Label": "Humidity", "Value": false}]}

Where ValueIDKey is the value of the topic in the commandclass 112.
However, my original issue still stands, the values can not be changed through the GUI.

@dgarciam
Copy link

Running into the same problem with the Aotec Smart Switch 6 as well - it appears the data defines the minimum as 0 and the maximum as -1. Which is why it won't change.

The actual XML defines it as 4294967295. But the tech specs define the max as 0x7FFFFFFF (which is 2147483647).

I'm using Hass.IO, so to fix this I SSH'd into the box, jumped into the docker shell for the container (docker exec -it addon_core_zwave /bin/bash, the name might differ though - use docker ps to find yours), and updated the XML file.

I had to make it writeable first.

chmod u+w /data/ozw/config/aeotec/zw096.xml
vi /data/ozw/config/aeotec/zw096.xml

Lines 140, 145, 150 - change the "max" to "2147483647".

I saved the config XML, I restarted the addon in Hass.IO's supervisor page, went to the config -> device -> zw096 page and clicked "Refresh Node".

Once I did that the values updated and the max was no longer "-1". When I went back into the ozw-admin GUI my custom settings were gone. Oh well. I was able to change the interval to 5 (my desired setting) at this point and reset the reporting groups 1, 2, & 3 to 4, 2, and 1 (W, A, V).

This did the trick!

I had to do this with my AEOTEC HEM G5. Instead of zw096, used the zw095.
It did allowed me to change the default values presented on field 101, and I changed for the maximum sum of all the values ( 4144911) but that still hasn't solve my problem. Open zwave admin shows the correct value when i refresh the node, but what i see on my panels are cumulative values and they don't change unless i reboot the addon or the HASSIO box completely

@joydashy
Copy link

Ahh I have this same issue, any word on a proper fix or is manual XML editing the only way?

@dgarciam
Copy link

Ahh I have this same issue, any word on a proper fix or is manual XML editing the only way?

In the end, i had to use openzwave - control panel. I was able to do all from there

@joydashy
Copy link

joydashy commented Nov 1, 2020

I followed zikeji's instructions and got it to work in the end. I would like to note that using "node refresh info" within the OZW admin tool broke like everything for me, but this was not necessary to get this fix to work regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants