Closed drosenberg-gh closed 3 years ago
I got similar issue if the device i had used to set up the AM43 motor with is close to the motor and bluetooth enabled. Try switching off bluetooth on the phone or tabled you used to set the limits and see if the problems goes away.
The issue I have now is that I have to relocate the Pi 4 - and the bluetooth range isn't great :P
You can also close (as in Swipe up) the blinds engine app on all devices to disconnect it and make it available to the plugin.
@torroa I've heard that disabling WiFi (if you aren't using it) can help increase the Bluetooth range. Otherwise, you can use an external Bluetooth 4.0 adapter that is known to work on Debian and disable the built-in Bluetooth of the Raspberry Pi.
I also have the same error, but i am not home so the phone i used in the setup is not near the motor. When i restart Homebridge i can control the blinds again. Any idea how to fix this?
If you are using a Raspberry Pi you might want to check if there is a new version of the bluez-firmware. You can check this using sudo apt update
.
There was a new version of bluez-firmware ready to be installed on my PI. Let's see of it fixed the problem. Thanks for the help!
[9/10/2020, 4:07:15 PM] [am43-blinds] Started scanning for AM43 blinds, stopping in 5 seconds
[9/10/2020, 4:07:15 PM] [am43-blinds] Error: Could not start scanning, state is unknown (not poweredOn)
at Noble.scan (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/noble.js:107:21)
at Noble.startScanning (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/noble.js:136:10)
at AM43Platform.startScanningForDevices (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:171:11)
at PlatformAccessory.accessory.scanForMissingDevices (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:269:12)
at Characteristic.
Now i got a new error message in my logs i updated all my apps
Fixed it by setting the Bluetooth permissions again
I got the same (node:1779) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fe51' of undefined error again. Even after updating everything. Any idea how to fix it?
Ok I dug a bit deeper and I might have found the issue, I wasn't nullifying some stuff that I should have been doing.
Please (re)install the plugin and I hope it will be fixed. (Just performing the npm install command from the Readme is enough)
Working perfect, thanks. This is a great plugin.
I have updated to the latest plugin and now I don't see the fe51 error any longer, however, I am coming across the following one now... Anyone experiencing the same and any thoughts?
[9/20/2020, 12:52:58 PM] [am43-blinds] Stopped searching for AM43 Blinds, found 1 devices
(node:2328) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'writeAsync' of null
at AM43Device.sendCommandAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:325:44)
at AM43Device.updateBatteryStatusAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:287:16)
at Characteristic.--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2328) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@drosenberg-gh Is it also doing this when the blinds motor is next to the Pi? For me the problem is apparently range. See #16
i got this comment
(node:26224) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'writeAsync' of undefined
at AM43Device.sendCommandAsync (/usr/local/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:343:44)
at AM43Device.updatePositionAsync (/usr/local/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:299:16)
at Characteristic.
Since this issue seems to happen for more people I've created a new issue with some more information to help me find the root of this issue: https://github.com/renssies/homebridge-am43-blinds/issues/21.
I will be closing this issue because of that.
(node:1779) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fe51' of undefined at Gatt.write (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/hci-socket/gatt.js:549:60) at NobleBindings.write (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:399:10) at Noble.write (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/noble.js:421:18) at Characteristic.write (/usr/lib/node_modules/homebridge-am43-blinds/node_modules/@abandonware/noble/lib/characteristic.js:75:15) at internal/util.js:297:30 at new Promise ()
at Characteristic.write [as writeAsync] (internal/util.js:296:12)
at AM43Device.sendCommandAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:325:44)
at AM43Device.updatePositionAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:281:16)
at Characteristic. (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:461:32)
(node:1779) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)