Closed elschnet closed 6 months ago
I face the same issue (Home-Assistant integration works with the cloud, but not on the local api). I also tried multiple ways to communicate with the local api, without any answer from it as expected. It looks like somfy says online that the developer-mode is enabled, while the box didn't get the command to activate it. Is there any option to start the activation of the local api again?
Guys, shouldn't these issues be on HA's repositories instead?
There are some things that I notice:
-with gateway-nnnn-nnnn-4442.local = "Connection failed" (of course I have replaced nnnn-nnnn with my complete somfy-pin-code) -> Try with https://
Hi @BernoldNL,
thank you for your answer. Of course it is related to HA but the local gateway is not answering as expected. There should be a way to figure out if the gateway is answering at all. And for my case, I tested a lot and can say relatively sure, it doesn't answer any call so far, though somfy tells me, that the local api is working. I found a page (https://somfy-developer.github.io/Somfy-TaHoma-Developer-Mode/#/Api/get_apiVersion) where there are multiple tests available, so far, none of them worked for my system. It's not related to any port-filtering or firewall-setting. So I'am afraid, that I will not ever be able to get this system running.
Best regards!
@teddywear21 That Swagger page does not work for me either. There are a few things causing that:
If you're on Windows too, you could give the following a try from a command line:
curl https://192.168.20.123:8443/enduser-mobile-web/1/enduserAPI/apiVersion --insecure
(Replace the IP address with yours)
Note that this will only work with apiVersion. For the other commands you will need a valid token first and then pass it along.
By the way, which gateway are you using and from which geographical region (EMEA, Northern America, Asia/Pacific)?
For HA specific, maybe @tetienne may be able to point you in the right direction.
@BernoldNL The region is EMEA (Germany) and I'am using a Tahoma Switch. I'am working on ubuntu which is giving me the following response when using the IP:
I enabled / disabled ufw, which is not making any difference. The gateway answers on ping flawless...
@teddywear21 Just to be sure about the parameters I just checked on Ubuntu, but it works without a problem. (I think it should probably be something like: curl -X "GET" "https://192.168.178.135:8443/enduser-mobile-web/1/enduserAPI/apiVersion" --insecure)
I would advise you to contact Somfy support and ask them to check if Developer Mode is properly enabled. Mention that Developer Mode does not work.
@BernoldNL Thanks again! Somfy was not helpfull so far, but I sent them an e-mail again today and keep you updated.
Hi @BernoldNL, thanks for your answers.
My Region is EMEA (Germany) and I'm also using a Tahoma Switch.
I get these answer for the apiVersion:
I think my problem is maybe, that my local network is not secured?
When I try to add a new local hub with "https://10.70.80.43:8443" as Host and click the checkbox "SSL-Zertifikat überprüfen" ON, I get the result: "Es kann keine Verbindung zum Host hergestellt werden, die Zertifikatsüberprüfung ist fehlgeschlagen." (No connection to the host can be established, the certificate check has failed.)
The message in the logfile is still for port 443 here:
homeassistant.components.overkiz] Connection to host https:443 ssl:True not possible [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')]
When I try the same and the checkbox "SSL-Zertifikat überprüfen" is OFF, I get the result: "Verbindung fehlgeschlagen" (Connection failed)
What do I have to enter at Host to instruct something like "--insecure"?
I have no idea whether this is an HA or an HA-Overkiz problem :o)
I'll very busy (traveling a lot) over the next few weeks. My response times could be long. Sorry for that. If Overkiz only works with a secure local network, that's okay too. I wanted to tackle that soon anyway, when I have more time again. Best regards.
@elschnet This is clearly a different issue. The response you get from the curl command is correct. This means for your TaHoma Switch the enabling of Developer Mode has definitely been successful and it shows local API basically does work.
So it's clearly a Home Assistant issue. You need to figure out if HA can get the token that is required for the other API commands (only apiVersion does not require the token). I don't know where HA saves the token after it gets it from the cloud, otherwise you could check if it present there. I would advise you to ask the HA people for help. I'm not using HA myself (I developed an integration for a different home automation system), so unfortunately I can't help you with that.
@elschnet: Nice to see how it looks when the gateway answers. This is very helpfull for me! I tried your exact command and again, got the answer, that curl "couldn't connect to server". In addition, I tried a portscan with "sudo nmap -sT -p- 192.168.178.135", telling me, that the gateway has only one port open: 32020/tcp. Maybe you can do me a favour and try this for your system too? If your gateway answers the nmap scan differently, I hope I can tell Somfy to fix this.
@teddywear21 Oh wow. Very interesting! This is actually why I asked you about your region and gateway model. See, a user of my integration in the USA is trying with a TaHoma Switch NA (North America) version, which seems to be quite a new model over there (The common model was the TaHoma Beecon, which uses the different, closed Synergy API). His problem is exactly the same as yours.
I thought it was just a problem with the NA version, which is different anyway (no io-Homecontrol protocol). Just like you, he could enable Developer Mode. And he even got a token.
I had him do a port scan as well to compare with mine.
Here is his scan:
And mine:
As you can see, the difference is port 8443.
I asked about this in https://github.com/Somfy-Developer/Somfy-TaHoma-Developer-Mode/issues/117 Unfortunately, no reply from Somfy yet. How about you add your comment there, to let Somfy know it's not just with the NA version? Or we could open a new issue. That way @elschnet can close this one.
@BernoldNL It seems I have good news for you. After I wrote Somfy yesterday they remotely reseted my Tahoma Switch and after this, I was able to activate the developer mode again. By then port 8443 was open and answering as expected. It's a bit anoying, that I had to ask them three times about my issue, but now it's fine. Maybe this would help in your users case too. By the way: there is an option to reset the box also by the user on the Somfy website, which I didn't use as I did't want to pair the shutters again. But I'am not sure if this is what Somfy did in my case. I also didn't have to pair the shutters again. Now even HA works fine, even though I had to use the IP of the gateway instead of the name (gateway-xxxx-xxxx-xxxx.local:8443). From my side, the issue is solved.
Hi, I have the same problem. After some time, the switch is unavailable in my local network. Unavailable in my Home Assistant (Overkiz / Local API) and also in Apple Homekit. Can't ping and did not get an answer when asking for the version by curl, but still works with the cloud app. When I reboot the device, it works for some time. My WiFi is from UniFi, when I force the switch to connect to an other access point, it is also working for some time. So, could it be: a) That the switch is blocking access from local network? b) That UniFi is related to the problem?
@Schwebebahn Hi, sorry to say this, but this sounds like a different issue. You were able to integrate the system in HA, so the local API is enabled. And that it at some point stops working, even can't answer a simple ping sounds like a hardware-defect or maybe IP misconfiguration. Could there be another device using the same IP in your network? Is the IP of the gateway configured statically?
No other device is using the IP. The IP is static. I don't think it is a hardware defect, only local access by local API and HomeKit stops working. The switch is still connected to the cloud and can be controlled with the Tahoma App.
@Schwebebahn Hard to figure out what the issue is, when the device is not even answering a simple ping. Would a portscan with nmap work after the devices local api crashed? Maybe you face something like a DOS, which can happen due to multiple requests on the device. Can you capture the traffic in the network with wireshark, filtering for only the gateways ip as the target?
@BernoldNL It seems I have good news for you. After I wrote Somfy yesterday they remotely reseted my Tahoma Switch and after this, I was able to activate the developer mode again. By then port 8443 was open and answering as expected. It's a bit anoying, that I had to ask them three times about my issue, but now it's fine. Maybe this would help in your users case too. By the way: there is an option to reset the box also by the user on the Somfy website, which I didn't use as I did't want to pair the shutters again. But I'am not sure if this is what Somfy did in my case. I also didn't have to pair the shutters again. Now even HA works fine, even though I had to use the IP of the gateway instead of the name (gateway-xxxx-xxxx-xxxx.local:8443). From my side, the issue is solved.
@teddywear21 Thank you very much. I will let him know and we will see if that works for him as well.
@Schwebebahn I agree that this is a different problem. Another person that I spoke, with an older TaHoma Switch has to reboot his gateway every couple of months to keep it working (But he now does that scheduled with my integration, which has a function to Update Firmware, which makes the gateway reboot afterwards - even when there is no update available). It's not a general Unifi issue, because I'm using Unifi (UDM Pro and U6-LR APs) and have never noticed this issue.
I have a Tahoma and it has been in developer mode for several days. I can't get Overkiz to work with the local api. It doesn't matter whether I use the gateway-nnnn-nnnn-4442.local or the local IP address of the Tahome box. I have checked the Somfy credentials several times, that's not the problem - it works with the online API.
Here is a log of my last three of countless tries: -with gateway-nnnn-nnnn-4442.local = "Connection failed" (of course I have replaced nnnn-nnnn with my complete somfy-pin-code) -with http://IP-ADRESSE-TAHOMA = "Connection failed" -only with IP-ADRESS-TAHOMA = "Unknown error"
The online API works. How do I get the local api to work? What am I doing wrong? I used Home Assistant in the Docker version, if that's important.