There is a new API from Somfy. It is called Synergy. If someone wants to try to use the myLink here is the API
For z-wave systems that use Somfyâs RTS motors I think the ZRTSI would still be a better option. Itâs cheaper (most of the time) and, can control up to 16 individual motors or groups (MyLink can only do 5), and we have had plenty of range complaints with the MyLink (only 1 or 2 with a ZRTSI).
V2 of the myLink will fix that issue with range. It will now have dual antennas (one vertical and one horizontal) for better transmission of RTS signals. It is now 2.4ghz, 5ghz compatible.
Download the new spec page. The legacy myLink was designed to be a zone controller, not a whole house controller.
Hi everyone, I donât use ST but thought I might share here in case it might be helpful for others (I know I searched for many months to find good info on myLink integration with my home automation setup!).
Thanks to a really helpful engineer at Somfy (enormous props to Rick R.!!) I was able to navigate through the Somfy Synergy API that Matthews Family mentioned, and have myLink working with my home automation setup (all open source, I use EventGhost for managing/scheduling various tasks and typically just short python or perl or even Windows .bat snippets to actually get the work done, with HA Bridge for coupling to Alexa). Iâve just started to dabble with the API and can open and shut our blinds and awnings, but still need to get some free time to work on %age/partial opening and closing).
So your myLink device has itâs own IP address assigned when it connects to your router (I got the IP address of my two units from my routerâs âconnected devicesâ page). myLink basically uses simple JSON commands sent to those IP addresses on port 44100.
So if youâre on a Mac or Linux, you can open a terminal to connect to your myLink like so:
nc 192.168.1.35 44100
Thereâs supposedly an nc for Windows but itâs a bit quirky, so I just used Puttyâs command line tool (plink.exe).
If you successfully connect, youâll occasionally (every 15 seconds or so) see a keepalive message coming from the myLink device. Success! Now you can simply post a piece of JSON code with the intended command:
{ âidâ: 1, âmethodâ: âmylink.move.downâ, âparamsâ: { âtargetIDâ: âAAAA111.1â, âauthâ: âblindsâ }{âjsonrpcâ:â2.0â,âresultâ:true,âidâ:1}
(substitute âmylink.move.upâ as your method if youâre moving the blinds up)
Of course, your âparamsâ will be specific to your system⌠here the target ID is the set of blinds the command will be sent to (a short alphanumeric string with a decimal at the end, usually .1, .2, .3 etc. to distinguish different blinds/myLink devices in your system). The âauthâ is the name of the system, in this case itâs just âblindsâ, but you can change this in your myLink iOS/Android app.
The values for these âparamsâ can be seen in the latest myLink app⌠thereâs a new section on the myLink API in the app, and it can email you an âintegration reportâ that shows all the needed values including your system ID, IP address, and all of your connected blinds target IDs and names.
I can post a copy of Somfyâs API that has some of the other JSON commands, if thereâs interest (people can request it from Somfy on their website as well, which might be better as it lets them gauge what sort of interest there is⌠important for us getting e.g. native Alexa support on a future update!).
So in my present âquick and dirtyâ implementation, I just put together a simple Windows .batch file that executes plink.exe and pipes in the JSON text, so that anything that can execute a Windows .bat file can control my blinds. Iâve created two .bat files for each of our blinds, one to open and the other to close, and from there these can be integrated into whatever home automation software youâre using.
Thereâs still more Iâd like to do particularly on blind partial opening and closing, but I wanted to at least post what I have so far to see if itâs helpful for people to get their myLink system integrated, and share some ideas on how to put Somfyâs API to work. No doubt there are more elegant solutions and Iâd love to hear about these from people that are better at coding than I⌠which is probably most of you :)!
JR90210, please post your scripts if possible. I have the MyLink and would love to integrate it with SmartThings.
Sure, so hereâs the JSON object that I send to myLink to move our living room blinds down:
{âidâ: 1,âmethodâ:âmylink.move.downâ,âparamsâ:{âtargetIDâ:âAAAA1111A.4â,âauthâ:âOurSomfyâ}}
(just to reiterate, the targetID and auth will depend on your system⌠use your myLink app to get these values. Use mylink.move.up to retract your blinds.)
There are lots of ways to get that JSON to your myLink system. For Windows, one easy way is to use Puttyâs command line interface (plink.exe). So I type that JSON object into a file called âawning.in.jsonâ, which is just a plain text file done in Windows Notepad. Now put that awning.in.json file in your PuTTy directory where plink.exe exists, and you can use a Windows .bat file and put the following lines into it:
cd c:\stuff\PuTTY
plink -raw 192.168.1.100 -P 44100 < awning.in.json
That 2nd line basically opens a line of communication to your myLink IP (change that IP to match your mylink) on port 44100, then pipes in the awnin.in.json JSON object.
Now anything that you can use to execute a Windows batch file (EventGhost, Windows Task Scheduler, etc.) can be used to control your myLink.
As mentioned above, there are lots of ways to skin that cat⌠you just need a way to send plain text JSON objects to the myLink IP and port. plink.exe and Windows batch files are pretty primitive, but they get the job done and take about 30 seconds to put together once you figure out how to structure those JSON commands.
Let me know if this helps!
So Iâm trying to do this and not having any luck. I created the json file on my windows 10 machine with the below:
{âidâ: 1,âmethodâ:âmylink.move.upâ,âparamsâ:{âtargetIDâ:âCD10012A.1â,âauthâ:âHomeâ}}
If I type âplink -raw 192.168.1.2 -P 44100 < somfy.jsonâ without quotes in the directory where I have plink and the json script, and hit return, nothing happens. No errors. If I try plink -raw 192.168.1.2 -P 44100 I do see the {âmethodâ:âmylink.status.keepaliveâ} every 15 seconds or so. Not sure what to do. My targetID is correct since this is what i got from going into the myLink app, Integration, Get Integration Report.
Is the âauthâ definitely the Name parameter in myLink?
Everything looks right. If you just do the plink -raw 192.168.1.2 -p 44100, you should be able to paste in JSON commands, and your myLink should send a reply whether itâs understanding your JSON line or not. What happens if you copy/paste in your JSON line?
Just want to make sure itâs not something with the way your JSON is formatted (or encoded⌠in my case, if I save my plain text file as UTF-8 instead of ANSI, myLink doesnât understand the JSON and throws an error⌠itâs finicky!).
Yep the auth is definitely the Name parameter. I originally was trying to use our systemâs pin code for the auth, but thatâs not needed at all.
so when I paste in the json line, I get the below error.
{âjsonrpcâ:â2.0â,âerrorâ:{âcodeâ:-32000,âmessageâ:âAuthentication failedâ},âidâ:1}
I tried everything I could think of for the auth parameter. Including the pin code. I also tried changing the name of the system to something other than âHomeâ and tried that as the auth. No luck. Thereâs also no documentation out there for this API other than the page posted in this thread. I guess Iâll have to talk to Somfy support about this.
All that needs to be done is a SmartApp to pull all of your shades from each myLink. Then have DTH take over for the commands.
Might take a me a while but I think I can write something up once Rick gets me an updated copy of the API.
Any update on getting access to the API?
Yup I did receive it. I havenât started to write the SmartApp yet.
Oh and if you didnât know, the Somfy myLink is now a 16 channel controller. It was recently updated along with the Alexa integration.
sources: https://service.somfy.com/downloads/nam_v4/mylink_v2_and_legacy_spec_sheets_11.20.17.pdf
Beyond up/down/stop what else does the API allow one to do?
Any chance you could share the specification? Iâve had issues hearing back from Somfy and Iâm very keen to get something put together. Unless theres a licensing issue preventing you of course
@matthewsfamily0914 just wondering if you had an opportunity to take a stab at the SmartApp. I am definetly not a development guy. I am on the infrastructure side of IT but would be willing to contribute.
Any progress or ability to share the spec?
Hi Everyone,
Iâve made a start on a DTH here which is functional enough to raise and lower roller blinds via the MyLink hub.
I have not received the API specification so there is still a long list of things I would like to implement once I do (I.E Autodiscovery of all devices and scenes on the MyLink controller, âMyâ button functionality). But in the meantime until I receive the specification Iâm hoping it is functional enough for some use-cases
Find it here: