Page 1 of 2
Automatically sunscreen down temperature
Posted: Monday 04 June 2018 20:26
by remko2000
I try to link my sunscreen (' scherm slaapkamer' ) to a sensor value (' temperatuur buiten' ). I want my sunscreen to go down above 22 degrees (if it is not already down) and only during the day within a certain time. I made this blocky:

- Schermafbeelding 2018-06-04 om 20.22.59.png (24.76 KiB) Viewed 3167 times
This should work, however, he does not. What am I doing wrong now?
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 8:15
by kuifje
Remko2000,
Would you try to set the time to OR instead of AND because it can never be 9 and 21.
Hope this will do the job.
Greetsz
Kuifje
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 9:10
by CaesarPL
Use dzVents. Really.
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 9:12
by mrf68
I think the time setting is correct. It says > 09:00 and < 21:00, so for example 10:34 is > 09:00 and < 21:00. If you change the AND to OR, it will always be true, because any time after 09:00 will be > 09:00 and any time before 09:00 will be < 21:00.
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 18:48
by StanHD
Just a thought:- When you look in the "current states", does the "scherm slaapkamer" report as on or off, or maybe "Open or Close"?
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 20:00
by remko2000
I changed the and to or but no improvement. The current states are on or off. This is no my blocky:

- Schermafbeelding 2018-06-05 om 19.57.43.png (25.75 KiB) Viewed 3104 times
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 20:29
by Eddiever
I assume you are from the Netherlands (or Belgium) you can delete the time > 9:00. I don't think it will be 22 degrees between 0:00 and 09:00. Please do check the Show current states to see if it really is on/off and not open/closed.
Re: Automatically sunscreen down temperature
Posted: Tuesday 05 June 2018 21:03
by remko2000
In the log it is on/off but in the current state its open/close. So I changed it to open/close now in my blocky. In the log I see:
EventSystem: Event triggered: Script screen aan test_1 (and repeating)
but nothing happening.
Re: Automatically sunscreen down temperature
Posted: Wednesday 06 June 2018 9:25
by snellejellep
@remko2000 the and blocks are stacked the wrong way around, if you stack in the second box of the and box and not in the first as you did here it will have a better chance of working. had this problem myself and that was the solution for me
Re: Automatically sunscreen down temperature
Posted: Thursday 07 June 2018 21:42
by remko2000
Ok I've changed the stacked blocks, it's now:

- Schermafbeelding 2018-06-07 om 21.40.18.png (25.26 KiB) Viewed 3000 times
Is this better?
Re: Automatically sunscreen down temperature
Posted: Sunday 10 June 2018 7:50
by gerardsoraya
i have it already working like the picture below.
i only have the problem i now get every minute or every 10 minutes the notification. is there someone who knows the reason of that?
my theorie it is because the temperature is also changing?

- Naamloos.png (25.4 KiB) Viewed 2943 times
Re: Automatically sunscreen down temperature
Posted: Sunday 10 June 2018 11:27
by Eddiever
@gerardsoraya, make an extra check on the screens. In the If statement add the line with temperature with an AND statement in which you check if the screens are open. And in de Else if statement add the check if the screens are closed. This should prevent receiving extra messages.
Re: Automatically sunscreen down temperature
Posted: Sunday 10 June 2018 20:11
by remko2000
I think that this in blocky doesnt work very well so I want something like this in LUA. I see some examples combined with weatherstation info. I want a basic script which send my screen down combined with my temperaturesensor (and looks if the screen is already down). Maybe with notification? Does anyone have something like this and want to post this script?
Re: Automatically sunscreen down temperature
Posted: Wednesday 13 June 2018 19:55
by remko2000
This is now my blocky but it still doesn' t work. I've tried many variations but still no solution. Anyone?

- Schermafbeelding 2018-06-13 om 19.53.25.png (36.99 KiB) Viewed 2855 times
Re: Automatically sunscreen down temperature
Posted: Wednesday 13 June 2018 20:33
by Eddiever
I wish I could tell you what is wrong but I don't. What about if you try to keep it simple. Delete the time part. Just use the temperature and the status of the bedroom screen (scherm slaapkamer).
What if you try:
(replace test with scherm slaapkamer)

- voorbeeld.PNG (20.56 KiB) Viewed 2848 times
Re: Automatically sunscreen down temperature
Posted: Thursday 21 June 2018 12:21
by najtram
I had something strange in a similar situation. In the picture you can see my working solution.
Somehow open/close needs to be switched with on/off, but conditional states needs to use open/close. Maybe a bug?

Re: Automatically sunscreen down temperature
Posted: Thursday 21 June 2018 12:55
by gerardsoraya
Eddiever wrote:@gerardsoraya, make an extra check on the screens. In the If statement add the line with temperature with an AND statement in which you check if the screens are open. And in de Else if statement add the check if the screens are closed. This should prevent receiving extra messages.
I made the blockly as i onderstanded the way you have said, the notification keeps on sending every 10 minutes.
Verstuurd vanaf mijn SM-G965F met Tapatalk
Re: Automatically sunscreen down temperature
Posted: Sunday 24 June 2018 10:01
by remko2000
It seems that this blocky finally works:

- Schermafbeelding 2018-06-24 om 09.56.21.png (38.73 KiB) Viewed 2610 times
I would likt to add a notification (prowl) but I don't want a message every 10 minutes. How can I prevent this?
Re: Automatically sunscreen down temperature
Posted: Monday 25 June 2018 14:07
by najtram
najtram wrote: ↑Thursday 21 June 2018 12:21
Somehow open/close needs to be switched with on/off, but conditional states needs to use open/close. Maybe a bug?
So with the answer of remko2000, this seems to be a real issue. Does someone know where to do a bugreport or look up if this is already known?
Re: Automatically sunscreen down temperature
Posted: Monday 25 June 2018 20:22
by Eddiever
@Remko2000, just add the notification. And then see if you receive it every 10 minutes. @gerardsoraya, what does you log tell you?