Python Plugin Domoticz-Enigma2

Python and python framework

Moderator: leecollings

ProjektC
Posts: 67
Joined: Sunday 17 December 2017 17:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Python Plugin Domoticz-Enigma2

Post by ProjektC »

Hi,

I want to send orders to my Vu Enigma2 receiver.
https://github.com/kofec/Domoticz-Enigma2
But I can't find anything under Hardware after successful installation.

I have tested the last beta and it doesn't work.
I have now installed the last stable version, and it is not possible.

Rights set to 755

What am I doing wrong?
Attachments
2.jpg
2.jpg (88.76 KiB) Viewed 7054 times
1.jpg
1.jpg (55.14 KiB) Viewed 7054 times
zicht
Posts: 251
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 2023.1+
Location: NL
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by zicht »

Hi

You need to restart domoticz
then you can select in hardware : enigma2 with kodi remote

If i look in my log it does not start (errors on XML dependencies)
So just installing the .PY file is not working ( at least for my config)

Hope it helps you moving forward
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
ProjektC
Posts: 67
Joined: Sunday 17 December 2017 17:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by ProjektC »

EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.

i have install sudo apt-get install libpython3.4
ProjektC
Posts: 67
Joined: Sunday 17 December 2017 17:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by ProjektC »

sudo apt-get install python3-dev

2017-12-26 11:03:39.919 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'.
2017-12-26 11:03:39.919 Error: (Vuplus) Module Import failed, exception: 'ImportError'
2017-12-26 11:03:39.919 Error: (Vuplus) Module Import failed: ' Name: xmltodict'

;(
arnoldg
Posts: 15
Joined: Tuesday 29 September 2015 20:35
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Almelo, netherlands
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by arnoldg »

I have a total crash of domoticz after adding the hardware.
After reboting, domoticz won't start.

only after deleting the plugin domoticz starts again.
Running Domoticz on a RP2, beta v3.8796

what could be wrong
ProjektC
Posts: 67
Joined: Sunday 17 December 2017 17:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by ProjektC »

I have an RP 3 and the stable version 3.8153 and I can't do it.
I have now ordered a Logitech Harmony Hub.
I hope this will allow me to better control the devices with Domoticz.....
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 »

Install package "xmltodict" (pip for python3)
and check where it was installed
"if sys.platform.startswith('linux'):
# linux specific code here#
sys.path.append('/usr/local/lib/python3.5/dist-packages')

the best way is to first use script:
enigma2.py
pacitzu
Posts: 5
Joined: Saturday 13 July 2013 14:06
Target OS: -
Domoticz version:
Location: Marche, Italy
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by pacitzu »

kofec wrote: Monday 22 January 2018 13:16 Install package "xmltodict" (pip for python3)
and check where it was installed
"if sys.platform.startswith('linux'):
# linux specific code here#
sys.path.append('/usr/local/lib/python3.5/dist-packages')

the best way is to first use script:
enigma2.py
I installed xmltodict library with

pip3 install xmltodict

I found where the packages are installed with

$ python3 -m site

and then In plugin.py I changed

pathOfPackages = '/usr/local/lib/python3.5/dist-packages'

in

pathOfPackages = '/home/pi/.local/lib/python3.5/site-packages'

and now it works.

Thank you
Last edited by pacitzu on Friday 09 February 2018 12:01, edited 1 time in total.
odorf
Posts: 4
Joined: Thursday 08 February 2018 14:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by odorf »

Hi,

Code: Select all

sys.path = [
    '/home/pi/domoticz/plugins/Domoticz-Enigma2',
    '/usr/lib/python2.7',
    '/usr/lib/python2.7/plat-arm-linux-gnueabihf',
    '/usr/lib/python2.7/lib-tk',
    '/usr/lib/python2.7/lib-old',
    '/usr/lib/python2.7/lib-dynload',
    '/home/pi/.local/lib/python2.7/site-packages',
    '/usr/local/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages/gtk-2.0',
]
USER_BASE: '/home/pi/.local' (exists)
USER_SITE: '/home/pi/.local/lib/python2.7/site-packages' (exists)
ENABLE_USER_SITE: True
I've changed the variable to : pathOfPackages = '/usr/lib/python2.7/dist-packages' in enigma2.py file and this script runs perfectly

However after doing the same in plugin.py file Domoticz is stopping without any error in log. What can I do to fix it?
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 »

Domoticz only supports python 3.x
so please correct this variable once again.
using pip3 install needed modules/packages
odorf
Posts: 4
Joined: Thursday 08 February 2018 14:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by odorf »

have some progress :) I've installed the xmltodict package and now enigma2.py is running without any changes in the file.
unfortunatelly it didn't help the plugin to run.
any hint which modules/packages should install? Domoticz hangs and kills the process.

*the hint is: the same situation with any other plugin I want execute :( (tried with 2 different rpi's with no luck).
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 »

I just tried on latest docker and it fine. Maybe you can backup your domoticz folder and try latest Domoticz beta. Can you also share what python version you have. Just type python3. In my case it is:

python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
odorf
Posts: 4
Joined: Thursday 08 February 2018 14:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by odorf »

Hi

I have the same Python version as You have.
Which distribution You are using? Jessie or Stretch?
uronito
Posts: 10
Joined: Tuesday 04 October 2016 20:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by uronito »

hi,

with last version of beta domoticz plugin dont work.

Code: Select all

2018-08-27 22:12:52.338 Error: Receptor-Enigma hardware (52) thread seems to have ended unexpectedly
Regards
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 »

Hi, I have added some fix please try latest version ?
uronito
Posts: 10
Joined: Tuesday 04 October 2016 20:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by uronito »

Hi Kofec,

I try the last version of plugin. Continue same Fail.

Code: Select all

2018-09-04 10:02:21.375 Error: Receptor-Enigma hardware (52) thread seems to have ended unexpectedly
Regards
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by NoProfesor »

Which ? pathlib

pathOfPackages = '/usr/lib/python3/dist-packages'

Code: Select all

~ $ python3 -m site
sys.path = [
    '/home/pi',
    '/usr/lib/python35.zip',
    '/usr/lib/python3.5',
    '/usr/lib/python3.5/plat-arm-linux-gnueabihf',
    '/usr/lib/python3.5/lib-dynload',
    '/home/pi/.local/lib/python3.5/site-packages',
    '/usr/local/lib/python3.5/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/pi/.local' (exists)
USER_SITE: '/home/pi/.local/lib/python3.5/site-packages' (exists)
ENABLE_USER_SITE: True
2018-11-26 19:29:41.571 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 19:29:41.572 Error: (VUplus) Module Import failed, exception: 'ImportError'
2018-11-26 19:29:41.572 Error: (VUplus) Module Import failed: ' Name: xmltodict'
2018-11-26 19:29:41.572 Error: (VUplus) Error Line details not available.
2018-11-26 19:31:00.403 Error: VUplus hardware (7) thread seems to have ended unexpectedly
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 »

Check where is this package: xmltodict
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by NoProfesor »

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 
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin Domoticz-Enigma2

Post by NoProfesor »

I see on hardware, but not on devicesImage
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest