firsttris / homebridge-hyperion-light

:collision: Homebridge plugin to use Hyperion as HomeKit accessory
MIT License
8 stars 2 forks source link

Add second instance. #9

Open daaf84 opened 6 years ago

daaf84 commented 6 years ago

Hi,

I'v tried to add an second instance. I have the lights behind the tv (19444), but also AtmoOrb, on channel 19446.

How do I do this, if I try, it's not working. And the 19444 channel is responding really slow.

I did this:

"accessories": [
            {
           "accessory": "Hyperion",
           "autoupdate": "true",
           "name": "TV Backlight",
           "ambilightName": "TV Ambilight",
           "host": "192.168.1.10",
           "port": "19444"
            },
            {
            "accessory": "Hyperion",
            "name": "AtmoOrb",
            "host": "192.168.1.10",
            "port": "19446"
            }
firsttris commented 6 years ago

holla,

are you sure the atmoOrb has the same JSON API as a Hyperion Ambilight?

is it working with atmoOrb only ? if no: is there an iOS app with which you can control the AtmoOrb? if yes: any errors from the log?

is the second device appearing on the homebridge?

regards tristan

daaf84 commented 6 years ago

AtmoOrb is an extension of Hyperion over WiFi by an ESP8266. The config is on the same raspberry and is forwarded to port 19446, local and then send as multicast over Wifi. If I use the hyperion app on iPhone, I can control them independently. So, the connection is right. It shows up in homebridge, but it won't connect. I also looks like all other things on homebridge are failing if I add this extra instance. But no errors in the log... So thats weird....

firsttris commented 6 years ago

Is it working with the AtomOrb Accessory only?

daaf84 commented 6 years ago

I've just tested it and it is working alone, so there is something about the placement of the code I think that is interfering. ..

daaf84 commented 6 years ago

Ok, I'v re the logfiles better... There is an issue, but I don't know how to solve it:

Dec 11 18:30:57 raspberrypi homebridge[2118]: /opt/node/lib/node_modules/homebridge-hyperion-light/index.js:46
Dec 11 18:30:57 raspberrypi homebridge[2118]:                 this.ambilightService.updateCharacteristic(Characteristic.On, 0);
Dec 11 18:30:57 raspberrypi homebridge[2118]:                                      ^
Dec 11 18:30:57 raspberrypi homebridge[2118]: TypeError: Cannot read property 'updateCharacteristic' of undefined
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at lightService.getCharacteristic.on (/opt/node/lib/node_modules/homebridge-hyperion-light/index.js:46:38)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at emitMany (events.js:127:13)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at emit (events.js:201:7)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at Characteristic.setValue (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:292:10)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at Bridge.<anonymous> (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:812:22)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at Array.forEach (native)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at Bridge.Accessory._handleSetCharacteristics (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:757:8)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at emitMany (events.js:127:13)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at HAPServer.emit (events.js:201:7)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at HAPServer._handleCharacteristics (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at HAPServer.<anonymous> (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at emitNone (events.js:86:13)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at IncomingMessage.emit (events.js:185:7)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at endReadableNT (_stream_readable.js:974:12)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at _combinedTickCallback (internal/process/next_tick.js:80:11)
Dec 11 18:30:57 raspberrypi homebridge[2118]:     at process._tickCallback (internal/process/next_tick.js:104:9)
Dec 11 18:30:57 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE
Dec 11 18:30:57 raspberrypi systemd[1]: homebridge.service: Unit entered failed state.
Dec 11 18:30:57 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'.
Dec 11 18:31:07 raspberrypi systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Dec 11 18:31:07 raspberrypi systemd[1]: Stopped Node.js HomeKit Server.
Dec 11 18:31:07 raspberrypi systemd[1]: Started Node.js HomeKit Server.
daaf84 commented 6 years ago

Hi Tristan,

Have you had time to look at the problem? Thanks, Dave