Make Somfy Shade Control Simple to Use

Posted on
Wed Apr 27, 2016 5:09 pm
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Make Somfy Shade Control Simple to Use

After many months of effort and a lot of great support, I have a friend's Somfy shades being successfully controlled by Indigo by way of an Autelis interface. Despite Nick's help I was not able to get his plugin to work. But after reviewing with Firefox web console I have pasted code into an Indigo Action Group>Server Action>Execute Script>Embedded Python... such as this:

# indigo.server.log(the_page)

import urllib2, base64

request = urllib2.Request("http://192.168.1.73/set.cgi?addr=3&cmd=gset&pos=255&num=&timestamp=1461797007194")
username="username"
password="password"
base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
request.add_header("Authorization", "Basic %s" % base64string)
result = urllib2.urlopen(request)

I compile and run the script and the shades deploy correctly.

I am asking for help with what to do with this to make the most convenient interface for my friends. Currently I've created an On/Off Virtual Device called "Shades Living Room Deployment" which controls Action Groups. The On Group runs the shades close script and the Off Group runs the shades open script.

My thinking is shade deployment- on means the shades are closed, off means the shades are opened. Everything works: when I turn that Virtual Device on, the living room shades close.

But I don't see that Virtual Device's status change in Indigo. Even though I turned it on the indication in the State column is off.

How would you suggest I can make my friend's manual interaction with my Python scripts from Indigo Touch on the their iPhones more natural and elegant?

Thanks so much for your help.

Posted on
Tue May 10, 2016 1:28 pm
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Re: Make Somfy Shade Control Simple to Use

I wanted to follow up and acknowledge the help of RogueProeliator... I read the excellent documentation here in the Indigo Wiki about Virtual Device status and now on/off status is reflected in Indigo Touch. My friends may additionally be operating the shades by Somfy wall switches or wireless remotes and I'm not sure if those changes would appear in the Indigo client.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 12 guests