Python plugin: Sony Bravia TV

Python and python framework

Moderator: leecollings

simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

Is this plugin working for people with the new stable release? Its crashing my Domoticz so I've had to remove it for the time being.

Many Thanks
rkx1rkx1
Posts: 4
Joined: Sunday 29 April 2018 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python plugin: Sony Bravia TV

Post by rkx1rkx1 »

Simon_rb,

Since updating to the latest stable release, the Bravia plug in from gerard33 is no longer working for me either. Which is a nightmare! I had to roll back to the previous version of Domoticz as i rely on the plug in to control the TV from home assistant. (Kids are always loosing the remote control!)

There were previous conflicts with DzVentz/PIR plugin and a python segmentation issue. I had to disable DzVentz to get it working in the previous release otherwise a restart didn't bring the Domoticz service up. It could be a similar issue again. I am following this thread to see if anyone comes up with a solution. There are other basic scripts out there that can be pulled together to give some basic functionality but i did love this plug in.


Cheers Rich
Last edited by rkx1rkx1 on Tuesday 03 July 2018 13:26, edited 1 time in total.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

Hi Rich,

Thats a shame, I was hoping it was my setup :(

I don't think the developer uses domoticz anymore so we might need a new, clever sole to take over. Hopefully I'm wrong.

Many Thanks
rkx1rkx1
Posts: 4
Joined: Sunday 29 April 2018 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python plugin: Sony Bravia TV

Post by rkx1rkx1 »

His github also states 'This plugin is no longer maintained'.

I have freshly installed the latest stable Domoticz on a separate Pi and will continue to do some testing to see if it can be fixed otherwise I may start to make my own. Will share if anything good comes of it.


Cheers Rich
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

rkx1rkx1 wrote: Tuesday 03 July 2018 13:30 His github also states 'This plugin is no longer maintained'.

I have freshly installed the latest stable Domoticz on a separate Pi and will continue to do some testing to see if it can be fixed otherwise I may start to make my own. Will share if anything good comes of it.


Cheers Rich
I noticed the same Rich, I modified the original slightly so that the volume dimmer switch when powered off would turn the TV off and powered on would turn it on. Then using HomeKit I could say turn on the living tv or set living room to to 30 etc.. Worked well :D

Good luck and if you need help testing.. let me know.

Many Thanks
User avatar
lmet
Posts: 23
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet »

For me too the plugin does not work anymore. I took over the work of StefanPuntNL (thanks to him) here and after some additions/modifications I have a lua code to turn on and off the TV and a script to change channels including channels greater than 9. It's basic nothing about sound or channel like NetFlix or other features.
It works on my Sony Bravia KDL-50W755c and with Imperihome and Homekit.
If that interests I can publish this work here.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

Hey,

Anything is better than nothing. For me the most important is controlling volume from within Domoticz

Cheers
rkx1rkx1
Posts: 4
Joined: Sunday 29 April 2018 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python plugin: Sony Bravia TV

Post by rkx1rkx1 »

I don't suppose anyone got anywhere with this did they?
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by febalci »

Ubuntu 18.04; Domoticz 4.9701 stable. The plugin still works on my android Sony.
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python plugin: Sony Bravia TV

Post by Dnpwwo »

If people with this failing on a recent beta (or last stable) enable debugging for the plugin and post some log output it might be possible to diagnose the problem.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
User avatar
lmet
Posts: 23
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet »

Maybe a conflict related to version 3.5 of python and stretch see here at "Troubleshooting" section.
Tested successfully with another python plugin. Not with this one because I'm using lua code now.
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python plugin: Sony Bravia TV

Post by Dnpwwo »

That information is out of date and I have updated the wiki page.

Issues on Stretch were SSL library related and were resolved prior to the last stable release.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
rkx1rkx1
Posts: 4
Joined: Sunday 29 April 2018 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python plugin: Sony Bravia TV

Post by rkx1rkx1 »

After a day of fiddling (installing domoticz from source/different raspian versions) I managed to get the Sony-Bravia plugin working.

I used etcher to install the latest stretch lite onto a 64gb class 10. Expanded the filesystem and set all the settings correctly in Raspi-config.

Did the easy install of domoticz curl -L install.domoticz.com | sudo bash

Do all the other config bits you normally do to get you up and running (Upload database/configure your hardware/install apache and certbot ssl etc.)

Then the key for me was to sudo apt-get install python3-dev this stopped the complaining about (Failed dynamic library load, install the latest libpython3.x library)

Do not bother changing the libpython version or running a -dev this only makes things worse and any python plugin seems to crash the system.

Now I have the latest Stable with working plugins. There are quite a few lua scripts out there that can fulfil most of these just from EVENTS in domoticz. For those that dont get that involved the above is working a treat for me.
Sony plug in.png
Sony plug in.png (74.28 KiB) Viewed 2444 times
User avatar
lmet
Posts: 23
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet »

Dnpwwo wrote: Sunday 29 July 2018 23:26 That information is out of date and I have updated the wiki page.

Issues on Stretch were SSL library related and were resolved prior to the last stable release.
Maybe only one eye is not enough ;) Never talk about SSL library but python version issue.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

rkx1rkx1 wrote: Wednesday 01 August 2018 16:29 After a day of fiddling (installing domoticz from source/different raspian versions) I managed to get the Sony-Bravia plugin working.

I used etcher to install the latest stretch lite onto a 64gb class 10. Expanded the filesystem and set all the settings correctly in Raspi-config.

Did the easy install of domoticz curl -L install.domoticz.com | sudo bash

Do all the other config bits you normally do to get you up and running (Upload database/configure your hardware/install apache and certbot ssl etc.)

Then the key for me was to sudo apt-get install python3-dev this stopped the complaining about (Failed dynamic library load, install the latest libpython3.x library)

Do not bother changing the libpython version or running a -dev this only makes things worse and any python plugin seems to crash the system.

Now I have the latest Stable with working plugins. There are quite a few lua scripts out there that can fulfil most of these just from EVENTS in domoticz. For those that dont get that involved the above is working a treat for me.Sony plug in.png
Are we saying its a Python issue? Wonder if I can remove python from my Jessie setup and start fresh with that?!? I have a lot setup on my Raspberry Pi and to change it to Stretch would be a pain. I try not to update until its absolutely necessary lol

Cheers
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Python plugin: Sony Bravia TV

Post by simon_rb »

rkx1rkx1 wrote: Wednesday 01 August 2018 16:29 After a day of fiddling (installing domoticz from source/different raspian versions) I managed to get the Sony-Bravia plugin working.

I used etcher to install the latest stretch lite onto a 64gb class 10. Expanded the filesystem and set all the settings correctly in Raspi-config.

Did the easy install of domoticz curl -L install.domoticz.com | sudo bash

Do all the other config bits you normally do to get you up and running (Upload database/configure your hardware/install apache and certbot ssl etc.)

Then the key for me was to sudo apt-get install python3-dev this stopped the complaining about (Failed dynamic library load, install the latest libpython3.x library)

Do not bother changing the libpython version or running a -dev this only makes things worse and any python plugin seems to crash the system.

Now I have the latest Stable with working plugins. There are quite a few lua scripts out there that can fulfil most of these just from EVENTS in domoticz. For those that dont get that involved the above is working a treat for me.Sony plug in.png
Hey,

Got this semi-working but have you noticed there is no volume slider anymore?

To get this working I followed your instructions.

Cheers

Update:- Just seen volume slider False in the settings... Whoops my bad
daan256
Posts: 10
Joined: Sunday 01 March 2015 13:49
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by daan256 »

Wanted to add the plugin to my latest stable domoticz. However can't seem to find to add it in the hardware tab... it's not listed.
Any work around available?

Looking forward to some hints.

Much appreciated.
antipiot
Posts: 45
Joined: Wednesday 03 January 2018 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Switzerland
Contact:

Re: Python plugin: Sony Bravia TV

Post by antipiot »

Hello Everybody!

Just installed this plugin on latest stable: My TV is a Sony KD-60XF8305

Everything connects fine and every control i've tested so far work but......

when i shutdown TV using plugin: i can't power it ON back using domoticz; remote control immediately wake the TV back.

Here's what i got in log using debug:
2018-10-02 17:51:08.254 Status: User: admin initiated a switch command (305/TV - Status/Off)
2018-10-02 17:51:12.415 (TV) Pushing 'onCommandCallback' on to queue
2018-10-02 17:51:12.438 (TV) Processing 'onCommandCallback' message
2018-10-02 17:51:12.439 (TV) Calling message handler 'onCommand'.
2018-10-02 17:51:12.439 (TV) onCommand called for Unit 1: Parameter 'On', Level: 0
2018-10-02 17:51:12.414 Status: User: admin initiated a switch command (305/TV - Status/On)
2018-10-02 17:51:21.674 (TV) Pushing 'onCommandCallback' on to queue
2018-10-02 17:51:21.705 (TV) Processing 'onCommandCallback' message
2018-10-02 17:51:21.705 (TV) Calling message handler 'onCommand'.
2018-10-02 17:51:21.705 (TV) onCommand called for Unit 1: Parameter 'On', Level: 0
2018-10-02 17:51:21.673 Status: User: admin initiated a switch command (305/TV - Status/On)
2018-10-02 17:51:24.065 (TV) Pushing 'onHeartbeatCallback' on to queue
2018-10-02 17:51:24.109 (TV) Processing 'onHeartbeatCallback' message
2018-10-02 17:51:24.109 (TV) Calling message handler 'onHeartbeat'.
2018-10-02 17:51:24.122 (TV) Status TV: standby
2018-10-02 17:51:54.074 (TV) Pushing 'onHeartbeatCallback' on to queue
2018-10-02 17:51:54.076 (TV) Processing 'onHeartbeatCallback' message
2018-10-02 17:51:54.076 (TV) Calling message handler 'onHeartbeat'.
2018-10-02 17:51:54.090 (TV) Status TV: standby

Any hint?

Nervermind:



User avatar
G3rard
Posts: 827
Joined: Wednesday 04 March 2015 22:15
Target OS: Linux
Domoticz version: V3.8153
Location: The Netherlands
Contact: Contact G3rard

Python plugin: Sony Bravia TV

Post by G3rard » Thursday 10 August 2017 20:50
Enter 'Android' (without quotes) in the MAC address field on the Hardware page in Domoticz and press Update.
Then turning the TV on should work.

To make localtest.py work, enter 'chmod +x localtest.py' on the command line via SSH. Then ./localtest.py should work.

Works perfectly! You can add Sony Android TV KD-60XF8305 as working
kdschlosser
Posts: 15
Joined: Sunday 23 April 2017 3:14
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by kdschlosser »

Because this plugin is no longer being maintained. And I have seen some posts from people possibly remaking this plugin.

This should help you. It exposes every single feature of the Sony TV's. I do mean everything.

https://github.com/kdschlosser/SonyAPI. There is a branch that I started work on and I have not finished up yet. the branch contains code that expands the library to include all Sony products that have the capability of bring controlled over IP
alarm_guy1
Posts: 132
Joined: Tuesday 14 January 2014 0:03
Target OS: Linux
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by alarm_guy1 »

I know this is an old thread and Github declares this as "No longer maintained", however does anyone know in Blockly how to change the source.

I have as per the attached image and it wont change the input.

cheers
Attachments
blockly 1.jpg
blockly 1.jpg (40.49 KiB) Viewed 1327 times
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest