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 switch intervial #33

Open
keithmichael opened this issue May 27, 2020 · 10 comments
Open

Unable to set switch intervial #33

keithmichael opened this issue May 27, 2020 · 10 comments
Assignees

Comments

@keithmichael
Copy link

keithmichael commented May 27, 2020

Hi, I' running the latest Windows build, 104. I'm having trouble setting a config value for all of my Aeotec Smart Switch 6 devices. I'm able to adjust other values, but not 'Send Interval for Reporting Group 1' and 2, and 3.

By default the value is 600 but after you click on the field it goes to zero and you can't increase or decrease the value. Copy and paste does not work.

Loving the software so far, this is my first Issue posted on this project so forgive me if I'm missing any required info.

2020-05-27_09-38-51

@Fishwaldo
Copy link
Member

Can you check the config file for that device, find the Value entry for that and see if it has a Min/Max entry?
ozw-admin respects the min/max limits for each value, and its possible the config file has it wrong, or non-existent.

@keithmichael
Copy link
Author

Can you let me know if this is what you are looking for?
<Value genre="config" index="111" label="Send Interval for Reporting Group 1" max="4294967295" min="0" size="4" type="int" units="seconds" value="3">

@keithmichael
Copy link
Author

I have another system running HA with Zwave integrated and reviewed the same line for this working configuration.


<Value type="int" genre="config" instance="1" index="111" label="Send Interval for Reporting Group 1" units="seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="-1" value="120">
                    <Help>Defines the time interval when the defined report for group 1 is sent.</Help>

@Fishwaldo
Copy link
Member

Something looks wrong. I need to check into this

@sumur1au
Copy link

I have the same issue as well on Build 106 on windows, I had to plug my controller back into zwave2mqtt, to edit these settings.

@zikeji
Copy link

zikeji commented Sep 16, 2020

#57 (comment)

@Fishwaldo

intManager->setMaximum(internProp, value.toInt());

That seems to be relevant. I'm a frontend dev and don't work with the specifics that much, but it seems like the max value in the XML is over the max value of the int and is getting resolved to -1. Not sure if that's an issue with the XML definition in the open-zwave repo or an issue with the way ozw-admin is handling it. I'll let you take it from here.

@dgarciam
Copy link

dgarciam commented Oct 8, 2020

This error affects also Aeotec HEM G5 as well. Can't set reporting intervals on the unit. Is there a way to enable polling on the admin to do polling on this particular node? The option when i check "properties" is grayed out and for the life of me, can't seems to find a place to enable polling.

Thanks for your work

@kpine
Copy link

kpine commented Oct 9, 2020

This seems like it might be a problem with the device XML file. Also open-zwave is failing to properly validate input.

As mentioned, the definition of this value (and others like it) is:

<Value genre="config" index="111" label="Send Interval for Reporting Group 1" max="4294967295" min="0" size="4" type="int" units="seconds" value="3">

First of all, if you look at the Aeotec documentation for the Smart Switch 6, it says the max value for param 111 is 0x7FFFFFFF or 2147483647. The value in the config file is 4294967295 or 0xffffffff. So right away the XML does not match the user manual.

Second, as @zikeji mentioned, the value 4294967295 is larger than the maximum of a signed integer. open-zwave reads "int" values as 4-byte signed integers (int c-type), the maximum which would happen to be 0x7FFFFFFF (on x86_64 at least). When OZW reads the input "4294967295" it is converted to a signed integer as -1 (the sscanf system call does not complain).

I'm not sure why the value would be set so high, was it an attempt to work around something?

I would try changing the maximum to the documented value and see if that works. While you're at it, the manual also says the minimum value is 1, not 0.

<Value genre="config" index="111" label="Send Interval for Reporting Group 1" max="2147483647" min="1" size="4" type="int" units="seconds" value="3">

It also seems like something in open-zwave (the XML validator, or a runtime warning?) should catch these.

You can also skip ozw-admin by using MQTT directly to set the value. I don't think ozwdaemon validates the min/max.

@dgarciam
Copy link

dgarciam commented Oct 9, 2020

Well, i did something of the sort. I used this project to set the value to the HEM G5. Now it is working fine on HA, reporting like it is configured to do.

EDIT: Grammar and typos

@kpine
Copy link

kpine commented Oct 9, 2020

The HEM Gen5 config params don't specify a min and max, so it probably has a similar issue. If you look in your ozwcache file you'll see how that gets resolved. I'm guessing min and max are defaulted to 0, which means range validation would always fail.

<Value genre="config" index="111" label="Group 1 Interval" type="int" units="seconds" value="5">

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

No branches or pull requests

6 participants