[BETA] [RELEASE] Somfy TaHoma Switch Driver

Played around today with integrating my TaHoma Switch into Hubitat so I can control my RTS blinds using the rule engine in Hubitat as the TaHoma Switch is quite limited.

Somfy TaHoma Switch Driver for Hubitat on github

This uses the new Developer Mode feature of TaHoma Switch. All Somfy devices are controlled via the LAN. Only the initial auth between Hubitat and the TaHoma Switch needs to go over the internet. There's also a periodic security token refresh that needs internet access.

It only works with RTS blinds at present as that's all I have registered with my TaHoma Switch. It should be easy enough to add more device types now the core integration is in place.

2 Likes

Hi @keithw

I've been trying to get this to work but to no avail. Just a few questions if you can help:

  • is the user name my email address
  • is it the modem pin which I use and do I strip out the spaces and hyphens from the pin
  • where do I turn on developer mode in the App.

Thanks in advance, I'm soooo eager to get my RTS blinds working via Hubitat without the need for Alexa ,:+1::thinking:

Hi Stuey

There are some more instructions here: https://github.com/bitlush/hubitat/blob/main/drivers/TaHoma%20Switch/README.md

The account details (e.g. email address) are your somfy online account details. The same you need to login to the app.

Getting the PIN is a pain, You can’t do it in the app. You need to login in to somfy online with your TaHoma switch account. Same for the developer account activation: Somfy Open API Developer Portal | Developer Mode

Use the PIN as is without stripping out the spaces.

Hope that helps.

Keith

Hi Keith, I've turned on developer mode. I've done all that you've said. But I can't see my somfy blinds displaying in the device list. The logs are showing an error. Could you help in any other way please.


Hi Stuey

You’re almost there. Happy to help get this working for you.

The driver assumes the URL for the TaHoma Switch is: https://gateway-${tahomaPin}:8443

If you have a PC could you open a command prompt and try pinging your hub:

ping gateway-xxxx-xxxx-xxxx

And see what happens?

Hubitat doesn’t support mDNS which is needed for device discovery. So it could be that this works on my network but does not work in general.

A quick hack - if your router supports it - might be to give your TaHoma switch a name of gateway-xxxx-xxxx-xxxx (replace x’s with your pin).

Hi Keith,
I am almost there yet, also stuck at this point and unable to ping the gateway-xxxx-xxxx-xxxx
also my router does not support the ability to name the device, however, it does see it as the active host name but unable to ping it. (Using a Mikrotik router)
Is there a way forward.
Thanks

Hi, do you know the IP address of you TaHoma Switch. Is it pingable from its IP? And can you telnet to the IP on port 8443. You can do this using the Windows/Mac/Linux command "telnet IP 443". Also is your network using IPv4 or IPv6?

Just want to check whether this is a network issue before I add a feature to specify the IP address of the TaHoma in the driver for the situation you are describing :slight_smile:

Hi Keith, Yes able to ping the Tahoma switch. Also able to telnet to 443 and 8443 to a blank response and ipv4. ip of Tahoma is (192.168.1.55).
ie..
telnet 192.168.1.55 8443
Trying 192.168.1.55...
Connected to 192.168.1.55.
Escape character is '^]'.

Connection closed by foreign host
Connection gets closed approx 10 seconds later for 443 and 8443.

Thanks for checking. I've pushed a new version of the driver that will allow you to specify the IP address of your TaHoma Switch. Make sure you assign a static IP to your TaHoma switch in your router though to avoid it changing, most are configured to dynamically assign IP addresses.

Hi Keith,

Works perfectly on the RTS blind. No more errors. Already have set it as Static, due to router having to be rebooted, following ISP planned outages.
Thanks so much for the prompt response. Appreciated.
Mano

That's great news. The driver has been rock solid for me, have fun automating :slight_smile:

@keithw , do you know if this works with the TaHoma BEACON? I'm speaking with Somfy's support... apparently the "switch" is different than the "beacon". I cannot seem to get this thing into a Zigbee pairing mode, and don't recall how I originally integrated it to SmartThings
TaHoma Beacon

If the Beacon supports the Somfy API then yes it will. However, you don't "pair" the beacon with hubitat using Zigbee or Z-wave. You simply install the Hubitat driver and that will connect to your TaHoma device over your local network using a HTTP based API.

Got it, thanks so much for your assistance! I'm a SmartThings convert and am still in learning curve mode :blush:
Somfy is sitting on my Developer Mode request, hopefully they'll approve on Monday- so I'm a sitting duck at the moment, but what/where in HE will I see to show me that we're good? I assumed I'd have to connect your driver to a "device", but apparently not. Would I just do whatever I need via RM or BR? Thx again, and again apologies for baby questions!

It might be worth revisiting the setup instructions. Step 4 is to add a Virtual Device and associate the TaHoma driver with it.

Thank you for creating this driver. I am new to both Hubitat and Somfy TaHoma and I am keen to learn the nuts and bolts (I do have some programming in my background and would love to contribute in the future)

I have installed the newest driver with the IP address option (and my TaHoma Switch is on a static IP) and it has correctly linked to my switch now. However the Refresh Devices button does not pick up my 2 RTS blinds.

Looking at the logs it seems to be having issues with the line 145 'def expires = new Date(token.expirationTime)'

Logs:
[dev:9] error java.lang.IllegalArgumentException: null on line 145 (method refreshDevices)
[dev:9] debug tahoma_switch getAvailableTokens: [

]

If I have read that correctly.

I will keep trying to understand your code and the TaHoma API calls, but if there is any direction you can point me in I would be most grateful.

Thank you.

1 Like

Thanks, looks like Somfy have updated their API so that tokens don't always specify their expiration. I've pushed a fix. Let me know how you get on.

Excellent! Thank you, the devices now refresh and I have 2 blinds now.
Just need to install the other 2 :slight_smile:

1 Like

@keithw , Revisiting this from a few months ago. So it turns out that Somfy will not grant Developer Access for the Beacon in the U.S. So that would mean I cannot use your drivers?

Really want/need my blinds & curtains accessible in Rules Machine. Crazy & unreliable how I have it now…. RM performs a bunch of actions, including turning on a Virtual Switch. In the Alexa app, I’ve got a routine that triggers when the VS goes on, and Alexa then operates the blinds. But invariably at least one of the 3 blinds doesn’t open (or close) as directed in the Alexa routine.

@MERRICK, sorry to hear that. Unfortunately that rules out my driver.

The best bet might be to write off the TaHoma Beacon and look into getting a Bond Bridge instead which Hubitat has built-in support for. If I'd known about the Bond Bridge earlier in my journey I might have got that over the TaHoma Switch as I only got the TaHoma box to control my RTS devices.

1 Like