dzVents Looking for it's scripts in /usr/bin

Easy to use, 100% Lua-based event scripting framework.
Post Reply
cardy
Posts: 3
Joined: Tuesday 15 May 2018 11:47
Target OS: Linux
Domoticz version:
Contact:

dzVents Looking for it's scripts in /usr/bin

Post by cardy » Thursday 19 July 2018 9:23

Version: 4.7900
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
}
I have enabled debug to level 5 and there were no errors.

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';
This re-enabled dzVents but I now get the following error:

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
I don't know why its using /usr/bin

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
I did read somewhere that WorkingDirectory should be set in systemd's service file, but in my case this is set.

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
The Settings in /etc/sysconfig/domoticz are:

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests