python module in Events - how to use?

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Posts: 414
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Germany, Berlin

python module in Events - how to use?

Post by micha_pr » Saturday 16 December 2017 17:09


I tried to use the Python event module - not clear for me how to use it.
Selecting "All", "Device", or "Time" - I can not see that the event will be fired.

Have used the sample code with
domoticz.log("Hi Domoticz !")
But it never will be seen in Log.

The only report I see is: "EventSystem: reset all events..."

dzVents is working - so I'm not sure where is the tick :)
In Wiki is nothing about it.

Can somebody help and explain?

(tried with version 3.8658 and 3.8788)
Michael Pruefer
---------------------------- (German only)
http://www.SmartHome.Work (German only)

Posts: 2
Joined: Monday 18 December 2017 12:08
Target OS: Raspberry Pi
Domoticz version: 3.8153

Re: python module in Events - how to use?

Post by ekrzychoooo » Monday 18 December 2017 13:54

I have the same problem.
In the terminal window i have the reply

Code: Select all

This will only show up in the shell where you start domoticz
Traceback (most recent call last):
  File "<string>", line 67, in <module>
  File "/home/pi/domoticz/scripts/python/", line 42, in log
    domoticz_.log(0, " ".join([str(k) for k in args]))
AttributeError: module 'DomoticzEvents' has no attribute 'log'

I have event active but domoticz.devices.items() it is always empty.

Version: 3.8153

Posts: 8
Joined: Friday 29 December 2017 23:21
Target OS: Raspberry Pi
Domoticz version: 3.8777
Location: Norway

Re: python module in Events - how to use?

Post by datagutten » Friday 29 December 2017 23:25

The sample event is not working, but I found a working sample in the scripts/python folder: ...

This will work:

Code: Select all

import DomoticzEvents as DE
DE.Log("Hi Domoticz !")

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests