normen / homebridge-bravia

Homebridge plugin for Sony Bravia TVs (AndroidTV based ones and possibly others)
139 stars 26 forks source link

Error when starting Homebridge #82

Closed QandnotU closed 4 years ago

QandnotU commented 4 years ago

I started getting an error after updating to the latest.

Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype 'extInput:hdmi?port=1' as another Service in this Accessory.
    at Accessory._this.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:282:17)
    at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:92:41)
    at SonyTV.addInputSource (/usr/local/lib/node_modules/homebridge-bravia/index.js:269:18)
    at scannedChannels.forEach.channel (/usr/local/lib/node_modules/homebridge-bravia/index.js:296:12)
    at Array.forEach (<anonymous>)
    at SonyTV.syncAccessory (/usr/local/lib/node_modules/homebridge-bravia/index.js:294:24)
    at SonyTV.receiveNextSources (/usr/local/lib/node_modules/homebridge-bravia/index.js:360:12)
    at onSucces (/usr/local/lib/node_modules/homebridge-bravia/index.js:394:10)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-bravia/index.js:832:9)
    at IncomingMessage.emit (events.js:202:15)
QandnotU commented 4 years ago

Fixed, it was a caching issue.

QandnotU commented 4 years ago

Everything is working as expected, but since 2.0, every time I change HDMI input names in the Home app, it’s starts throwing the error above. Most of the names get reverted back and I have to clear accessory cache and restart to stabilize HomeBridge. Also, I’m seeing a lot of commits and work on this, it’s appreciated...where can I send some beer money?

normen commented 4 years ago

I didn't really plan for the channel names to be changed, I specifically disabled channel list editing so I don't know why its still possible. But if its possible anyway I can just not check for the actual name of the channel when comparing the TV and HomeKits lists to sync them.. I'll look into that.

And I just removed the paypal link from the main page, it was mainly there to remind people that they usually pay for other peoples work and time, nobody used it anyway.

QandnotU commented 4 years ago

Not channel name, input names. In my case changing HDMI 1 to Apple TV, etc. I’m not using channels, so not sure what that looks like. Assuming channels names are included along side the input names?

normen commented 4 years ago

Yeah its all the same thing, I guess technically you're right and Apple calls it an input list, not a channel list. The latest version shouldn't try to re-add channels you renamed anymore, can you try that?

QandnotU commented 4 years ago

That did the trick, thank you! You have Venmo or ApplePay?

normen commented 4 years ago

You can find the old paypal Link on an old page, for example here: https://github.com/normen/homebridge-bravia/tree/e8dbbfb6dd7bc838b693c92f4068ed342dd69bd3 But really, the fact that you're mindful enough to think of it is already enough, thank you.