Blockly Shelly Roller Shutter not working

Moderator: leecollings

Post Reply
infiltrator88
Posts: 20
Joined: Tuesday 15 January 2019 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly Shelly Roller Shutter not working

Post 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 964 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
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: Blockly Shelly Roller Shutter not working

Post by AllesVanZelf »

Have a look in the log of Zonwering-0-pos an see what the different status it is using.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
infiltrator88
Posts: 20
Joined: Tuesday 15 January 2019 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly Shelly Roller Shutter not working

Post 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 951 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
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: Blockly Shelly Roller Shutter not working

Post 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.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
infiltrator88
Posts: 20
Joined: Tuesday 15 January 2019 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly Shelly Roller Shutter not working

Post 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 :-)
Pascal1978
Posts: 3
Joined: Sunday 10 May 2020 9:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Nederland
Contact:

Blockly Shelly Roller Shutter not working

Post 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 887 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest