Page 1 of 1

Dzvents error eventsystem Utils.lua

Posted: Tuesday 26 September 2017 12:18
by bdormael
Since a couple of beta builds (I think since around 20 September) I'm receiving eventsystem errors when trying to switch on/off a group selector via Dzvents.

What I try to do is:
domoticz.groups('MyGroup').switchOn() or domoticz.groups('MyGroup').switchOff()

This works perfectly fine, but still I reveive following error in the logfile:
Error: EventSystem: in /home/pi/domoticz/scripts/dzVents/runtime/dzVents.lua: /home/pi/domoticz/scripts/dzVents/runtime/Utils.lua:61: attempt to compare string with number

This used to work fine a couple of beta builds ago.

Is there something maybe changed in Dzvents to cause this behaviour ?

Re: Dzvents error eventsystem Utils.lua

Posted: Tuesday 26 September 2017 15:46
by guantolento
Hi iam in the same situation. Any issue for this error log?

Inviato dal mio GT-I9301I utilizzando Tapatalk


Re: Dzvents error eventsystem Utils.lua

Posted: Wednesday 27 September 2017 8:05
by dannybloe
Do you have a custom log section in one of your scripts? It's trying to compare the script's log level and it appears to be a string and not a number. Can you check this?

Re: Dzvents error eventsystem Utils.lua

Posted: Wednesday 27 September 2017 10:21
by bdormael
Below the script that I'm triggering when pushing my switch:

Code: Select all

return {
	active = true,
	on = {
		devices = {
			'Schakelaar Keuken Boven',
			'Schakelaar Keuken Beneden',
			'Schakelaar Keuken Boven Dim',
			'Schakelaar Keuken Beneden Dim'
		}
	},

	execute = function(domoticz, mySwitch)
		local now = os.date("%H:%M")
		if (mySwitch.state == 'On') then
			domoticz.log('Deur Keuken Op Slot',domoticz.LOG_FORCE)
            		domoticz.notify(now..' Deur Keuken','Op Slot',domoticz.PRIORITY_NORMAL,domoticz.SOUND_NONE,domoticz.NSS_PUSHOVER)
			domoticz.groups('Deur bijkeuken').switchOff()
		end
	end
}
The group that I'm switching off includes a device which is then triggered by the following script:

Code: Select all

return {
	active = true,
	on = {
		devices = {
			'Slot Deur Bijkeuken'
		}
	},

	execute = function(domoticz, mySwitch)
		if (mySwitch.state == 'Closed') then
                        domoticz.variables('DeurKeuken').set('OpSlot')
		end
		if (mySwitch.state == 'Open') then
                        domoticz.variables('DeurKeuken').set('NietOpSlot')
		end

	end
}
The variable that I'm setting in the script above is a string value.

All works fine, but just giving an error message in the log

If I put 'domoticz.groups('Deur bijkeuken').switchOff()' in comment, I have no error anymore, but then offcourse it doesn't do what I want it to do.

Re: Dzvents error eventsystem Utils.lua

Posted: Wednesday 27 September 2017 19:07
by bing69
I have the same error and i check the time when the error came. I only run a blocky on that time!!!??!!

Re: Dzvents error eventsystem Utils.lua

Posted: Friday 29 September 2017 18:50
by bing69
With the last Beta problems are gone!!