Bought these relative cheap BLE-only blinds drivers from aliexpress:
As the BLE range is not that great, I wrote a small Node application which runs on a Rpi 3B+ close to the blinds. It accepts commands through Mqtt and implements mqtt cover discovery for Home-Assistant integration.
At this point I was only able to reverse engineer open,close and stop command, but actually that’s enough for me
Error: Cannot find module ‘/usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
On which hardware/OS are you running? Mayb try to reinstall non-globally using ‘sudo npm install https://github.com/binsentsu/am43-ctrl’ into directory of choice…
How did you manage to reverse engineer BLE communications? I’m looking at doing something similar for another product (SwitchRobot) that runs on BLE-only and doesn’t come with a hub.
Enable Bluetooth snoop logging in developer options of android phone. After performing communication to device through app, you can inspect the snooped logs through WireShark.
SyntaxError: Unexpected token =
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
Error: libnode.so.64: cannot open shared object file: No such file or directory
at Object.Module._extensions…node (internal/modules/cjs/loader.js:805:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/pi/.npm-global/lib/node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
Don’t know if it’s possible if your running home-assistant through it’s dedicated operating system (HassOS), because this hasn’t full blown capabilities of a raspbian image. But if you run Hass.io on a generic linux host (they call it Home Assistant Supervised nowadays), you can just self install nodeJS and install the package through npm like described on github page.
This is awesome. Thanks for putting this together. Can someone tell me how I can get the MAC address of the devices? I don’t have an android device, so I can’t use nrfconnect :(. Any help would be super appreciated!
Worked a treat. I spent ages trying to figure out why I was getting “noble warning: unknown peripheral 0289a1xxxxxx”. Turns out, I needed to do “hciconfig hci0 reset” to get it working.
I got everything up and running last night, although today I’m struggling to connect, my logs are full of:
2020-03-29T15:48:30.245Z am43:02b0b69xxxx AM43 connected for data reading
2020-03-29T15:48:30.279Z am43:02b0b69xxxx disconnected for data reading
2020-03-29T15:48:30.279Z am43:02b0b69xxxx Reading data unsuccessful, retrying in 1 second…