I’m working on an OpenHAB2 binding for Sony Bravia TVs. I’m doing my discovery through UPnP and it works great, but to actually control the device I must go through a pairing process:
Binding sends authorization request to the TV.
The TV displays a random authorization code on the screen.
Within a time limit of 60 seconds user must somehow provide this code to the binding.
Binding sends the code to the TV and obtains its authentication key.
I’ve reverse-engineered the protocol and I am able to implement it, but I don’t know how to fit it into the OpenHAB binding architecture and how to handle necessary user interaction.
I could really use some guidance on where to put what.
Sorry that I didn’t respond any earlier, somehow your post escaped my attention…
It is a very good question for which I do not yet have any good answer. As it concerns the concepts of the available APIs, which are now part of Eclipse SmartHome, I would suggest that you post your question at https://www.eclipse.org/forums/index.php/f/271/ and we can discuss there, what are the best options to move forwards.
I have been investigating the controlling Sony via openhab and have found you don’t need to pair it interactively. You can set a pre-shared key in the TV settings.
I was reverse engineering the api commands by capturing packets from the Video & TV SideView app on Android, but I got as far to discover auth cookies, and basic commands until i spotted this post and development progress.
Did you try to use the predefined key option that @smee204 mentions?
I haven’t had much time to work on it lately, but I basically got it to the point where the pairing and authorization work, you can turn the TV on/off and you can change the input source. Would you be interested in such a basic binding? There is much more that could be implemented, but I currently have little free time to spend on it.
I don’t mind “basic” bindings as long as they work and provide some useful functionality. If the ground work is done, it can be a good starting point for others to add more specific features on top of it. So yes, feel free to create a PR for it!