Skip to content
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

Characteristic Write Request failed: Request attribute has encountered an unlikely error #70

Closed
DJay-X opened this issue Aug 25, 2019 · 2 comments

Comments

@DJay-X
Copy link

DJay-X commented Aug 25, 2019

@hannseman
Hope you are doing well.

I noticed today when my Homebridge ist running (only with homebridge-mi-hygrothermograph), that I can't start any other commands using command line with gatttool.

For example I try to controll a SwitchBot which workes great when homebridge is not running.

gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570101

But at that moment homebridge is running, it is running nothing works with the command anymore.

pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570101
Characteristic value was written successfully
pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570102
Characteristic value was written successfully
pi@pi-zero:~ $ sudo systemctl start homebridge
pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570101
Characteristic Write Request failed: Request attribute has encountered an unlikely error
pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570102
Characteristic Write Request failed: Request attribute has encountered an unlikely error
pi@pi-zero:~ $ sudo systemctl stop homebridge
pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570101
Characteristic value was written successfully
pi@pi-zero:~ $ gatttool -t random -b C3:6D:2E:21:5E:4A --char-write-req -a 0x0016 -n 570102
Characteristic value was written successfully

pi@pi-zero:~ $ gatttool -t random -b C4:6F:2E:20:7E:5A --char-write-req -a 0x0016 -n 570102
connect: Device or resource busy (16)

Or HB Log

Aug 25 20:39:33 pi-zero homebridge[1234]: [8/25/2019, 8:39:33 PM] Homebridge is running on port 58569.
Aug 25 20:39:33 pi-zero homebridge[1234]: [8/25/2019, 8:39:33 PM] [Raumklima] Start scanning.
Aug 25 20:39:33 pi-zero homebridge[1234]: [8/25/2019, 8:39:33 PM] [Raumklima Esszimmer] Start scanning.
Aug 25 20:39:33 pi-zero homebridge[1234]: [8/25/2019, 8:39:33 PM] [Raumklima Schlafzimmer] Start scanning.
Aug 25 20:39:34 pi-zero homebridge[1234]: noble warning: unknown handle 64 disconnected!
Aug 25 20:40:05 pi-zero homebridge[1234]: [8/25/2019, 8:40:04 PM] [Config] Homebridge Config UI X v4.6.1 is listening on :: port 8080
Aug 25 20:40:57 pi-zero homebridge[1234]: [8/25/2019, 8:40:57 PM] [Raumklima] Stopped scanning.
Aug 25 20:40:57 pi-zero homebridge[1234]: [8/25/2019, 8:40:57 PM] [Raumklima Esszimmer] Stopped scanning.
Aug 25 20:40:57 pi-zero homebridge[1234]: [8/25/2019, 8:40:57 PM] [Raumklima Schlafzimmer] Stopped scanning.
Aug 25 20:41:00 pi-zero homebridge[1234]: [8/25/2019, 8:41:00 PM] [Raumklima] Start scanning.
Aug 25 20:41:00 pi-zero homebridge[1234]: [8/25/2019, 8:41:00 PM] [Raumklima Esszimmer] Start scanning.
Aug 25 20:41:00 pi-zero homebridge[1234]: [8/25/2019, 8:41:00 PM] [Raumklima Schlafzimmer] Start scanning.

I already set the "updateInterval": 300, in config.json but that didn't make any difference.

Gatttool should be able to handle multiple connections.

Do you have any idea? I very much appreciate your feedback.
Thanks.

@hannseman
Copy link
Owner

Hi! Yes I've seen some behaviour like this on my end as well. I think it might be an issue in the library noble that this plugin uses. See the following issues that mention the same kind of errors:
WebThingsIO/thing-url-adapter#60
WebThingsIO/gateway#1437

Unfortunately this is probably not something that can be fixed in this plugin but in noble. Noble is not very actively maintained at the moment but I think you should open an issue there and see if you get any feedback.

@hannseman
Copy link
Owner

Closing this issue for now. Let me know if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants