dzVents not running/executing scripts

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

dzVents not running/executing scripts

Post by lumjajo »

I am currently on 3.8771 beta and just created my first dzVent script. My LUA script is running perfectly with my Solar Inverter.
However, I enabled everything and just used the example script of writing in the log file and nothing happens.
this is the script, the switch is valid of course.

return {
on = {
devices = {
'Sonoff_02'
},
},
execute = function(domoticz, device)
domoticz.log('switched')
end
}

I do not think there is anything wrong with the script, but can it be that the dzVents just does not work in my Domoticz installation?
Thanks a lot...
SweetPants

Re: dzVents not running/executing scripts

Post by SweetPants »

Pleas use code blocks when posting code
SweetPants

Re: dzVents not running/executing scripts

Post by SweetPants »

Try this:

Code: Select all

return {
	on = {
		devices = {
			'Sonoff_02'
		},
	},
	
	logging = {
  		level = domoticz.LOG_INFO,
  		marker = "dz_Test"
  	},
	
	execute = function(domoticz, device)
		domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
	end
}
and select the right log level in Setup->Settings->Other dzVentz Log Level
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dzVents not running/executing scripts

Post by lumjajo »

Thanks for this, the log level is: debugging, but I tested with every other level as well.
This is the log file:
2017-12-27 22:40:54.329 EventSystem: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/test.lua
2017-12-27 22:41:13.325 User: Admin initiated a switch command (301/Sonoff_02/Off)
2017-12-27 22:41:13.329 (Sonoff_02) Light/Switch (Sonoff_02)
2017-12-27 22:41:13.617 User: Admin initiated a switch command (301/Sonoff_02/Off)
2017-12-27 22:41:13.621 (Sonoff_02) Light/Switch (Sonoff_02)

the switch is correct, as you see, but I also tried with other switches (wirtual etc).
Its as if the dzVents is just ignoring the script.I am currently not updating the beta version due to the timer issue, so I cannot test it, although I think it should work...
Sorry for the quick quoting...next time in code blocks..
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dzVents not running/executing scripts

Post by lumjajo »

Ok, and meanwhile I found out, that Blockly does not work either.
anything I can do about it? Both, Blockl and dzVents does not work, Lua Scripts work...
Plips
Posts: 3
Joined: Wednesday 27 December 2017 23:04
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.0
Location: Netherlands
Contact:

Re: dzVents not running/executing scripts

Post by Plips »

Is downgrading to the stable build an option for you?
V3.8153
Raspbian GNU/Linux 8 (jessie)
Raspberry Pi3
SweetPants

Re: dzVents not running/executing scripts

Post by SweetPants »

Plips wrote: Thursday 28 December 2017 10:20 Is downgrading to the stable build an option for you?
He is on v3.8771, so is not affected by the recent 'timer' bug, this should work.
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dzVents not running/executing scripts

Post by lumjajo »

I did a new stable install on another sd and just copied the database. Now it works but with the following messages:
1) in the setup, there is the checkup for dzVents and i cannot change it. Everytime I look in the setup its checkmarked again (I did a save of course), however, dzVents is running regardless of the checkmark. This is strange.
2) in the log it says: dzVents: Fronius script running!! but Fronius is a LUA script. It works fine, but why this message?
3) in the log error messages it says: Error: EventSystem: in dzVents.lua: cannot open dzVents.lua: No such file or director
What does this mean?
Thanks for some light in the dark..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest