Closing blinds partly with blocky

Moderator: leecollings

Post Reply
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Closing blinds partly with blocky

Post by franzel »

@ all

I'd like to close a blind somewhere halfway, depending a specific circumstance or at a specific moment. As I do not know how to do this in Lua I'd wanted to do this in blocky. I used the setup shown in the attachment. Unfortunately the blinds go fully down and doesn't stop after 5 sec.

The only thing I'd like to do is starting closing the blinds and after 5 seconds the motor should stop so the blinds are partly closed. When I do this by hand, this works perfectly.

What am I doing wrong?
Knipsel.PNG
Knipsel.PNG (10.86 KiB) Viewed 4404 times
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Closing blinds partly with blocky

Post by StanHD »

Please confirm:- On = Close? Off = Stop?

If that is the case then you need:-

Set <logeerkamer> = <On>
Set <logeerkamer> = <Off> After <5> Seconds

Please note that you must not use a "Time" block for the seconds. Use a standard "integer" block.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
User avatar
capman
Posts: 153
Joined: Friday 12 July 2013 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Belgium
Contact:

Re: Closing blinds partly with blocky

Post by capman »

Just change the "Off" command to "On". It works for me.

Set <logeerkamer> = <On>
Set <logeerkamer> = <On> After <5> Seconds
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

Thanks for the reply.
I think I already tried this scenario but I'm not certain. I definitely try it out ASAP and let you know.
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

I just tried several scenes with different modes, and finally it works as I wished it to work.
Thanks to both of you for your help.

Now I've learned the basic features. I had to pick the latest offered option, so twice 'on'. Otherwise the blinds went right back up.
Now I can order the UV sensor which I will use to trigger the blinds. I just have to play a bit with the numer of seconds.
Knipsel.PNG
Knipsel.PNG (10.52 KiB) Viewed 4368 times
I'm going to experiment with two or three criteria and, depending the UV rate, the time of the day and the date, the blinds will go down for 10-100%. I'm sure this will take a while, but eventually I will succeed. :D
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

I played a bit with a UV sensor in combination with my previous blocky scenario but unfortunately did doesn't work.
What I would like is the following.
Depending the amount of UV, for instance more then 0.3, and the time is between 12:00am and 06:00PM the blinds should go down for about 50%. The % has been taken care of by the number of seconds after the second 'on' command. In case the sun goes down for about 5 minutes, nothing should happen. In case the sun goes down for let's say 15 minutes, the blinds should go up again.

To do this I thought I just have to read the value of the UV sensor which is the criterium for going down and adding some time limits. Unfortunately I didn't succeed in doing this properly.

To prevent, that the blinds continuous go up and down again there should also be a way which I do not know.
It appears that I still have much to learn concerning blocky. ;)

Who can assist me how to do this in blocky?
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

This is how I did it, hoping this would work.
event.png
event.png (17.41 KiB) Viewed 4296 times
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

Meanwhile this blocky works partly. The blinds go down at the desired level, but after a few minutes, the action is repeated so after three cycles, the blinds are completely down.
Can anyone assist me how to prevent that the blinds go fully down and go fully up at a certain time?
Knipsel.PNG
Knipsel.PNG (11.26 KiB) Viewed 4273 times
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Closing blinds partly with blocky

Post by StanHD »

How about:-

If [UV] > 0.2 And User Variable = 0
Do Set Device = On
Set Device = On After 10 seconds
Set User Variable = 1

Else If [UV] < 0.1 And User Variable = 1
Set Device = Off
Set User Variable = 0

Just using a variable to stop the loop. (Also a 0.1 "Dead Band" to prevent rapid cycling.)

Worth a try? :)
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

Certainly I'll give it a try.
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

I made the following changes. I added the user variable which initially is 0.
Knipsel2.PNG
Knipsel2.PNG (27.68 KiB) Viewed 4262 times
If I understand it right the first loop checks the variable which has been changed from 0 to 1. So no second action is initiated.
As soon as the UV value has decreased below 0.2 the blinds will go up. At least that's how it looks to me.
(Also a 0.1 "Dead Band" to prevent rapid cycling.)
This, I don't understand how I should create the delay.
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

I forgot to thank you. Stupid me. :oops:
Your tips really helped me on the right way.
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Closing blinds partly with blocky

Post by StanHD »

The "Dead Band" is the difference between closing at say >0.2 and not opening again until say <0.1. So if you leave both values at 0.2, then tiny changes about the set-point may cause the blinds to keep cycling up and down. (may not be needed, testing will sort it out) ;)

Typical situation:-

Image
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

I think I know what you're trying to explane.
Meanwhile I added a timetable during which the action should take place. That's the time the sun really gets annoying when it shines on my flatscreen. ;)
I think it looks ok to simulate that I'm home as I'm actually away from home.
planning.png
planning.png (44.53 KiB) Viewed 4246 times
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Closing blinds partly with blocky

Post by StanHD »

Looks good. Let us know how it goes. :)
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
franzel
Posts: 34
Joined: Saturday 24 October 2015 18:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 20.2
Location: Wijchen, The Netherlands
Contact:

Re: Closing blinds partly with blocky

Post by franzel »

This afternoon I noticed that I have to play a bit with the values or add another criterium. I noticed that the amount of UV isn't equal to the amount of actual direct sunlight. Today there is hardly no sun but the blinds went halfway anyway due to a value of > 4. The upper value has to be adjusted to a threshold value of about 5 and the lower threshold about 2. At least that's what I think. Just to simulate I'm at home these seem to be the right values.

I plan to add another thing. A kind of random number which takes care that the blinds go to a different level every time. That's another challenge I think. ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest