dzVents - how to start / install?

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

Moderator: leecollings

Post Reply
renerene
Posts: 356
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

dzVents - how to start / install?

Post by renerene »

If installed the latest beta version Domotic, versions V3.8125.
If have unchecked the box 'disable dzVentz' in settings and added the test script from https://github.com/dannybloe/dzVents. After saving the test script in the build-in domoticz editor the log shows:

2017-07-25 16:28:28.341 EventSystem: reset all events...
2017-07-25 16:28:28.353 EventSystem: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/dzTest.lua

But after switching the dummy switch: nothing.
also adding extra print or domoticz.notify commands don't show in the log
How to start with dzvents? Is it built in, or do have to download anyththing from github?
Other settings to check?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents - how to start / install?

Post by dannybloe »

Hi renerene.
First of all, there's a dzVents sub-forum in the Lua form. Next time you can use that.
Second, check the documentation > getting started (don't use my old github page coz that is old dzVents and has a slightly different syntax).
Documentation
dzVents forum
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
renerene
Posts: 356
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: dzVents - how to start / install?

Post by renerene »

thank you Will put future posts in the correct section.

For now gettin hopeless. 127.0.0.1 is in Local Networks (settings)

1) nog log messages
2) on purpose there is a typo mistake: no syntax error in log

Code: Select all

     return {
    	active = true,
    	on = {
    		'dummy'
    	},
    	execute = function(domoticz, switch)
    		if (switch.state == 'On') then
                prdfsgint ('On')
    		else
    		    domoticz.log('Off')
    		end
    	end
    }
result:
2017-07-25 19:57:50.408 (stroommeter-USB1) P1 Smart Meter (Stroom)
2017-07-25 19:57:55.810 User: hegge30 initiated a switch command (804/dummy/On)
2017-07-25 19:57:57.170 (Dummy) Light/Switch (dummy)
2017-07-25 19:57:57.222 (RFlink) Temp + Humidity (RFLINK-badkamer thermo hygro sensor)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents - how to start / install?

Post by dannybloe »

Did you also mark the script as active using the checkbox 'Event active' in the web editor?
Screen Shot 2017-07-25 at 20.09.14.png
Screen Shot 2017-07-25 at 20.09.14.png (29.3 KiB) Viewed 1885 times
and

Code: Select all

prdfsgint ('On')
doesn't seem right to me.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
randytsuch
Posts: 90
Joined: Sunday 20 March 2016 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: LA, Ca USA
Contact:

Re: dzVents - how to start / install?

Post by randytsuch »

On statement appears to be incorrect

Code: Select all

return {
    active = true,
    on = {
        devices = {
            'Room switch'
        }
    },
    execute = function(domoticz, roomSwitch)
        if (roomSwitch.state == 'On' and domoticz.devices('Living room').temperature > 18) then
            domoticz.devices('Another switch').switchOn()
            domoticz.notify('This rocks!',
                            'Turns out that it is getting warm here',
                            domoticz.PRIORITY_LOW)
        end
    end
}
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents - how to start / install?

Post by dannybloe »

Ah, good catch. Old syntax indeed.

So please read the getting started and watch the getting started video (see dzVents subforum, first post).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
renerene
Posts: 356
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: dzVents - how to start / install?

Post by renerene »

UPDATE - SOLVED

Yes, it works. My first steps in dzVents.
New questions will be post in correct forum subfolder

Code: Select all

return {
	active = true,
	on = {
		devices = {'dummy'}
	},
	execute = function(domoticz, switch)
	    domoticz.log ('Hello???')
    	if (switch.state == 'On') then
            domoticz.log ('On')
    	else
    	    domoticz.log('Off')
    	end
    end
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest