I installed Domoticz on a raspberry pi, this seems to work fine, I have connected some devices and I am able to monitor live values.
Now I wanted to try scripting in python to automate some controls.I have read al the manuals and as far as I can tell everything should be operational.
when I try creating a new python script I get the errors below in the log file. I have not coded anything myself I am just trying to run the default script that is loaded when creating a new python script. I even commented out everything except the imports and the print statements so this should be working fine.
As far as I can tell the problem is with the domoticz import file but I cannot imagine that really being the case. I assume i have overlooked something but I cannot seem to find what it is.
python version 3.7.3 is installed
2021-11-07 10:05:18.389 Error: EventSystem: Failed to execute python event script "pythontest"
2021-11-07 10:05:18.389 Error: EventSystem: Traceback (most recent call last):
2021-11-07 10:05:18.389 Error: EventSystem: File "/home/pi/domoticz/scripts/python/domoticz.py", line 41, in <module>
2021-11-07 10:05:18.389 Error: EventSystem: Devices
2021-11-07 10:05:18.389 Error: EventSystem: NameError: name 'Devices' is not defined
2021-11-07 10:05:18.389 Error: EventSystem:
2021-11-07 10:05:18.389 Error: EventSystem: During handling of the above exception, another exception occurred:
2021-11-07 10:05:18.389 Error: EventSystem:
2021-11-07 10:05:18.389 Error: EventSystem: TypeError: function takes exactly 1 argument (2 given)
2021-11-07 10:05:18.389 Error: EventSystem:
2021-11-07 10:05:18.389 Error: EventSystem: The above exception was the direct cause of the following exception:
2021-11-07 10:05:18.389 Error: EventSystem:
2021-11-07 10:05:18.389 Error: EventSystem: Traceback (most recent call last):
2021-11-07 10:05:18.389 Error: EventSystem: File "<string>", line 63, in <module>
2021-11-07 10:05:18.389 Error: EventSystem: File "/home/pi/domoticz/scripts/python/domoticz.py", line 44, in <module>
2021-11-07 10:05:18.389 Error: EventSystem: domoticz_.Log(1, "Devices was not created by Domoticz C++ code")
2021-11-07 10:05:18.389 Error: EventSystem: SystemError: <built-in function Log> returned a result with an error set
2021-11-07 10:05:18.391 Error: Pyhton Event System: Failed to parse parameters: string expected.
2021-11-07 10:05:18.400 Error: EventSystem: Failed to execute python event script "pythontest"
2021-11-07 10:05:18.400 Error: EventSystem: Traceback (most recent call last):
2021-11-07 10:05:18.400 Error: EventSystem: File "/home/pi/domoticz/scripts/python/domoticz.py", line 41, in <module>
2021-11-07 10:05:18.400 Error: EventSystem: Devices
2021-11-07 10:05:18.400 Error: EventSystem: NameError: name 'Devices' is not defined
2021-11-07 10:05:18.400 Error: EventSystem:
2021-11-07 10:05:18.400 Error: EventSystem: During handling of the above exception, another exception occurred:
2021-11-07 10:05:18.400 Error: EventSystem:
2021-11-07 10:05:18.400 Error: EventSystem: TypeError: function takes exactly 1 argument (2 given)
2021-11-07 10:05:18.400 Error: EventSystem:
2021-11-07 10:05:18.400 Error: EventSystem: The above exception was the direct cause of the following exception:
2021-11-07 10:05:18.400 Error: EventSystem:
2021-11-07 10:05:18.400 Error: EventSystem: Traceback (most recent call last):
2021-11-07 10:05:18.400 Error: EventSystem: File "<string>", line 63, in <module>
2021-11-07 10:05:18.400 Error: EventSystem: File "/home/pi/domoticz/scripts/python/domoticz.py", line 44, in <module>
2021-11-07 10:05:18.400 Error: EventSystem: domoticz_.Log(1, "Devices was not created by Domoticz C++ code")
2021-11-07 10:05:18.400 Error: EventSystem: SystemError: <built-in function Log> returned a result with an error set