renssies / homebridge-am43-blinds

A homebridge plugin to control the AM43 based blind motors in HomeKit
MIT License
18 stars 6 forks source link

This plugin generated a warning from the characteristic 'Target Position' #39

Closed viperet closed 3 years ago

viperet commented 3 years ago

The plugin doesn't work for me - when trying to change blinds state this is appearing in the logs:

[9/21/2021, 8:00:03 PM] [homebridge-am43-blinds] This plugin generated a warning from the characteristic 'Target Position': characteristic was supplied illegal value: number -155 exceeded minimum of 0. See https://git.io/JtMGR for more info.
[9/21/2021, 8:00:03 PM] [homebridge-am43-blinds] Error:
    at TargetPosition.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
    at TargetPosition.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1946:16)
    at TargetPosition.Characteristic.updateValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1379:20)
    at AM43Device.<anonymous> (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:342:12)
    at AM43Device.emit (events.js:400:28)
    at Characteristic.<anonymous> (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:110:16)
    at Characteristic.emit (events.js:412:35)
    at Noble.onRead (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/noble.js:437:20)
    at NobleBindings.emit (events.js:400:28)
    at NobleBindings.onNotification (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:468:8)
  AM43 Blind (02:ba:f7:8d:f0:74): --------Notification-------- +37ms
  AM43 Blind (02:ba:f7:8d:f0:74): Data received:154,168,0,50 +1ms
  AM43 Blind (02:ba:f7:8d:f0:74): --------Notification-------- +0ms
  AM43 Blind (02:ba:f7:8d:f0:74): Data received:154,168,0,50 +0ms
  AM43 Blind (02:ba:f7:8d:f0:74): --------Notification-------- +0ms
  AM43 Blind (02:ba:f7:8d:f0:74): Data received:154,169,16,0,0,0,17,0,0,0,0,1,0,0,17,0,0,0,0,34 +0ms
  AM43 Blind (02:ba:f7:8d:f0:74): --------Notification-------- +0ms
  AM43 Blind (02:ba:f7:8d:f0:74): Data received:154,169,16,0,0,0,17,0,0,0,0,1,0,0,17,0,0,0,0,34 +0ms
[9/21/2021, 8:00:07 PM] [am43-blinds] Checking for HAP interaction timeout after setting target position
renssies commented 3 years ago

Did you already setup the blind in the blinds engine app?

viperet commented 3 years ago

Yes, it works from the app. Sorry, looks you were right, somehow calibration was lost, set open/closed positions in the app again and it works now in HomeKit. Thanks, closing the issue. Maybe just provide a better error message.