Search found 3 matches

by olegdt
Thursday 31 March 2016 21:05
Forum: dzVents
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 72513

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

Very nice. In your last script, for better readability I'd do something like this: local fan = domoticz.devices['Fan'] local ventForce = domoticz.devices['Ventilation_Force'] local ventOff = domoticz.devices['Ventilation_Off'] local vFan = domoticz.devices['V_Fan'] if fan.state == 'Off' and ...
by olegdt
Thursday 31 March 2016 20:45
Forum: dzVents
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 72513

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

All variables in script declared as local except variable current . Then current is declared as local it's value become 0 in following check: -- check if the sensor is on or has some weird reading if (current == 0 or current == nil) then domoticz.log('current is 0 or nil. Skipping this reading ...
by olegdt
Thursday 31 March 2016 12:14
Forum: dzVents
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 72513

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

If somebody is interested, I've managed to convert Humidity control script from https://www.domoticz.com/wiki/Humidity_control . Thanks to dannybloe for nice script! --[[ This script controls the humidity in a typical bathroom setting by detecting relative rises in humidity in a short period. Of ...