- Spoiler: show
- I am working on my first Python plugin for a Sony Bravia TV using an existing Python script and rewrote that a little bit.
But my plugin.py keeps giving errors and I need some help to get this fixed.
There is no device created, allthough Domoticz shows a message that devices are created after adding the hardware.
The errors in the Domoticz log:I will probably have something done wrong in the plugin.py, but I have no clue left what to fix anymore.Code: Select all
2017-03-30 00:23:34.844 (Sony) Initialized version 0.1, author 'G3rard' 2017-03-30 00:23:49.153 Error: PluginList: Error 'Error document empty.' at line 0 column 0 in XML ''. 2017-03-30 00:23:55.347 (Sony) Exiting work loop... 2017-03-30 00:23:55.347 (Sony) Stopped. 2017-03-30 00:25:00.079 Error: Sony hardware (14) thread seems to have ended unexpectedly 2017-03-30 00:25:30.084 Error: Sony hardware (14) thread seems to have ended unexpectedly 2017-03-30 00:26:00.089 Error: Sony hardware (14) thread seems to have ended unexpectedly 2017-03-30 00:26:30.094 Error: Sony hardware (14) thread seems to have ended unexpectedly
Hope somebody here can point me in the right direction.
I am not a coder (but mostly understand what have I have to do or otherwise do a lot of trial and error), so please bear with me
I have enclosed the Python scripts.
* plugin.py
* bravia.py
* localtest.py
* fakeDomoticz.py
EDIT: I also placed the Python scripts on https://github.com/gerard33/sony-bravia for some easier reviewing.
localtest.py (with fakeDomoticz.py) can be used to do some testing on the CLI.
That will show that bravia.py is working fine (IP address of TV is currently hardcoded in line 39 of bravia.py). If TV is off or if you have no Bravia TV, then it will show a message that the TV is assumed off.
Additional information:
* Domoticz v3.7197 (build date 29 March)
* Ubuntu Server 14.04
* Python 3.4.3
* Other plugins (among which Kodi, Sonos, Denon) are working fine
EDIT3: plugin is live, see https://github.com/gerard33/sony-bravia