Platform: Linux (Fedora 28)
Plugin/Hardware: Linux VM
I have a strange problem with dzVents, I can't get ANY script to run at all. I have documented the problem below but I can't see why dZvents is trying to load its own runtime scripts from /usr/bin or how I can diagnose where that is coming from.
The Script (I have even tried more basic scripts than this. Device 581 is a simple Dummy Switch):
Code: Select all
return {
logging = {
level = domoticz.LOG_FORCE, -- Select one of LOG_DEBUG, LOG_INFO, LOG_ERROR, LOG_FORCE to override system log level
marker = "TEST"
},
active = true,
on = {
devices = {
581
}
},
execute = function(domoticz, mydevice)
domoticz.notify('Well it ran!', domoticz.PRIORITY_NORMAL)
domoticz.log('Device ' .. mydevice.name .. ' was changed', domoticz.LOG_FORCE)
if (mydevice.state == 'On') then
domoticz.notify('Hey!', 'I am on!', domoticz.PRIORITY_NORMAL)
end
if (mydevice.state == 'Off'
) then
domoticz.notify('Hey!', 'I am off!', domoticz.PRIORITY_NORMAL)
end
end
}
Eventually I did the following after seeing comments about the switch for dzVents not working in other places.
- Stop domoticz
- Backup the database then use sqlite3 to access the database
- Run the following SQL: UPDATE Preferences SET nValue = 0 WHERE Key = 'DisableDzVentsSystem';
Code: Select all
Error: EventSystem: in /usr/bin/dzVents/runtime/dzVents.lua: cannot open /usr/bin/dzVents/runtime/dzVents.lua: No such file or directory
This is my process thats running:
Code: Select all
domoticz 4401 1 0 22:56 ? 00:00:06 /usr/bin/domoticz -www 8080 -sslwww 8443 -sslcert /var/lib/domoticz/domoticz.pem -sslpass -sslmethod -ssloptions -ssldhparam -wwwroot /usr/share/domoticz/www -dbase /var/lib/domoticz/domoticz.db -userdata /usr/share/domoticz/ -verbose 1 -log /var/log/domoticz.log -loglevel 5
Code: Select all
[Unit]
Description=Domoticz Home Automation Server
[Service]
User=domoticz
Group=domoticz
EnvironmentFile=/etc/sysconfig/domoticz
ExecStart=/usr/bin/domoticz -www $WWW_PORT -sslwww $SSL_PORT -sslcert $SSLCERT -sslpass $SSLPASS -sslmethod $SSLMETHOD -ssloptions $SSLOPTIONS -ssldhparam $SSLDHPARAM -wwwroot $WWW_ROOT -dbase $DBASE -userdata $USERDATA -verbose $VERBOSE -log $LOG -loglevel $LOGLEVEL
WorkingDirectory=/usr/share/domoticz
# Give the right to open priviliged ports. This allows you to run on a port <1024 without root permissions (user/group setting above)
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
Code: Select all
WWW_PORT=8080
SSL_PORT=8443
SSLCERT="/var/lib/domoticz/domoticz.pem"
SSLPASS=""
SSLMETHOD=""
SSLOPTIONS=""
SSLDHPARAM=""
WWW_ROOT="/usr/share/domoticz/www"
DBASE="/var/lib/domoticz/domoticz.db"
USERDATA="/usr/share/domoticz/"
VERBOSE=1
LOG="/var/log/domoticz.log"
LOGLEVEL="5"
Any ideas why domoticz is using this path would be greatly welcomed I would love to get dzVents working but am a loss as to where this path comes from or what settings may affect it.