Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return { on = {
- timer = { 'every 30 minutes' },
- },
- logging = {
- level = domoticz.LOG_DEBUG,
- marker = "Fogger_"
- },
- execute = function(dz,domoticz,devices)
- local time = 240
- local went1 = dz.devices('Wentylator Przod')
- local went2 = dz.devices('Wentylator Srodek')
- local went3 = dz.devices('Wentylator Koniec') --definiowanie switchy
- local Fogger = dz.devices('Fogger')
- local controlSwitch = dz.devices('Termostat') --czy włączony
- local setPoint1 = dz.devices('Termo-Fog').setPoint --odczyt nastawy
- local Temp = dz.devices('bme280').temperature --odczyt temperatury
- print(setPointTyl)
- if controlSwitch.state == 'On' then
- if Temp >= setPoint1 and Temp <= 99 then
- Fogger.switchOn()
- went1.switchOn()
- went1.switchOff().afterSec(time)
- Fogger.switchOn()
- went2.switchOn().afterSec(3) -- Załączanie czasowe wentylatorów na czas+zwłoka
- went2.switchOff().afterSec(time+3)
- Fogger.switchOn()
- went3.switchOn().afterSec(6)
- went3.switchOff().afterSec(time+6)
- Fogger.switchOff().afterSec(time+6) --Służy do komunkacji z termostatem, co by się nie kłóciły
- end
- end
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement