Re: Python plugin: Sony Bravia TV
Posted: Friday 11 August 2017 15:27
I have the same issue. A restart kills the buienradar plugin.
Verzonden vanaf mijn iPad met Tapatalk
Verzonden vanaf mijn iPad met Tapatalk
Open source Home Automation System
https://forum.domoticz.com/
Good you have found this. But where you using dzVents with some active scripts? Because on my Pi3 dzVents is not disabled, but also not in use and I don't have errors when restarting Domoticz.markcame wrote: Friday 11 August 2017 15:18 Finally i find the root cause because also the buienradar plugin does not survive @ domoticz restart.
I have disabled dzVents from domoticz setting and now all is up running and survive to reboot/restart, i don't know why it happens.
Code: Select all
if Unit == 2: # TV volume
if action == 'Set':
self.tvVolume = str(Level)
_tv.set_volume_level(self.tvVolume)
elif action == "Off":
_tv.turn_off()
UpdateDevice(2, 0, str(self.tvVolume))
elif action == "On":
_tv.turn_on_command()
UpdateDevice(2, 1, str(self.tvVolume))
Code: Select all
if Unit == 2: # Use TV volume for switching on
if action == "On":
_tv.turn_on_command()
self.tvPlaying = "TV starting" # Show that the TV is starting, as booting the TV takes some time
self.SyncDevices()
Code: Select all
if Unit == 2: # TV volume and switching off
if action == 'Set':
self.tvVolume = str(Level)
_tv.set_volume_level(self.tvVolume)
elif action == "Off":
_tv.turn_off()
self.tvPlaying = "Off"
self.SyncDevices()
Thats amazing, thanks!G3rard wrote: Tuesday 15 August 2017 23:57 @simon_rb, the code checks if the TV is off and in that case only respons to unit 1 which is the TV power switch.
So your on command for unit 2 is never found.
If you add the following code after 'if self.powerOn == False:' and before 'else:' in the onCommand function then it should work.And I would change the code from your post to:Code: Select all
if Unit == 2: # Use TV volume for switching on if action == "On": _tv.turn_on_command() self.tvPlaying = "TV starting" # Show that the TV is starting, as booting the TV takes some time self.SyncDevices()Code: Select all
if Unit == 2: # TV volume and switching off if action == 'Set': self.tvVolume = str(Level) _tv.set_volume_level(self.tvVolume) elif action == "Off": _tv.turn_off() self.tvPlaying = "Off" self.SyncDevices()
I pasted the above in. Most probably the indents. It was error on line errors.G3rard wrote: Wednesday 16 August 2017 19:49 No problem, will have a look at it.
Your errors are probably caused by using tabs as indents? Or were there other errors in the log?
Mine hasn't crashed at all since using it. There was an issue with one of the example .py's in the example folder under plugins (think it's the PIR one). I deleted that anyways and it's been fine and not experienced a single crash. I'm on a raspberry pi 3 which is running Domoticz, an Open VPN, Logitech Media Server, SQL library for all the kodi's around the house, FTP server for IP Camera motion detection in domoticz, homebridge including nest for the thermostat. There are loads more I have the Rapsberry pi doing and not a single crash
It's the file script_device_PIRsmarter.py in the scripts/python folder. That file is causing crashes. So if't is in your folder you can delete it.simon_rb wrote: Saturday 19 August 2017 21:20Mine hasn't crashed at all since using it. There was an issue with one of the example .py's in the example folder under plugins (think it's the PIR one). I deleted that anyways and it's been fine and not experienced a single crash. I'm on a raspberry pi 3 which is running Domoticz, an Open VPN, Logitech Media Server, SQL library for all the kodi's around the house, FTP server for IP Camera motion detection in domoticz, homebridge including nest for the thermostat. There are loads more I have the Rapsberry pi doing and not a single crash![]()
Code: Select all
2017-08-20 19:02:17.231 Error: (Bravia) No data received from TV, probably it has just been turned off (time data '' does not match format '%Y-Success-0T%H:%M:Can you install the latest version from Github and try that?lmet wrote: Monday 21 August 2017 1:54 Hi,
For me no crash since removing "script_device_PIRsmarter.py" but many many errors in log :Code: Select all
2017-08-20 19:02:17.231 Error: (Bravia) No data received from TV, probably it has just been turned off (time data '' does not match format '%Y-Success-0T%H:%M: