Python plugin: Sony Bravia TV

Python and python framework
markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Friday 30 June 2017 22:06

Try to :
disable the plugin
delete the cache folder inside your sony plugin folder
restart the system
than re-enable the plugin.

I have the same issue... hope this can be fixed

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Friday 30 June 2017 22:07

Which other Python plugins are you using? Then I can install these as well on my system to see what is causing the error.
The Sony plugin is running for more than a day now without any issues on my system.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

vgr2
Posts: 86
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by vgr2 » Friday 30 June 2017 22:14

markcame wrote:Try to :
disable the plugin
delete the cache folder inside your sony plugin folder
restart the system
than re-enable the plugin.

I have the same issue... hope this can be fixed
How can I do this???

markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Friday 30 June 2017 22:19

vgr2 wrote:
markcame wrote:Try to :
disable the plugin
delete the cache folder inside your sony plugin folder
restart the system
than re-enable the plugin.

I have the same issue... hope this can be fixed
How can I do this???
i have the same issues after this for now the system is again up.
after disabling the plugin from hardware panel in domoticz, delete the folder __pycache__ inside your sony plugin installation folder
the i rebooted and i have re enabled the plugin....
for now the system say up

markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Friday 30 June 2017 22:27

Nothing to do after 49 minutes domoticz stop working

vgr2
Posts: 86
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by vgr2 » Friday 30 June 2017 22:34

Sorry I could not support you. I'm not an expert but would be nice if the plugin rans without errors

markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Saturday 01 July 2017 12:37

I've tryed everithing but domoticz after a while crash no error was reported on the log ! there's a way to debug ?

i've no others plugins running in domoticz

markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Saturday 01 July 2017 16:47

here the log of domoticz

Code: Select all

2017-07-01 16:21:04.909  Error: Domoticz received fatal signal 11 !...
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz() [0x1ccd8c]
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cce44]
2017-07-01 16:21:04.912  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76ac8180]


febalci
Posts: 80
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by febalci » Monday 03 July 2017 20:34

@G3rard, thank you very much for the plugin. Beginner for Domoticz here. Using your plugin with Android Bravia KD55XD8505. Everything works except for the "Switch on" command. I was an openhab user and was using a Simple IP binding for my Bravia and it was working well. Are there any plans for a Simple IP plugin or should i use an LUA script for my condition or is your plugin Simple IP already?

Thanks again ...

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Tuesday 04 July 2017 22:47

markcame wrote:here the log of domoticz

Code: Select all

2017-07-01 16:21:04.909  Error: Domoticz received fatal signal 11 !...
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz() [0x1ccd8c]
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cce44]
2017-07-01 16:21:04.912  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76ac8180]
That is a generic error which is seen at other Python plugins as well, see the following posts.
https://www.domoticz.com/forum/viewtopi ... 05#p139741
https://www.domoticz.com/forum/viewtopi ... 13#p139528

I cannot fix this in the code of the plugin. I think this has to be fixed in the Python framework.
Also seems this only occurs on a Pi, as I don't have this error on my Ubuntu 14.04 server which is running the Sony Bravia and Sonos plugins for 5 days now.
Maybe @Dnpwwo can have a look at this?
Last edited by G3rard on Tuesday 04 July 2017 23:09, edited 1 time in total.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Tuesday 04 July 2017 22:57

febalci wrote:@G3rard, thank you very much for the plugin. Beginner for Domoticz here. Using your plugin with Android Bravia KD55XD8505. Everything works except for the "Switch on" command. I was an openhab user and was using a Simple IP binding for my Bravia and it was working well. Are there any plans for a Simple IP plugin or should i use an LUA script for my condition or is your plugin Simple IP already?

Thanks again ...
Your welcome :D

Can you try the latest version 1.0 of the plugin and use "Android" as your MAC address?
Maybe the switch on then works. See also this post. I updated the code according to that post.

I have no plans to use the Simple IP control since it is a lot of work to migrate to that and it has no extra features that I would like to use.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

febalci
Posts: 80
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by febalci » Tuesday 04 July 2017 23:32

Can you try the latest version 1.0 of the plugin and use "Android" as your MAC address?
Maybe the switch on then works. See also this post. I updated the code according to that post.
Wow, i was using version 1.0 already and i might swear i tried "Android" as MAc yesterday and it didn't worked. But today magically it worked... I guess there might be some problem with the switch in the Dashboard, it barely works (i simply have no idea how) since in Switches page it always works.

Thanks again

markcame
Posts: 30
Joined: Wednesday 07 December 2016 20:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sony Bravia TV

Post by markcame » Tuesday 04 July 2017 23:43

G3rard wrote:
markcame wrote:here the log of domoticz

Code: Select all

2017-07-01 16:21:04.909  Error: Domoticz received fatal signal 11 !...
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz() [0x1ccd8c]
2017-07-01 16:21:04.912  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cce44]
2017-07-01 16:21:04.912  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76ac8180]
That is a generic error which is seen at other Python plugins as well, see the following posts.
https://www.domoticz.com/forum/viewtopi ... 05#p139741
https://www.domoticz.com/forum/viewtopi ... 13#p139528

I cannot fix this in the code of the plugin. I think this has to be fixed in the Python framework.
Also seems this only occurs on a Pi, as I don't have this error on my Ubuntu 14.04 server which is running the Sony Bravia and Sonos plugins for 5 days now.
Maybe @Dnpwwo can have a look at this?
I think you are right, the issue is in the framework, i hope this can be fixed, for now i have disabled the plugin for now, if i can help i'm available.

lmet
Posts: 11
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi
Domoticz version: v3.8153
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet » Saturday 05 August 2017 19:21

Hi,
Sorry for this beginner question but it would be very nice if someone could help me.
I'm trying to use this plugin for my Sony Bravia TV
Python seems to be Ok

Code: Select all

2017-08-05 18:25:02.759 PluginSystem: Started, Python version '3.4.2'.
On "Setup" "Hardware" I see a Sony Bravia TV (with Kodi remote)
But nothing about changing parameters like IP address PSK ...
So i choose to clic "add" and in the list button setup does nothing.
In the log in can find :

Code: Select all

2017-08-05 18:32:59.264 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-08-05 18:32:59.264 Error: (Sony) Module Import failed, exception: 'ImportError'
2017-08-05 18:32:59.264 Error: (Sony) Module Import failed: ' Name: plugin'
2017-08-05 18:34:00.734 Error: Sony hardware (25) thread seems to have ended unexpectedly 
If i try localtest.py I get

Code: Select all

No reaction of TV, assumed is off
TV status : off
I've done all the setup on my TV a KDL-50W755c

Thanks in advance

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

Re: Python plugin: Sony Bravia TV

Post by simon_rb » Sunday 06 August 2017 20:08

lmet wrote:Hi,
Sorry for this beginner question but it would be very nice if someone could help me.
I'm trying to use this plugin for my Sony Bravia TV
Python seems to be Ok

Code: Select all

2017-08-05 18:25:02.759 PluginSystem: Started, Python version '3.4.2'.
On "Setup" "Hardware" I see a Sony Bravia TV (with Kodi remote)
But nothing about changing parameters like IP address PSK ...
So i choose to clic "add" and in the list button setup does nothing.
In the log in can find :

Code: Select all

2017-08-05 18:32:59.264 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-08-05 18:32:59.264 Error: (Sony) Module Import failed, exception: 'ImportError'
2017-08-05 18:32:59.264 Error: (Sony) Module Import failed: ' Name: plugin'
2017-08-05 18:34:00.734 Error: Sony hardware (25) thread seems to have ended unexpectedly 
If i try localtest.py I get

Code: Select all

No reaction of TV, assumed is off
TV status : off
I've done all the setup on my TV a KDL-50W755c

Thanks in advance
I have just updated and have the exact same error. Any idea's anyone?

Cheers :D

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Sunday 06 August 2017 21:41

@lmet, @simon_rb,
Please download plugin.py and bravia.py from https://github.com/gerard33/sony-bravia ... evelopment to see if that works for you.
That version works here without the error message on startup.

Edit: @simon_rb confirmed that version works, so I have pushed those changes to the master brance. The latest version of the plugin is now version 1.2.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

lmet
Posts: 11
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi
Domoticz version: v3.8153
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet » Monday 07 August 2017 1:44

@G3rard same issue,
Changing type of device to Sony Bravia TV (with Kodi remote) then Update always return to Awox SmartPlug
Thanks for your help

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Monday 07 August 2017 12:31

@lmet, that looks like a browser cache issue. Can you clear browser cache and appcache?
Or open Domoticz in incognito tab to see if it solves this issue.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

lmet
Posts: 11
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi
Domoticz version: v3.8153
Location: France
Contact:

Re: Python plugin: Sony Bravia TV

Post by lmet » Monday 07 August 2017 15:42

@G3rard you were right Thanks a lot
The only thing that does'nt works is power on tv with the plugin. May be here :
img_003.jpg
img_003.jpg (60.08 KiB) Viewed 528 times
The address is entered in the file
img_004.jpg
img_004.jpg (23.63 KiB) Viewed 528 times

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

Re: Python plugin: Sony Bravia TV

Post by G3rard » Monday 07 August 2017 16:10

Do you have an Android tv?
Then enter 'Android' (without the quotes) in the PSK field in Domoticz hardware.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests