seydx / homebridge-bravia-tvos

Homebridge plugin for Sony Bravia Android TVs
MIT License
345 stars 32 forks source link

TVs are on different Homebridge instance port after every homebridge reboot #173

Open nathanoday opened 2 years ago

nathanoday commented 2 years ago

I have successfully configured three Bravia TVs with my instance of homebridge, and I am using accessory control to control them via AID and IID. However, after every homebridge restart, I look in the accessory settings and see that each TV has a different value in the "Homebridge Instance Port" field than it did before the restart, making it impossible to target via CLI. I have not setup homebridge to run with multiple instances. Why would just the Bravia TVs be showing each on their own instance port and randomly be assigned new ones after each reboot of homebridge?

finnstoll commented 2 years ago

I don't know if it helps with your problem, but I had a similar issue and realized that this is not a problem with the plugin but with Homebridge as it seems to randomly select ports for accessories. You can define a port range for accessories in your Homebridge config like this:

"ports": { "start": 52100, "end": 52150, "comment": "This section is used to control the range of ports that separate accessory (like camera or television) should be bind to." },