This Device type allows the integration of Somfy Blinds operated via the Somfy MyLink hub.
It implements the SmartThings “Window Shade” and “Switch” capabilities, which means it will work with most Automations based on switching devices on/off, and will natively work with any Window Shade integrations.
Note that this is a WIP and there is still a lot to do
Here are some example automations that I have found work well:
Open blinds at sunrise
Don’t open eastern-facing blinds if the maximum forecast temp for the day is above 30°C
Close blinds at sunset
Close certain blinds when forecast or temperature sensor registers above xx°C
Close blinds when nobody is home
Features
v1.0
Automatically creates specified devices
Allows opening and closing of shades
v1.1
“My” button functionality (Preset Position)
“Stop” button functionality
Emulated level control (I.E Set blind to 60% open). This is not very accurate at small increments due to the SmartThings platform.
To Do
Automatically search and add devices
See if there is a possible way to read current state of device
Add support for Scenes
Add support for more device types (if requested)
To Install
Either copy the device handlers directly in to the IDE, or add the repo:
Owner: bendews
Name: smartthings-somfy-mylink
Branch: master
Ensure you add both Device Handlers present in the repo
Once the Device Handlers have been added, we can then add a virtual device via the IDE:
Enter a “Name” for the device, this can be whatever you want. (I.E “Somfy MyLink Hub”)
Enter a “Label” for the device, this is optional and can be whatever you want.
Enter a “Device Network Id” This can be anything, however it must be different from any other device. This ID will change once the device has been configured.
“Zigbee” Id should be left blank
Select a “Type” from the dropdown, this should be “Somfy MyLink Hub”
“Version” should be published
“Location” should be your hub location, probably “Home”
“Hub” should be your hub name
“Group” leave as is
Click Create
Once created, we can then open the settings for the device, and fill out the following values:
First time poster - really excited about this! I have a MyLink in my holiday home to control Somfy powered awnings on the terrace. Somfy’s own Alexa skill is pretty awful, using invocation phrases “ask MyLink to…”… I’m hoping that using this project and the Alexa Skill for Smart Things (and maybe eventually routines support?) might lead, finally, to a more natural language solution…
Will try it out when I’m down there for Easter. Thanks very much Ben!
I followed the instructions and set everything up. All the child devices got created, but when I try the open /close operations nothing happens.
I double checked and my somfy IP address is correct (I can telnet to port 44100 on that IP). My system id is correct as well.
The smartthings live log shows the following when I try to “open” my Family Room shades via smartthings:
Any chance you could PM me with the device page for the Somfy Hub in the IDE (My Devices>SOMFY HUB)? That all looks correct.
Another thing you could try doing is pasting {“id”:“1”,“method”:“mylink.move.up”,“params”:{“auth”:“CC23318A”,“targetID”:“CC23318A.1”}} in to the telnet prompt when you have connected to your hub and pressing enter. If that doesn’t work then it should tell you why, if it does work then I’m guessing its an issue with the DNI of the MyLink Hub.
I have updated this to v1.1 with the following improvements:
“My” button functionality (Preset Position)
“Stop” button functionality
Emulated level control (I.E Set blind to 60% open). This is not very accurate at small increments due to the SmartThings platform.
Unfortunately it looks like the feature I was most excited for (Automatic search and add devices) might not be possible due to SmartThings limitations. It requires the ability to read the response from a TCP stream which is unsupported at this time.
Let me know if there are any questions, comments or feature requests!
Thanks so much for working on this integration for smart things. I’ve given it a go but seem to have the same problem as the other guy - devices are set up correctly but don’t respond.
Here’s my MyLink integration and Smart Things config pages:
I can telnet to the MyLink using the above IP and port. When I trigger the command in Smart Things, I see this message indicating a parsing error, so at least we know it is sending it to the MyLink correctly:
I have tried using both a name and instead a number for the SystemId but no difference, Any ideas of what else I might try - it’s my Easter weekend project
Hi David, really sorry to hear you’re having issues as well! I’ve sent through a PM with some troubleshooting steps, if you’re able to help go through them with me it would be greatly appreciated. Thanks!
Just a quick message to thank Ben for his help and for producing this great project. It turns out all works perfectly - I simply had the dreaded encoding issue with parenthises between copy and pasting his code across a few editors.
This combined with the SmartThings Alexa integrations works far far better than somfy’s own attempt at a skill.
Can’t wait to use this! I’ve installed it using the repository, and followed all the directions to set up my windows, but when I select up (or down) on any window, I get the following error in IDE and of course nothing happens.
dc21a393-0edb-4fb9-bba9-4b81083f5a4c 9:11:07 PM: error java.lang.NullPointerException: Cannot invoke method toFloat() on null object @line 123 (open)
dc21a393-0edb-4fb9-bba9-4b81083f5a4c 9:11:07 PM: debug Open
Hey @Tylert, so sorry about that - I’ve been thinking about how to update this to make it clearer but haven’t had much time.
You need to set an estimated time to open/close (in seconds) in the settings for each device. This allows commands like “Set blind to 50%” to work through Homekit/Google/Alexa.
Unfortunately it isn’t very accurate so I might scrap the functionality entirely.
Hi Ben, can you share the Synergy Api Spec with me? I requested the spec from Somfy but didn’t hear from them for a couple of weeks.
I can’t control my Somfy Mylink using your DH. Firstly, my Somfy iPhone App doesn’t have an integration report, not sure if this is because it is the Asia version. I can only find the Device ID (CCCC0B50) and the IP address from another page.
I used WireShark to listen to the TCP/IP traffic of MyLink app to check the TCP/IP message and port. I found that it is communicating via port 44040 and the message is not JSON.
I also tried ‘1’ or ‘CCCC0B50’ as system ID and port 44100 / 44040 and it still doesn’t work…
Hi Ben,
This functionality is great, thank you! controlling devices natively without the need for “Alexa Skills” makes for a much more fluid experience.
With that set up in mind - is there anything I can do to change the commands from “on” and “off” to “open” and “close”?
Maybe something along the lines of changing from a switch to something else?
I got around this error by commenting out the line which the IDE was complaining about. I’m happy just to have basic open/close functionality for now through SmartThings!