kdietrich / homebridge-devolo

WARNING: this repo is not maintained anymore. Homebridge plugin for Devolo Home Control
16 stars 4 forks source link

Qubino2relay support #21

Closed KiboOst closed 6 years ago

KiboOst commented 7 years ago

Would be amazing to support Qubino 1 and 2 relay

For 2relay, I guess we will have to get two devices in Apple Home, one switch for Q1, another for Q2. Sounds good anyway.

Here is a debug file for qub2relay from php API.

qubino2relay_debug.zip

KiboOst commented 7 years ago

Had a look at the code, and it may need another approach...

You check item.properties.deviceModelUID, but q2r is a 'devolo.model.Unknown:Device' So in this case, we may look for devolo.BinarySwitch in elementUIDs and for each of them, generate a new GenericSwitchDevice with only the switch function. But, both will have the same UID and I'm not sure it will work ...

Will try to have a look at this. I may also order a Qubino 1 relay, which may report as 'Relay' like shutter, which would be lot simpler to implement. Will let you know if I get one.

KiboOst commented 7 years ago

Here we are !!

I have implemented a HBGenericSwitchDevice but when creating the second device switch:

Sep 29 13:41:59 raspberrypi homebridge[3085]: /usr/lib/node_modules/homebridge-devolo/dist/index.js:65 Sep 29 13:41:59 raspberrypi homebridge[3085]: throw err; Sep 29 13:41:59 raspberrypi homebridge[3085]: ^ Sep 29 13:41:59 raspberrypi homebridge[3085]: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: c7f8ce9c-8f49-4b6c-adeb-a26d34aa44c7

I guess if we change the UUID (adding #1, #2 for example), listening and switching won't know who is it anymore, right ?

KiboOst commented 7 years ago

ok, I got the first contact Q1 working in Apple Home ;-)

But why the hell I have not Q2 (which I don't use anyway lol) ! I guess it should be handled in the device js itself, checking #1, #2

At least I have my qubino 2 relay contact 1 in homekit !

KiboOst commented 6 years ago

Hi Kevin, any news on this ? Could we have an official release with qubino 1 relay working ? Still running mine with custom code to support it, all working nice for weeks. Just would going back to official repo ;-)

kdietrich commented 6 years ago

My plan was to create some sort of generic relay device that will cover qubino 1 and qubino 2 relays. Unfortunately qubino 2 is not working in devolo HC yet. I'm going to support qubino 1 now and the latter when devolo has full support for it.

nicoh88 commented 6 years ago

Support with v0.1.9

npm update -g --unsafe-perm homebridge-devolo