Python Scripts...What's happening here?
Posted: Thursday 03 April 2025 0:59
I'm new to scripts, s0 I tried this simple one, based on an example online:
I'm using the Setup>More Optionsa>Events tab and creating the script there.
import domoticz
import DomoticzEvents as DE
if DE.changed_device_name == "Processor Temperature":
if DE.Devices["Processor Temperature"].s_value != 0:
domoticz.log("This is a test log entry")
when it runs, nothing happens.
if i use a different temp sensor, shown below
import domoticz
import DomoticzEvents as DE
if DE.changed_device_name == "Crawl Space":
if DE.Devices["Crawl Space"].s_value != 0:
domoticz.log("This is a test log entry")
...it runs but I get this error:
PyDomoticz_EventsLog: Invalid parameter, expected single parameter, got 2 parameters
The script is identical, except the device name.
any help would be appreciated!
Dan
I'm using the Setup>More Optionsa>Events tab and creating the script there.
import domoticz
import DomoticzEvents as DE
if DE.changed_device_name == "Processor Temperature":
if DE.Devices["Processor Temperature"].s_value != 0:
domoticz.log("This is a test log entry")
when it runs, nothing happens.
if i use a different temp sensor, shown below
import domoticz
import DomoticzEvents as DE
if DE.changed_device_name == "Crawl Space":
if DE.Devices["Crawl Space"].s_value != 0:
domoticz.log("This is a test log entry")
...it runs but I get this error:
PyDomoticz_EventsLog: Invalid parameter, expected single parameter, got 2 parameters
The script is identical, except the device name.
any help would be appreciated!
Dan