Hello
I have perhaps a very simple question but I did not find an answer.
I have connected blinds in Domoticz and the work fine. Closing and opening can be done with my phone.
I also have connected a lux sensor. I can control the blind with a Blockly with a amount of light.
But when the weather is cloudy the blinds go up and down all the time.
Is there an option to say p.a. when the amount of lux is for 10 minutes above a setvalue the blinds are to be closed?
Thanks for reading and i hope some advice
Har
timer in Blockly
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: timer in Blockly
I don't think this is possible in Blockly. You need dzVents or one of the other script options available to do this.har0543 wrote: ↑Tuesday 14 July 2020 19:52 I also have connected a lux sensor. I can control the blind with a Blockly with a amount of light.
But when the weather is cloudy the blinds go up and down all the time.
Is there an option to say p.a. when the amount of lux is for 10 minutes above a setvalue the blinds are to be closed?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 18
- Joined: Wednesday 06 January 2016 11:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Dalfsen netherlands
- Contact:
Re: timer in Blockly
Thanks for the info.
In Dzvent I did not find such an option.
any idears?
In Dzvent I did not find such an option.
any idears?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: timer in Blockly
Could look like
Code: Select all
return
{
on =
{
devices =
{
'luxSensor',
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to LOG_ERROR when tested and OK
marker = 'delayed blinds',
},
execute = function(dz, item)
local lightFence = 3500 -- change to required uv
local blind = dz.devices('blindName') -- change to name of you blind
local delay = 600 -- change to delay in seconds
dz.log('Blind state = ' .. blind.state, dz.LOG_DEBUG)
dz.log('Measured Lux = ' .. blind.lux, dz.LOG_DEBUG)
if item.lux > lightFence then
blind.close().checkFirst().afterSec(delay)
else
blind.cancelQueuedCommands()
if blind.lastUpdate.secondsAgo > delay and blind.state == 'Closed' then
blind.open()
end
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 18
- Joined: Wednesday 06 January 2016 11:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Dalfsen netherlands
- Contact:
Re: timer in Blockly
thanks! give it a try
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: timer in Blockly
Blocky should also be possible I guess. You could use a dummy switch. If lux is desired level then switch dummy switch on after 10 minutes.
Elseif dummy switch is on then close curtain.
Elseif lux is less then dummy switch off
Hope it's clear to you. But this makes a timer in blocky
Elseif dummy switch is on then close curtain.
Elseif lux is less then dummy switch off
Hope it's clear to you. But this makes a timer in blocky
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: timer in Blockly
I guess you are right. This Blockly does workwouterlet wrote: ↑Saturday 18 July 2020 22:15 Blocky should also be possible I guess. You could use a dummy switch. If lux is desired level then switch dummy switch on after 10 minutes.
Elseif dummy switch is on then close curtain.
Elseif lux is less then dummy switch off
Hope it's clear to you. But this makes a timer in blocky
XML (import in event editor)
- Spoiler: show
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest