NorthernMan54 / node-red-contrib-homebridge-automation

Homebridge and Node-RED Integration
Apache License 2.0
106 stars 18 forks source link

Shelly HomeKit accessory not listed in device dropdown #99

Open markus-fischbacher opened 2 years ago

markus-fischbacher commented 2 years ago

Hi there,

I'm operating Shelly devices (2.5, 1L and 1) with HomeKit firmware using a Hoobs bridge. I can operate the devices in HomeKit properly.

If I add a hb-node (the type does make no difference), I can't select those devices, because they aren't listed there. I've already restarted the whole programs (Hoobs, NodeRed) several times.

Any idea why the devices are not listed?

Thanks in advance for any help.

Markus

NorthernMan54 commented 2 years ago

I'm not sure if your configuration is supported. This only works with accessories exposed by homebridge, with the Insecure Flag set. I don't know if this works with Hoobs

markus-fischbacher commented 2 years ago

Does insecure mean, that it‘s about uncertified devices? That would be the cause for Shelly Homekit devices as well. Is there a log I can enable/check?

NorthernMan54 commented 2 years ago

No it means that the accessory can be accessed without going thru the pairing procedure. I don't think that this will work with the shelly firmware.

For this to work, you need to be able to grab an accessory dump like this https://github.com/NorthernMan54/homebridge-alexa#homebridge-accessory-dump

markus-fischbacher commented 2 years ago

Just tried to create a dump. Probably the rejection of the connection is the root problem.

inno@MacBook-Pro % curl -X PUT http://192.168.10.23:51826/accessories --header "Content-Type:Application/json" --header "authorization: 000-40-415"

curl: (7) Failed to connect to 192.168.10.23 port 51826: Connection refused
NorthernMan54 commented 2 years ago

Connection refused is wrong port number. The Shelly firmware likely doesn’t default to 51826

to find the port, you could use a mDNS tool like the discovery app on iOS and look for _hap services. One would be the Shelly device

markus-fischbacher commented 2 years ago

Ok, discovered port 9000. If I execute the PUT method, nothing is returned. A GET returns: {"status":-70411}%

NorthernMan54 commented 2 years ago

From the HAP Spec -70411 is insufficient authorization, was the PIN Correct

markus-fischbacher commented 2 years ago

At least I used the PIN that was shown during the HomeKit pairing. Should be the PIN or?

That's an attempt with RESTer

image
NorthernMan54 commented 2 years ago

I'm not familiar with that device, but likely yes. So these don't have an Insecure Mode that allows access without pairing but with a proper pin like Homebridge. Am thinking that these are not supported due to lack of an Insecure Mode.

markus-fischbacher commented 2 years ago

Ok, thank's (y) I'll do some further investigations.