dgreif / homebridge-hatch-baby-rest

A homebridge plugin for Hatch Baby Rest night light
MIT License
74 stars 19 forks source link

Scanning for Device #30

Closed sdflyguy closed 3 years ago

sdflyguy commented 3 years ago

Thank you for creating this plugin!

I'm having an issue connecting to the Hatch itself. I'm running homebridge on a RP4. I have the first Hatch with only bluetooth. I will get the following commands on startup..

[10/23/2020, 11:41:15] [ Hatch] Initializing HatchBabyRest accessory... [10/23/2020, 11:41:15] [ Hatch] Waiting for bluetooth to power on [10/23/2020, 11:41:17] [*** Hatch] Scanning for device

It stops there. It will show the command "Turning on" and "Turning off", but nothing is happening since it does not say "connected" like I saw you mention in another closed issue.

I'm also running into this problem..

pi@homebridge:/var/lib/homebridge $ sudo setcap cap_net_raw+eip $(eval readlink -f which node) unable to set CAP_SETFCAP effective capability: Operation not permitted

I've been searching and cannot figure out how to allow permission for setcap.

Any solutions you can think of?

dgreif commented 3 years ago

Since you can't give permissions using the setcap command, node can't access bluetooth properly. It looks like that command can fail depending on which user you run it as, so make sure you run it as a user that has elevated permissions. Until you run that command successfully, the plugin likely won't work for you. Sorry I can't give more detailed instructions, this is entirely dependent on your setup.

arvathrowaway commented 3 years ago

Just wanted to follow up on this. I’m running into the same issue from a default setup on an RPi from the Homebridge Rabian OS image. So, it’s not necessarily dependent on how the user is setting it up but it’s the default behavior when installing as a certain suggested way by Homebridge. The pi user apparently doesn’t have sudo capabilities OOTB.