My ZWave Parameters are not set

Hi everyone,

I just created my first Homey App for my light switches. Everything is working as expected but i’m now trying to implement °Settings° panel that should set corresponding ZWave parameters on the device.

I have been able to configure initial Zwave parameters in driver.compose.json as mentioned here

“zwave”: {
“manufacturerId”: 266,
“productTypeId”: [ 4608, 4609, 12800, 16896, 28787 ],
“productId”: [ 20992, 20993, 37376, 3956 ],
“learnmode”: {
“instruction”: { “en”: “Press top button to include. Hold the left button for 8 seconds to exclude” }
},
“defaultConfiguration”: [
{
“id”: 7,
“size”: 1,
“value”: 3
},
{
“id”: 13,
“size”: 1,
“value”: 4
}
],

This anyway works only when i pair my device with homey not when i change settings in device settings page (as expected). No issues here.

Anyway,
I have been able to understand from docs that if you set parameters within driver.settings.compose.json, they should be sent to corresponding device as soon as a parameter is changed in the mobile app but this seems not working in my case.

I have a light switch which has the capability to change button colors by modifying the corresponding Zwave parameter. If I change the corresponding settings (within device settings page) with another value, this is not reflected on the device.

If i put same parameters within “ZWave Raw configuration parameters” like this: 7,1,4
this works perfectly well and immediately.

If I select this particular option from the dropdown in settings page, this parameter seems never sent to the device and button color remains the same:

Here you’ll find the corresponding part in driver.settings.compose.json

{
“id”: “7”,
“type”: “dropdown”,
“value”: “0”,
“label”: { “en”: “Off Button 1 Color” },
“values”: [
{
“id”: “0”,
“label”: { “en”: “Off” },
“value”: “0”,
“zwave”: {
“index”: 7,
“size”: 1
}
},
{
“id”: “1”,
“label”: { “en”: “Red” },
“value”: “1”,
“zwave”: {
“index”: 7,
“size”: 1
}
},

Any suggestion on what to check/modify?
Am I expecting something wrong?

Thanks,
Oreste

1 Like

bump

Hi everyone.

I have been able to solve the issue by myself and, since no-one gave any suggestion, i’d like to share what was the problem and how i solved it.

Basically, after having tried almost everything within driver.settings.compose.json i noticed that there was an empty method onSettings within device.js that was overloading the standard framework function and blocking any action on zwave parameters.

As soon as i removed this empty function from the file, homey has been able to set parameters to ZWave device as soon as a parameter was changed within driver.settings.compose.json

I’m now maintaining all parameters within driver.settings.compose.json and everything is working perfectly well.

Hope this info can be useful if you are managing a similar case