Python Plugin Beta testers - please read this

Python and python framework

Moderator: leecollings

User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin Beta testers - please read this

Post by Dnpwwo »

There are already a number of threads on this.

The plugin system is not 'dead' but is not enabled in the current betas anymore which is a defect. Once we work out why it that has happened it will be back and essentially the same as before.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
superczar
Posts: 65
Joined: Wednesday 14 January 2015 12:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: India
Contact:

Re: Python Plugin Beta testers - please read this

Post by superczar »

oh
In that case, is there any interim method to revert to a version that has the plugin system enabled?
Neither the current beta or stable seem to have it enabled
elgringo
Posts: 96
Joined: Thursday 18 May 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Left
Contact:

Re: Python Plugin Beta testers - please read this

Post by elgringo »

superczar wrote:oh
In that case, is there any interim method to revert to a version that has the plugin system enabled?
Neither the current beta or stable seem to have it enabled
If you want the latest beta, which uses the new plugin system (which is preferred since the old one will be deprecated)
You can build it locally on your Pi form source code, See: http://www.domoticz.com/wiki/Installing ... spberry_PI
After this the python plugin system will work again.
superczar
Posts: 65
Joined: Wednesday 14 January 2015 12:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: India
Contact:

Re: Python Plugin Beta testers - please read this

Post by superczar »

Err - Probably a silly question but Wouldn't that be the same as the current ARM beta release (3.7680)?
elgringo
Posts: 96
Joined: Thursday 18 May 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Left
Contact:

Re: Python Plugin Beta testers - please read this

Post by elgringo »

no but current beta works again :)

@Dnpwwo
Besides the changes described in this topic, are there any other (major) changes planned for Python?
superczar
Posts: 65
Joined: Wednesday 14 January 2015 12:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: India
Contact:

Re: Python Plugin Beta testers - please read this

Post by superczar »

Thanks @elgringo
building the binary from source did activate the plugin system although the plugin I had failed to work because of the call method change

However I was able to use an older commit to build a binary for v 3.5876 to get the plugin back up
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin Beta testers - please read this

Post by Dnpwwo »

I believe Python is now enabled in the ARM beta builds again.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

Re: Python Plugin Beta testers - please read this

Post by Phantom »

Dnpwwo wrote:I believe Python is now enabled in the ARM beta builds again.
It is working again yes, thank you.
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

Hello,

Despite that the plugin engine should be enabled again I can't get it running on my RPI3

I have followed the tutorial and upgraded Python 3 but no indication in the log that the engine has started (and no errors as well)

What can I do to investigate what is behind?

Running 3.8651
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin Beta testers - please read this

Post by Dnpwwo »

@miljume,

Can you please post the log of Domoticz starting so we can see what is going on.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

@Dnpwwo Sure, here it is

After this the sensor values are dropping into the log

Code: Select all

2017-10-31 17:30:29.387 Domoticz V3.8651 (c)2012-2017 GizMoCuz
2017-10-31 17:30:29.387 Build Hash: 57f09fb3, Date: 2017-10-29 06:51:33
2017-10-31 17:30:29.387 Startup Path: /home/pi/domoticz/
2017-10-31 17:30:29.475 Sunrise: 07:47:00 SunSet:15:37:00
2017-10-31 17:30:29.475 EventSystem: reset all events...
2017-10-31 17:30:29.499 Active notification Subsystems: (0/13)
2017-10-31 17:30:29.501 WebServer(HTTP) started on address: :: with port 8081
2017-10-31 17:30:29.511 WebServer(SSL) started on address: :: with port 443
2017-10-31 17:30:29.514 Proxymanager started.
2017-10-31 17:30:29.573 Starting shared server on: :::6144
2017-10-31 17:30:29.574 TCPServer: shared server started...
2017-10-31 17:30:29.574 RxQueue: queue worker started...
2017-10-31 17:30:32.577 MySensors: trying to connect to: 127.0.0.1:5003
2017-10-31 17:30:32.577 MQTT: Connecting to 127.0.0.1:1883
2017-10-31 17:30:32.581 RFXCOM: Using serial port: /dev/ttyUSB0
2017-10-31 17:30:32.678 MQTT: connected to: 127.0.0.1:1883
2017-10-31 17:30:32.779 MQTT: Subscribed
2017-10-31 17:30:33.156
2017-10-31 17:30:33.232 subtype = Interface Response
Sequence nbr = 2
response on cmnd = Get Status
Transceiver type = 433.92MHz
Firmware version = 1001
Firmware type = Ext
Hardware version = 1.3
Undec off
X10 enabled
ARC enabled
AC enabled
HomeEasy EU disabled
Meiantech/Atlantic disabled
Oregon Scientific enabled
ATI/Cartelectronic disabled
Visonic disabled
Mertik disabled
AD disabled
Hideki disabled
La Crosse disabled
FS20/Legrand disabled
ProGuard disabled
BlindsT0 disabled
BlindsT1 disabled
AE disabled
RUBiCSON enabled
FineOffset enabled
Lighting4 disabled
Conrad RSL disabled
ByronSX disabled
IMAGINTRONIX disabled
KEELOQ disabled
Home Confort disabled
2017-10-31 17:30:33.577 MySensors: connected to: 127.0.0.1:5003
2017-10-31 17:30:33.578 MySensors: Gateway Ready...
2017-10-31 17:30:33.602 Incoming connection from: <my ip>
2017-10-31 17:30:34.578 MySensors: Gateway Version: 2.2.0-beta
2017-10-31 17:30:34.578 MySensors: Gateway Version: 2.2.0-beta
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin Beta testers - please read this

Post by Dnpwwo »

@miljume,

Only two things could cause this that I can think of:
  • You have turned the EventSystem off in the Settings page. Strangely this disables the Plugin System as well which I've never quite understood the logic of but it is what it is
  • (more likely) You are building from source and Python is not enabled. From memory you should see something like USE_PYTHON=YES when you issue a

    Code: Select all

    cmake -DCMAKE_BUILD_TYPE=Release .
    command. You might want to force a clean build as well.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

@Dnpwwo,

Thank's for the hint, I did not had EventSystem turned on in settings so I turned it on

But now Domoticz won't start the GUI, in syslog the following is seen after I have started the Domoticz service:

Code: Select all

Nov  1 13:30:34 raspberrypi systemd[1]: Starting LSB: Home Automation System...
Nov  1 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.130  Domoticz V3.8651 (c)2012-2017 GizMoCuz
Nov  1 13:30:34 raspberrypi domoticz: Domoticz is starting up....
Nov  1 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.130  Build Hash: 57f09fb3, Date: 2017-10-29 06:51:33
Nov  1 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.131  Startup Path: /home/pi/domoticz/
Nov  1 13:30:34 raspberrypi domoticz.sh[2749]: domoticz: Domoticz is starting up....
Nov  1 13:30:34 raspberrypi domoticz: Domoticz running...
Nov  1 13:30:34 raspberrypi systemd[1]: Started LSB: Home Automation System.
If I run

Code: Select all

sudo /etc/init.d/domoticz.sh status
I get the following:

Code: Select all

   Loaded: loaded (/etc/init.d/domoticz.sh)
   Active: active (exited) since Wed 2017-11-01 13:30:34 CET; 1min 29s ago
  Process: 2070 ExecStop=/etc/init.d/domoticz.sh stop (code=exited, status=0/SUCCESS)
  Process: 2749 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)

Nov 01 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.130  Domotic...zNov 01 13:30:34 raspberrypi domoticz[2754]: Domoticz is starting up....
Nov 01 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.130  Build H...3Nov 01 13:30:34 raspberrypi domoticz.sh[2749]: 2017-11-01 13:30:34.131  Startup.../Nov 01 13:30:34 raspberrypi domoticz.sh[2749]: domoticz: Domoticz is starting u....Nov 01 13:30:34 raspberrypi domoticz[2755]: Domoticz running...
Nov 01 13:30:34 raspberrypi systemd[1]: Started LSB: Home Automation System.
Hint: Some lines were ellipsized, use -l to show in full.
Now I can't change setting back and have no clue how to fix the problem, any hints?
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

When starting domoticz manually, I receive the following

Code: Select all

root@raspberrypi:/home/pi# cd domoticz
root@raspberrypi:/home/pi/domoticz# ./domoticz
2017-11-01 18:40:46.634  Domoticz V3.8666 (c)2012-2017 GizMoCuz
2017-11-01 18:40:46.634  Build Hash: c95228b5, Date: 2017-10-31 13:45:30
2017-11-01 18:40:46.635  Startup Path: /home/pi/domoticz/
2017-11-01 18:40:46.685  Sunrise: 07:50:00 SunSet:15:33:00
2017-11-01 18:40:46.686  EventSystem: reset all events...
Segmentation fault
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin Beta testers - please read this

Post by Dnpwwo »

@miljume,

I'm surprised that there are no messages from either the Python Framework finding (or not finding) Python because that is normally the 1st thing it does.

Two things spring to mind:
  • Can you remove and directories you have in the domoticz/plugins directory other than 'examples'
  • Have a look under /domoticz/scripts for a .py file called something like Smarter_PIR.py and delete it if you find it
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

I have removed the directory called "AwoxSMP" so that only the examples folder is in the plugin directory. Can't find any file named Smarter _PIR or similar

But after reboot I still get:

Code: Select all

root@raspberrypi:/home/pi/domoticz# ./domoticz                                     
2017-11-02 09:46:48.485  Domoticz V3.8688 (c)2012-2017 GizMoCuz
2017-11-02 09:46:48.485  Build Hash: bc0a53d5-modified, Date: 2017-11-01 21:52:08
2017-11-02 09:46:48.485  Startup Path: /home/pi/domoticz/
Segmentation fault
I have tried removing domoticz entirely and reinstalling it several times but no change. Other things like Node RED is running fine so I think the SD card should not be corrupt. The problem is that the Pi is 4 hours drive away so I really would like to reinstall domoticz and get in running without having to reach the Pi physically ...

Anything else I can try?
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin Beta testers - please read this

Post by zak45 »

Have seen some others have segmentation fault....
Maybe you can try by installing the last stable version.
miljume
Posts: 62
Joined: Thursday 03 December 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8742
Contact:

Re: Python Plugin Beta testers - please read this

Post by miljume »

I have tried deleting domoticz folder and the symlinks I know about and installed a fresh copy (stable) with

Code: Select all

sudo curl -L install.domoticz.com | sudo bash
But still same Segmentation fault :x
ben92
Posts: 57
Joined: Thursday 14 August 2014 17:41
Target OS: Linux
Domoticz version: beta
Location: France
Contact:

Re: Python Plugin Beta testers - please read this

Post by ben92 »

hello, i upgrade my server from ubuntu 17.04 to 17.10 and i have segfault at startup.

if in CMakeList.txt, i remove the line " add_definitions(-DENABLE_PYTHON)" and compil domoticz, i can start domoticz ant it works !!

Python 3.7 is found with cmake -DCMAKE_BUILD_TYPE=Release .

can you help me ?
dextm80
Posts: 117
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 4.10159
Contact:

Re: Python Plugin Beta testers - please read this

Post by dextm80 »

gysmo38 wrote: Sunday 12 March 2017 23:47 Thank a lot for creating Python plugin. It is perfect for me.

I create a first version of MELCloud plugin.

I create a Wiki page for instructions http://www.domoticz.com/wiki/Plugins/MELCloud.html

It is not finish but it work well.
hi, i've melclouid python plugin installed, but since a few days this is error log:
2018-01-22 19:54:09.129 Error: (Mitsubishi Kirigamine) 'onHeartbeat' failed 'KeyError'.
2018-01-22 19:54:09.129 Error: (Mitsubishi Kirigamine) ----> Line 520 in /home/luigi/domoticz/plugins/Melcloud/plugin.py, function onHeartbeat
2018-01-22 19:54:09.129 Error: (Mitsubishi Kirigamine) ----> Line 227 in /home/luigi/domoticz/plugins/Melcloud/plugin.py, function onHeartbeat
any idea @gysmo38?
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest