normen / homebridge-bravia

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

Enhancements to allow user input for Model and Serial numbers #107

Closed Soldiiier closed 4 years ago

Soldiiier commented 4 years ago

Hello, I raised a suggestion to include the ability to customise the model and serial number exposed to HomeKit. #103

I have made the form input optional and any non input to default to Homebridge's default values of Default-Model and Default-SerialNumber.

I have forced the Manufacturer detail to be 'Sony', as this plugin is specifically designed for Sony TV.

normen commented 4 years ago

the data should be read from the TV, not entered by the user

normen commented 4 years ago

The string you need to ask the TV is right above the commented out serial number code.

Soldiiier commented 4 years ago

Got it. Will adjust

normen commented 4 years ago

Got it. Will adjust

The tricky part is getting it into the asynchronous logic of the "channel grabbing". The plugin basically makes a request for each source type and after all of them have returned creates the TV in homebridge. You will have to defer the call until that happened, probably easiest to put that in the place where the applications are scanned, thats where the code path splits anyway.

Soldiiier commented 4 years ago

Yes, much better than getting user input. I didn't know that API existed