Python Plugin Domoticz-Enigma2

Python and python framework

Moderator: leecollings

djksage
Posts: 12
Joined: Sunday 31 January 2016 15:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by djksage »

NoProfesor wrote: Monday 26 November 2018 22:49 is in pathOfPackages = '/home/pi/.local/lib/python3.5/site-packages'

what is wrong?

LOG:

Code: Select all

 2018-11-26 22:37:39.662 Error: (Enigma2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Enigma2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-11-26 22:37:39.662 Error: (VUplus) Module Import failed, exception: 'ImportError'
2018-11-26 22:37:39.662 Error: (VUplus) Module Import failed: ' Name: xmltodict'
2018-11-26 22:37:39.662 Error: (VUplus) Error Line details not available.
2018-11-26 22:38:40.667 Error: (Enigma2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Enigma2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-11-26 22:38:40.667 Error: (VUplus) Module Import failed, exception: 'ImportError'
2018-11-26 22:38:40.667 Error: (VUplus) Module Import failed: ' Name: xmltodict'
2018-11-26 22:38:40.667 Error: (VUplus) Error Line details not available.
2018-11-26 22:40:01.038 Error: VUplus hardware (8) thread seems to have ended unexpectedly
2018-11-26 22:40:30.043 Error: VUplus hardware (8) thread seems to have ended unexpectedly 
Hello, i have exactly same problem

Code: Select all

 2018-12-02 00:08:13.209 Error: (Enigma2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Enigma2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-12-02 00:08:13.209 Error: (VU+ Salon) Module Import failed, exception: 'ImportError'
2018-12-02 00:08:13.209 Error: (VU+ Salon) Module Import failed: ' Name: xmltodict'
2018-12-02 00:08:13.209 Error: (VU+ Salon) Error Line details not available. 
do you find a solution?

thanks
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by NoProfesor »

Plugin is not working,

I have simple script for checking engma2 status

Code: Select all


#!/bin/bash

	curl http://192.168.0.xxe/web/powerstate > /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living3.xml
	enigma2LivingStatus=`xmlstarlet sel -t -m '//e2instandby' -v . -n </home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living3.xml`

	if [ $enigma2LivingStatus = "true" ]
	then
	curl 'http://192.168.0.xxr:8080/json.htm?type=command&param=switchlight&idx=13&switchcmd=Off'
    		echo "$enigma2LivingStatus"
    		echo enigma2 Living is in standby

	elif [ $enigma2LivingStatus = "false" ]
	then
	curl 'http://192.168.0.xxr:8080/json.htm?type=command&param=switchlight&idx=13&switchcmd=On'
    		echo "$enigma2LivingStatus"
    		echo enigma2 Living is not in standby

	else
	curl 'http://192.168.0.xxr:8080/json.htm?type=command&param=switchlight&idx=13&switchcmd=Off'
    		echo "$enigma2LivingStatus"
    		echo enigma2 Living is in standby
    		echo enigma2 Living not found

	fi

and file


Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<e2powerstate>
	<e2instandby>
true	</e2instandby>
</e2powerstate>

Does anyone know how to run this script in domoticz to check status for 10 seconds?
keson
Posts: 4
Joined: Sunday 19 February 2017 11:07
Target OS: Linux
Domoticz version: 2021.1
Location: Czech
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by keson »

I have latest beta version 4.10427, installed python 3.4 (using it for Yamaha AVR) and it all seems to work.
I have installed the enigma2 plugin and needed to install the pip3 and xmltodict python package, all seemed to go OK.
Restarting the Domoticz I can select and add the new Hardware.
However here it ends. No new device is added and after restarting Domoticz a complete crash happens. USB GW stops working, Yamaha Receiver stops working, Enigma stops working and the whole domoticz go to offline completely. Until I remove the enigma plugin from plugins folder.

Seems to be a complete fail.

Has anybody the enigma plugin working? It would be highly appreciated as it is the last bit of my home entertainment HW I am unable to control from Domoticz (thus unable to integrate into automation).

Thanks anyone for some helpful feedback :)
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by kofec »

Try now - I have updated the repository. Turn on debug
brbr
Posts: 5
Joined: Saturday 25 August 2018 23:50
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by brbr »

I have this error on my RPI3:
2019-02-23 09:12:07.441 Error: (Enigma2) 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'.
2019-02-23 09:12:07.441 Error: (E2) Module Import failed, exception: 'ImportError'
2019-02-23 09:12:07.441 Error: (E2) Module Import failed: ' Name: plugin'
2019-02-23 09:12:07.441 Error: (E2) Error Line details not available.

Thanks
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by kofec »

Please update to latest version. And install missing module
brbr
Posts: 5
Joined: Saturday 25 August 2018 23:50
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by brbr »

same error.
2019-02-23 10:49:39.732 Error: (Enigma2) 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'.
2019-02-23 10:49:39.732 Error: (E2) Module Import failed, exception: 'ImportError'
2019-02-23 10:49:39.732 Error: (E2) Module Import failed: ' Name: plugin'
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by kofec »

Is the script "enigma2.sh" working?
brbr
Posts: 5
Joined: Saturday 25 August 2018 23:50
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by brbr »

enigma2.py yes it works.
Wait 5 seconds
Standby:
Connect via wget to website: wget -q -O - http://192.168.1.6/web/powerstate?newstate=5
b'<?xml version="1.0" encoding="UTF-8"?>\n<e2powerstate>\n\t<e2instandby>true</e2instandby>\n</e2powerstate>\n'
OrderedDict([('e2powerstate', OrderedDict([('e2instandby', 'true')]))])
brbr
Posts: 5
Joined: Saturday 25 August 2018 23:50
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by brbr »

plugin.py same error
2019-02-23 16:52:14.970 Error: (Enigma2) 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'.
2019-02-23 16:52:14.970 Error: (ee) Module Import failed, exception: 'ImportError'
2019-02-23 16:52:14.970 Error: (ee) Module Import failed: ' Name: plugin'
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by kofec »

find location of "xmltodict" and add/correct this path in plugin.py
pathOfPackages = '/usr/lib/python3.4/site-packages/' <- correct this
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by NoProfesor »

brbr wrote:plugin.py same error
2019-02-23 16:52:14.970 Error: (Enigma2) 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'.
2019-02-23 16:52:14.970 Error: (ee) Module Import failed, exception: 'ImportError'
2019-02-23 16:52:14.970 Error: (ee) Module Import failed: ' Name: plugin'
Check where the packages are installed with

$ python3 -m site
Post Reply

Who is online

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