Page 1 of 1

Blockly Shelly Roller Shutter not working

Posted: Tuesday 12 May 2020 9:21
by infiltrator88
I have a shelly 2.5 connected to my sunscreen and opening/closing works fine but my blockly script isn't.
I have a simple Blockly script that just needs to do the following:
If Roller shutter is closed and (buienrader switch) is it raining = on Then Open sunscreen.
This doesn't work so for testing I replaced the is it raining with a light bulb switch. So if the switch is on and sunscreen is closed then open sunscreen.
The I looked in the log and saw that if sunscreen is closing the status was not Closed but ON and when it was Opening it had status off:

2020-05-10 14:44:47.864 Status: User: initiated a switch command (60/Zonwering -0-pos/Off)
2020-05-10 14:44:49.280 Status: User: initiated a switch command (60/Zonwering -0-pos/On)

Then i adjusted my script so the state of the Sunscreen to Off/On but this didn't help either. I tried different combo's in my script for the "zonwering-0-pos" but can't get it to work. I even tried that if Zonwering-0-pos is closed/On and time equals Realtime than set Zonwering-0-pos to Open/off but this doesn't work either.
Example of the script:
blockly.jpg
blockly.jpg (18.86 KiB) Viewed 998 times
Anyone got any idea what I am missing here or doing wrong. I have way more "complicated" scripts running but this one doesn't want to work.
Thanks in advance

Re: Blockly Shelly Roller Shutter not working

Posted: Tuesday 12 May 2020 10:15
by AllesVanZelf
Have a look in the log of Zonwering-0-pos an see what the different status it is using.

Re: Blockly Shelly Roller Shutter not working

Posted: Tuesday 12 May 2020 11:08
by infiltrator88
I just closed my screen and see the following:

2020-05-12 10:55:01 Closed
2020-05-12 10:55:01 Set Level: 99 %

So I tried the following:
blockly.jpg
blockly.jpg (18.81 KiB) Viewed 985 times
Now I see the following in the domoticz log:
Error: EventSystem: Lua script error (Blockly), Name: ZonweringAutoOpenBijRegen_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare number with string

Re: Blockly Shelly Roller Shutter not working

Posted: Tuesday 12 May 2020 12:51
by AllesVanZelf
This is the almost same problem I'm having with Qubino dimmer and shutter devices.

[Open] is not a recognised status. You could set it to level %

Can't you not just:

If [Zonwering] = [Closed] AND {Buienradar Regent het] = [Off]
Set [Zonwering] = [Level % 30]

I have this:
Image
And this part of my script is working.

Re: Blockly Shelly Roller Shutter not working

Posted: Tuesday 12 May 2020 13:28
by infiltrator88
Yes I configured it like this like 30 minutes ago and this is now working

If zonwering =closed and lightbulb = on
Set zonwering level = 0%
Thanks for all the help :-)

Blockly Shelly Roller Shutter not working

Posted: Tuesday 23 June 2020 22:07
by Pascal1978
I have also an Shelly 2.5 connected to my roller shutter and i managed to set my shutter to 60% when temperaturesensor in my living room is over 26 degrees, but when i want to set my shutter to 30% when temperature rises over 28 degrees and my shutter is at 60%, then i don't know what value i need to enter in the else/if statement for the status of my shutter.
My blocky works fine when i dont add the shutter status in the if statement, it closes at 60% when over 26 degrees and to 30% when over 28 degrees, but when temperature drops below 26 degrees my shutter opens up to 60%. and when temp is between 26 and 28 my shelly also keep receiving set shutter to 60% commands.
What do i miss?
domoticz rolluik.jpg
domoticz rolluik.jpg (89.69 KiB) Viewed 921 times
I know i can't use the "LEVEL" option in an if statement, but it is just to show what i want to achieve