New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin makes homebridge server restarting #13
Comments
Update:
TypeError: Cannot read property 'writeAsync' of null TypeError: Cannot read property 'writeAsync' of null TypeError: Cannot read property 'writeAsync' of null TypeError: Cannot read property 'writeAsync' of null [9/11/2020, 8:44:33 PM] Got SIGTERM, shutting down Homebridge... |
This looks like an error that can occur when it can discover but not connect to the motor. Try to make sure the blinds engine app is closed on all devices (swipe up). The motor only supports 1 device connected. |
Thanks for the tip. Unfortunately blinds engine app is for sure closed and not making this problem. There might be another issue somewhere on my side. As I mentioned in the "overcoming 5 min shutdown" issue post - I am connecting to the BT devices via remote Raspbery PI. I'm using this RPI as a USB over IP device (homebridge is running inside the VM on a freenas server and somewhere on the LAN sits RPI with BT usb dongle which is exposed over IP to the homebridge server - see more info here if you are interested: https://derushadigital.com/other%20projects/2019/02/19/RPi-USBIP-ZWave.html) Today I was messing around with the bluetooth libraries (because of the bt xiaomi hygrothermograph I got recently) and I might broke something for the blinds motor. I'll investigate this further and get back once I'll solve it. Thanks! |
I forgot to comment on this issue: I did an update yesterday that could possibly fix this as well. |
Plugin still keeps crashing the whole homebridge. To be sure, I reinstalled the plugin, but unfortunately, it keeps crashing. This is a bummer, since I possible found the solution to overcome that 5 min autostop. Output in the console: TypeError: Cannot read property 'writeAsync' of null [10/5/2020, 5:25:36 PM] Got SIGTERM, shutting down Homebridge... |
FYI for anyone interested on that 5 min limit - I intend to use combination of:
First that came to my mind is having a fake switches to open and close and those switches will set timer that will virtually keep pressing up or down for pre-set period of time. |
Interestingly it looks like it always crash during scanning for the Xiaomi hygrotermograph. Not sure if it's related (probably it is), but the TypeError and HB restart always pops up after "[Temperature & Humidity] Start scanning.". Always. Console output: TypeError: Cannot read property 'writeAsync' of null [10/5/2020, 5:41:18 PM] Got SIGTERM, shutting down Homebridge... |
I do not have the Xiaomi hygrothermograph. Could you download the nRF Connect app on an iPhone (or Android) and see if there are UUIDs of Services or characteristics that are the same between the Xiaomi hygrothermograph and the blinds engine? |
@renssies I started an experimental branch a couple of weeks back where I tried to look into these things at https://github.com/neil-morrison44/homebridge-am43-blinds/tree/nm/slats_experiment There's some stuff that's probably worth PRing into here but it wasn't the "fix everything" solution I was looking for (nor did I actually experiment with slats...)
Have a look, see what you think - on the whole it's not much of an improvement stability-wise to what I was getting on the master branch on the Raspberry Pi 3. (Also only tested on the Raspberry Pi 3). |
@neil-morrison44 Sorry for the late reply, I'm working on something with a rather tight deadline but I finally have some time off. Like I'm said I'm not that good at JavaScript/Node so every change that others think is an improvement I will accept. As long as the user doesn't have to reconfigure anything I'm happy to merge it into If you're not comfortable with that I could also make a |
Hi @renssies , sorry for late reply. After a while I decided to throw away the setup I had and just went with pure Homebridge on rpi. However, the log is flooded with these: FYI I'm using:
|
Hmm, this is once again something I can't reproduce on my end. However, I did see an issue from Neil (#20) that might be related to this. |
I've not actually seen the |
Hi guys, I'm back at the beginning. As I mentioned before, I changed the setup and I'm running pure homebridge on raspbery pi with BT dongle plugged directly to rpi. Now, everytime when homekit (or homberidge) loads the status from the plugin, it crashes the homekit. Once I open homekit, or loads accessories in homebridge there is this error in the logs and HB crashes: I have to stop using the plugin unfortunately, since it's making my whole HB unstable and unusable. @renssies if you need something from me to help you debug the issue, just let me know. I'll do my best to help. |
When I go into the accessories view in the HB web view after few seconds the server is hit by this error end then it restarts:
TypeError: Cannot read property 'writeAsync' of null
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 AM43Device.prepareAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:196:16)
at Noble. (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:136:16)
TypeError: Cannot read property 'writeAsync' of null
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 AM43Device.prepareAsync (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Device.js:196:16)
at Noble. (/usr/lib/node_modules/homebridge-am43-blinds/lib/AM43Platform.js:136:16)
[9/11/2020, 8:28:13 PM] Got SIGTERM, shutting down Homebridge...
[9/11/2020, 8:28:13 PM] [am43-blinds] Homebridge is shutting down, disconnecting AM43 motors and saving state
The text was updated successfully, but these errors were encountered: