Page 1 of 1

Python Event scripts

Posted: Monday 30 November 2015 20:56
by jammiejammie
I'm using the beta versions of Domoticz and some time ago someone seems to have added a python interpreter. This is awesome as python is a lot easier for me tan lua.

But... How far along is it ? Is it somehow bug free ? The demo file added gives some details about how to use us, but i would also like to know if more people have examples.

Please let me know if this part if domoticz is declared "Stable"

Re: Python Event scripts

Posted: Tuesday 19 January 2016 23:04
by MaartenB
The code is ready, but the cmake file was missing some part (don't know why they were removed)
You can try our this: https://github.com/maartenbreddels/domoticz
Until my pull request gets through ( https://github.com/domoticz/domoticz/pull/363 )

Re: Python Event scripts

Posted: Saturday 30 January 2016 2:52
by Holland
If 'm correct the 363 is closed. Will this work in a similar way to LUA, e.g script_device_name.py or script_time_name.py and place this in the domoticz/scripts/python directory?

I tried the above, but without success. Running 2.4347 on Raspi 2

Re: Python Event scripts

Posted: Tuesday 26 July 2016 23:42
by sumo89
Hi!
I just gave this a try... I get the Python option in the Event GUI. But...

2016-07-26 23:28:57.604 Domoticz V3.5382 (c)2012-2016 GizMoCuz
2016-07-26 23:28:57.604 Build Hash: 7071bfc-modified, Date: 2016-07-26 14:06:52
--
2016-07-26 23:30:09.508 EventSystem: reset all events...
This will only show up in the shell where you start domoticz
Segmentation fault

Basically, whatever I have in the Python-script always ends with "Segmentation fault" and then Domoticz dies. Above I only have "print('This will only show up in the shell where you start domoticz').

Any ideas? :)