It’s updating the status quicker now! Thanks!!
Hi, I have been using home assistant for a few weeks and I am trying to connect my Somfy home alarm. I am following your discussion very carefully and I have installed MQTT, Mosquitto Broker and the SomfyProtect2MQTT add-on (great thanks for that). But my entities are not detected. Can you help me?
Did you set user, password and site name in the configuration tab?
I completed the configuration of SomfyProtect2MQTT add-on with my settings
There is no error in the SomfyProtect2MQTT add-on’s log.
Maybe a problem with MQTT Mosquitto broker? I’m not so familiar with that
However, I’ve reading that in the log : 1617893184: New client connected from 192.168.0.254 as somfy-protect (p2, c1, k60, u’mqtt_ha’).
same thing happens to me
I’ve theses messages in the SomfyProtect2MQTT’s log :
[12:05:03] INFO: Image build
[12:05:03] INFO: starting original stuff…
2021-04-09 12:05:04,760 [INFO] Starting SomfyProtect2Mqtt
2021-04-09 12:05:04,760 [INFO] Reading config file config/config.yaml
2021-04-09 12:05:04,770 [INFO] Init SomfyProtect2Mqtt
Traceback (most recent call last):
- File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 169, in _new_conn*
- conn = connection.create_connection(*
- File “/usr/lib/python3.8/site-packages/urllib3/util/connection.py”, line 73, in create_connection*
- for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):*
- File “/usr/lib/python3.8/socket.py”, line 918, in getaddrinfo*
- for res in _socket.getaddrinfo(host, port, family, type, proto, flags):*
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
- File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 699, in urlopen*
- httplib_response = self._make_request(*
- File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 382, in _make_request*
- self._validate_conn(conn)*
- File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 1010, in _validate_conn*
- conn.connect()*
- File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 353, in connect*
- conn = self._new_conn()*
- File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 181, in _new_conn*
- raise NewConnectionError(*
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xffffbd210e80>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/requests/adapters.py”, line 439, in send
- resp = conn.urlopen(*
- File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 755, in urlopen*
- retries = retries.increment(*
- File “/usr/lib/python3.8/site-packages/urllib3/util/retry.py”, line 573, in increment*
- raise MaxRetryError(_pool, url, error or ResponseError(cause))*
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘sso.myfox.io’, port=443): Max retries exceeded with url: /oauth/oauth/v2/token (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0xffffbd210e80>: Failed to establish a new connection: [Errno -3] Try again’))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
- File “/usr/src/SomfyProtect2MQTT/somfyProtect2Mqtt/main.py”, line 29, in *
- SOMFY_PROTECT = SomfyProtect2Mqtt(CONFIG)*
- File “/usr/src/SomfyProtect2MQTT/somfyProtect2Mqtt/somfy_protect_2_mqtt.py”, line 56, in init*
- self.somfy_protect_api = init_somfy_protect(*
- File “/usr/src/SomfyProtect2MQTT/somfyProtect2Mqtt/somfy_protect.py”, line 39, in init_somfy_protect*
- set_token(api.request_token())*
- File “/usr/lib/python3.8/site-packages/somfy_protect_api/api/somfy_protect_api.py”, line 292, in request_token*
- return self._oauth.fetch_token(*
- File “/usr/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py”, line 336, in fetch_token*
- r = self.request(*
- File “/usr/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py”, line 515, in request*
- return super(OAuth2Session, self).request(*
- File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 542, in request*
- resp = self.send(prep, *send_kwargs)
- File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 655, in send*
- r = adapter.send(request, *kwargs)
- File “/usr/lib/python3.8/site-packages/requests/adapters.py”, line 516, in send*
- raise ConnectionError(e, request=request)*
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘sso.myfox.io’, port=443): Max retries exceeded with url: /oauth/oauth/v2/token (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0xffffbd210e80>: Failed to establish a new connection: [Errno -3] Try again’))
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
Sorry for spamming, it’s now ok for me. I solved my problem by correctly configuring the MQTT integration and modifying the parameters to connect Somfy add-on to the broker.
I see my somfy devices now! So good!!
Thanks for the add-on!!
Sure, I tried to confgure MQTT intégrations from some tutos found on the web defining my ip adress as broker and putting a home assistant user as broker user. By doing it I remarked that home assistant not appears in mqttexplorer and I was reading in the broker log “Can’t setup MQTT connection”
So I uninstall the integration and the broker add-on and install it again keeping default settings for theadd-on (create files acl.conf, mosquitto.conf, accesscontrollist before) and for the integration (broker = core-mosquitto, username=homeassistant…).
And for SomfyProtet2MQTT add-on configuration, be carefu to put exactly the same settings in theadd-on and in the smartphone apps and for the mqtt paragraph set host with the home assistant external ip adress, the username is a home_assitant user (can be the specific user for mqtt) and its password.
Hoping to have been clear enough.
Have a good day
Updated!! Thanks!
Hello @schumijo, I’m rebuilding my HA on a new supervised installation, but it seems I can’t install the add-on.
Do you have an idea ? Thx
21-04-14 16:01:36 ERROR (SyncWorker_4) [supervisor.docker.addon] Can't build 225db507/armv7-addon-somfy-protect-2-mqtt:0.1.1: The command '/bin/ash -o pipefail -c apk add --no-cache py3-pip' returned a non-zero code: 1
21-04-14 16:01:36 ERROR (SyncWorker_4) [supervisor.docker.addon] Build log:
Step 1/21 : ARG BUILD_FROM
Step 2/21 : FROM $BUILD_FROM
---> c04f52c3c7ff
Step 3/21 : ENV LANG C.UTF-8
---> Using cache
---> 5e0a472be2ab
Step 4/21 : ARG VERSION=0.1.1
---> Using cache
---> 3a9988cbde94
Step 5/21 : RUN apk add --no-cache py3-pip
---> Running in 6b44dead9ae8
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/armv7/APKINDEX.tar.gz
3069817744:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:
3069817744:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:
3069817744:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:
3069817744:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:
3069817744:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: Permission denied
ERROR: unable to select packages:
py3-pip (no such package):
required by: world[py3-pip]
Removing intermediate container 6b44dead9ae8
I did this on my fork, it seems working. : homeassistant-addons/build.json at e4a38015d80ba332a38dc3ce01b9c90b191b0997 · Minims/homeassistant-addons · GitHub
d
Hi @Minims
Maybe it is a temporary message as described in your logs ? If you are able to reproduce your error later I will look at your build.json file.
I can reproduce all the time in a supervised installation, it seems that alpine 3.13 have issue with Proxy. So a build file with 3.12 fix it.
This gave me the way to fix :
To come back on the initial subject (MyFox), I am using Curl command in shell script to access MyFox directly from HA. I do not need an expensive Tahoma box. I can get the status of the alarm even when changed directly from the Android App (by trapping Emails send from MyFox), send command to MyFox to change the alarm level but also to Open/Close shutters for instance… You have to create a development account on Somfy site to access the API… A token (to be refreshed regularly) is required to send commands.
small fix on dev version :
- fix trigger alarm
- fix stop alarm
- do not update devices that are not in the selected site.
will be released in master in few days
The alarm trigger does not work for me. Or my be I do not Know how to use it properly.
My yaml is
service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.maison
The alarm does not ring? What could be the issue ?
Thanks
Great to see someone is working on an integration for our Somfy Protect security systems !
I first installed homebridge and the somfy plugin, it works well, but I only have the alarm status (at least, HA refreshes the alarm status correctly after boot, while with IFTTT I need to change the state to refresh HA).
So I tried to run the SomfyProtect2MQTT plugin, and I instantly received the 20 devices from my Somfy Protect installation in Home Assistant !!
But now I have a SSH terminal running on my PC and showing the log of the plugin, will it close the plugin if I close the terminal ? and what if I reboot the Rpi ? May I need to configure the python script to run as a service ?
Thanks for your nice work