mruiter / com.neo

Homey Z-Wave Neo Coolcam Support
7 stars 10 forks source link

Error when setting motion sensor to low sensitivity #42

Closed cbho closed 6 years ago

cbho commented 6 years ago

When trying to change

sensitivity to "lower" or "lowest" with error messages "failed_to_set_motion_sensor_sensitivity_to_128_size_1" and "failed_to_set_motion_sensor_sensitivity_to_255_size_1", respectively.

Homey Firmware Version: 1.5.6-rc.7 NEO Coolcam app v2.0.3 - 11.12.17

image

faahrev commented 6 years ago

Same here...

Homey v 1.5.3 Neo v 2.0.4

jghaanstra commented 6 years ago

This is the actual stack trace. 2018-01-02 11:38:47 [err] [ManagerDrivers] [NAS-PD01ZE] [1] failed_to_set_motion_sensor_sensitivity_to_255_size_1 TypeError: "value" argument is out of bounds at checkInt (buffer.js:1185:11) at Buffer.writeIntBE (buffer.js:1317:5) at MultiSensor_PD01Z._systemSettingParser (/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js:293:10) at MultiSensor_PD01Z._parseSetting (/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js:262:30) at MultiSensor_PD01Z.configurationSet (/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js:212:23) at MultiSensor_PD01Z.onSettings (/node_modules/homey-meshdriver/lib/zwave/ZwaveDevice.js:120:16) at MultiSensor_PD01Z.__onSettings (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/Device.js:1:2316) at emitTwo (events.js:126:13) at MultiSensor_PD01Z.emit (events.js:214:7) at Driver.__onSettings (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/Driver.js:1:1341)

According to another manual the parameter for sensitivity has allowed values 1-4 instead of 8-255. That would also explain the out of bounds issue. Not sure what is the correct range though.

I forked your repo and tested it with values 1-4 and saving them dont seem to generate any error. Cant really tell if this setting now is set correctly though.

mruiter commented 6 years ago

Its not 1 to 4 The sensitivity has Always been 8 -255 (That error has been in the manual from the first start) But something seems to go wrong with signed and usigned values.

I have declared a "signed": false in de json but it seems its not accepting the 128 and up only 0-127

mruiter commented 6 years ago

Seems 2 be a bug in the Homey Zwave Mesh Driver. Peeps are already working on the enhancements of the parser. When the update is out i will post and close this issue

mruiter commented 6 years ago

Nevermind.

Added the fix myself to the mesh driver

Fixed in next version

Michielvm5 commented 6 years ago

Hallo,

Ik heb nog steeds dit probleem, ik kan de gevoeligheid wel omhoog zetten maar niet omlaag. Krijg de zelfde foutmelding als hierboven.

neo v2.0.9