This plugin is no longer maintained.
Domoticz Python plugin for Sony Bravia TV
This plugin uses the Sony Bravia RC API by Antonio Parraga Navarro. Also a lot of inspiration came from this post by StefanPuntNL.
- Information
- Sony Bravia plugin instructions
- Screenshots
- Testing the plugin
- Confirmed working on the following TV´s
The plugin will show information from your Sony Bravia TV in Domoticz. It will work on Sony Bravia models 2013 and newer. Also tested on a number of Android models, see the list below. When using an Android you can enter 'Android' in the MAC field, so you can also switch the TV on via Domoticz.
Information on the TV channel and program are only showed when you use the built-in TV tuner. Otherwise for example HDMI1 will be shown.
The volume slides shows the volume of the built-in speakers. If you have an amplifier attached to your TV, that volume is not shown. You can use the on/off button of the slider switch though to mute/unmute the TV, also if you have the TV connected to an amplifier.
The remote control in the Status switch gives some extra options. See the screenshot below for extra info on some of the buttons.
Works with Pre-Shared Key (PSK). The default PSK you can use is 'sony', but you can change the PSK to something else. If you change it, remember to also change the PSK in the Domoticz hardware page.
-
Enable remote start on your TV: [Settings] => [Network] => [Home Network Setup] => [Remote Start] => [On]
-
Enable pre-shared key on your TV: [Settings] => [Network] => [Home Network Setup] => [IP Control] => [Authentication] => [Normal and Pre-Shared Key]
-
Set pre-shared key on your TV: [Settings] => [Network] => [Home Network Setup] => [IP Control] => [Pre-Shared Key] => sony
-
Give your TV a static IP address, or make a DHCP reservation for a specific IP address in your router.
-
Determine the MAC address of your TV: [Settings] => [Network] => [Network Setup] => [View Network Status]
The IP address, PSK and MAC address need to be entered in the Domoticz hardware page, see screenshot below.
See this link for more information on the Domoticz plugins. This plugin works with the old and new version of the Python framework in Domoticz.
-
SSH to your server on which Domoticz is installed
-
Enter the following commands
cd domoticz/plugins
git clone https://github.com/gerard33/sony-bravia.git
- When updating to the latest version on Github enter the following commands
cd domoticz/plugins/sony-bravia
git pull
- Restart the Domoticz service
sudo service domoticz.sh restart
- Now go to Setup, Hardware in your Domoticz interface. There you add Sony Bravia TV.
Make sure you enter all the required fields.
Field | Information |
---|---|
IP address | Enter the IP address of your TV (see instructions above how to find the IP address, also make sure it is static) |
Pre-shared key | Enter the Pre-shared key here (default is sony). If you have issues using a PSK you can try to use the cookie method at the cookie branch, thanks to markcame for implementing this |
MAC address | Enter the MAC address of your TV (see instructions above how to find the MAC address). If you have an Android TV you can enter 'Android' (without quotes) in the MAC field. This way the plugin will use another method to switch on the TV. |
Volume bar | Option to enable or disable a Domoticz device for the volume bar, this can be used to control the volume of the TV, but only for the built-in speakers of the TV |
Update interval | Enter the update interval in seconds, this determines with which interval the plugin polls the TV (must be between 10 and 30 seconds) |
Debug | When set to true the plugin shows additional information in the Domoticz log |
After clicking on the Add button the devices are available in the Switches tab.
To do some easy testing with the plugin there is a localtest.py
script that can be run from the command line.
Make sure you enter the IP address and PSK of your TV in localtest.py
before executing it.
After that you can check if your TV works with the plugin.
cd domoticz/plugins/sony-bravia
./localtest.py
This will print some information regarding the TV to the console.
Thanks to ffes for localtest.py
which is part of his Buienradar Python script.
-
KDL-50W829B
-
KDL-42W705B
-
KDL-55W805C
-
KD-55X9005B
-
KDL-42W805A --> with the use of cookies, check this for more information
-
KDL-60W605B
-
KD-49XD8305 Android
-
KD-55X8509C Android
-
KD-55SD8505 Android
-
KD-55XD8505 Android
-
KD-55XD8005 Android
-
KDL-50W755c Android