Page 1 of 1

Roller shutter control

Posted: Saturday 26 May 2018 12:46
by salopette
hello, I can not get it to control the blinds with a dummy switch.
My intention was that I do dummy as a selector and then stop level 10, 20, 30 40 times the blind stops.
But do not get it set up in Blockly.

Could help with someone?

Image
Image

Re: Roller shutter control

Posted: Monday 28 May 2018 14:19
by astrapowerrr
i am also curiuos how this could work.
i have a somfy sunscreen that just can open and close and has a stop command to stop when i want that.
percentage like 25% 50% and 75% would be nice to configure in time.

Re: Roller shutter control

Posted: Monday 28 May 2018 14:41
by Egregius
Create a shell script with the corresponding open/sleep/stop commands and execute those with the selector switch.

Re: Roller shutter control

Posted: Monday 28 May 2018 18:44
by salopette
How do you do that?

Re: Roller shutter control

Posted: Monday 28 May 2018 20:26
by Egregius
You start by searching the wiki.
And then you create a script, for example: /home/pi/openblind99.sh

Code: Select all

#!/bin/bash
curl -s 'http://127.0.0.1:8080/json.htm?type=command&param=switchlight&idx=99&switchcmd=On'
sleep 4
curl -s 'http://127.0.0.1:8080/json.htm?type=command&param=switchlight&idx=99&switchcmd=Stop'
make the script executable:

Code: Select all

chmod +x /home/pi/openblind99.sh
add the script to the selector switch with the full path

Code: Select all

scipt:///home/pi/openblind99.sh

Re: Roller shutter control

Posted: Monday 28 May 2018 20:36
by salopette
Thank you! Did not understand it from the wiki, but your example is very helpful!