That eliminated the 256 error in the lua scripts. There is a new error though.
2026-02-23 01:48:09.078 Error: SQLHelper: Error script not found '/lua/script_device_foyerlight.lua'
This is the lua script code:
commandArray = {}
if (devicechanged['Foyer Light'] == 'On') then
os.execute('sudo ...
Search found 7 matches
- Monday 23 February 2026 3:07
- Forum: Python
- Topic: Getting error 256 when I add import DomoticzEvents as DE
- Replies: 8
- Views: 207
- Sunday 22 February 2026 21:23
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: Cannot start the domoticz daemon in systemd but can be started in terminal
- Replies: 1
- Views: 126
Re: Cannot start the domoticz daemon in systemd but can be started in terminal
I think I figure it out. Type has to be oneshot and RemainAfterExit=yes so ExecStop is not called immediately.
[Unit]
Description=Domoticz Home Automation Service
After=network-online.target
[Service]
Type=oneshot
User=pi
Group=pi
WorkingDirectory=/home/pi/domoticz
ExecStart=/home/pi/domoticz ...
[Unit]
Description=Domoticz Home Automation Service
After=network-online.target
[Service]
Type=oneshot
User=pi
Group=pi
WorkingDirectory=/home/pi/domoticz
ExecStart=/home/pi/domoticz ...
- Sunday 22 February 2026 21:10
- Forum: Python
- Topic: Getting error 256 when I add import DomoticzEvents as DE
- Replies: 8
- Views: 207
Re: Getting error 256 when I add import DomoticzEvents as DE
It has to run in a shell. Its the heyu program which is used to run x10 devices. Its not providingng an error code when its run in a terminal. I am not aware of any other way to do this. It works. It's just annoying to see the errors in the log.
I switched all the scripts to lua:
#!/usr/bin/lua ...
I switched all the scripts to lua:
#!/usr/bin/lua ...
- Sunday 22 February 2026 15:21
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: Cannot start the domoticz daemon in systemd but can be started in terminal
- Replies: 1
- Views: 126
Cannot start the domoticz daemon in systemd but can be started in terminal
The systemd script in /etc/systemd/system is:
[Unit]
Description=Domoticz Home Automation Service
After=network-online.target
[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi/domoticz
ExecStart=/home/pi/domoticz/domoticz -daemon -www 8080 -sslwww 443 -pidfile /var/run/domoticz ...
[Unit]
Description=Domoticz Home Automation Service
After=network-online.target
[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi/domoticz
ExecStart=/home/pi/domoticz/domoticz -daemon -www 8080 -sslwww 443 -pidfile /var/run/domoticz ...
- Sunday 22 February 2026 15:12
- Forum: Python
- Topic: Getting error 256 when I add import DomoticzEvents as DE
- Replies: 8
- Views: 207
Re: Getting error 256 when I add import DomoticzEvents as DE
Its expanded to
The device is working. I can turn it on and off via lua or python script. However, I get the 256 error in the logs for the python version of the script.
Code: Select all
heyu on B9- Sunday 22 February 2026 14:14
- Forum: Python
- Topic: Getting error 256 when I add import DomoticzEvents as DE
- Replies: 8
- Views: 207
Re: Getting error 256 when I add import DomoticzEvents as DE
Well, my scripts did not follow the naming convention. When I changed the name to "script_device_halllight.lua", it worked. I wish we had better error logging. Did the same for the python version and it worked, however, the python version is returning error 256.
From the log:
2026-02-22 13:09:30 ...
From the log:
2026-02-22 13:09:30 ...
- Sunday 22 February 2026 8:17
- Forum: Python
- Topic: Getting error 256 when I add import DomoticzEvents as DE
- Replies: 8
- Views: 207
Getting error 256 when I add import DomoticzEvents as DE
If I run a regular python script (via the web UI) without using any domoticz variables, there is no error. It's like my python scripts are not seeing the domoticz python module. I get an error code 256 if I try to import DomticzEvents as DE.
I wish to be able to use domoticz variables in lua or ...
I wish to be able to use domoticz variables in lua or ...