Re: Support for Somfy Connexoon and Tahoma
Posted: Tuesday 04 June 2024 18:54
Open source Home Automation System
https://forum.domoticz.com/
attached the logsmadpatrick wrote: ↑Tuesday 04 June 2024 18:54 2024-06-04 18_54_19-Support for Somfy Connexoon and Tahoma - Page 7 - Domoticz.png
Code: Select all
2024-06-04 19:00:37.702 Error: Tahoma_Switch: (tahomaIO) failed to load 'plugin.py', Python Path used was '/home/user/domoticz/plugins/somfy/:/usr/local/lib/python310.zip:/usr/local/lib/python3.10:/usr/local/lib/python3.10/lib-dynload:/usr/local/lib/python3.10/site-packages'.
2024-06-04 19:00:37.704 Error: Tahoma_Switch: Traceback (most recent call last):
2024-06-04 19:00:37.704 Error: Tahoma_Switch: File "/home/user/domoticz/plugins/somfy/plugin.py", line 91, in <module>
2024-06-04 19:00:37.704 Error: Tahoma_Switch: import tahoma
2024-06-04 19:00:37.704 Error: Tahoma_Switch: File "/home/user/domoticz/plugins/somfy/tahoma.py", line 1, in <module>
2024-06-04 19:00:37.704 Error: Tahoma_Switch: import requests
2024-06-04 19:00:37.704 Error: Tahoma_Switch: ModuleNotFoundError: No module named 'requests
Code: Select all
apt install python3 libpython3-dev libpython3.10-dev
madpatrick wrote: ↑Tuesday 04 June 2024 19:04 can you please try
Starting the plugin makes no sense.Code: Select all
apt install python3 libpython3-dev libpython3.10-dev
You need to install the request module
Code: Select all
user@Domoticz:~$ cd Python-3.10.13
user@Domoticz:~/Python-3.10.13$ apt install python3 libpython3-dev libpython3.10-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
user@Domoticz:~/Python-3.10.13$ sudo apt install python3 libpython3-dev libpython3.10-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpython3.10-dev
E: Couldn't find any package by glob 'libpython3.10-dev'
user@Domoticz:~/Python-3.10.13$ ^C
user@Domoticz:~/Python-3.10.13$
Code: Select all
python3 -V
Code: Select all
dpkg --get-selections | grep libpython
Code: Select all
sudo apt install libpython3.10
Code: Select all
sudo apt-get install python3-dev
Code: Select all
sudo pip3 python3-requests
Code: Select all
sudo apt-get install python3-pip
This is what all the requested actions giveJanJaap wrote: ↑Tuesday 04 June 2024 21:57 ok, so you python libs are installed in a place where domoticz isn't looking for them.
Please try the below:
Check the version:
Make sure that you have libpython installed, it needs to match the version you have. You have Python 3.10.x then you make sure you have libpython3.10. Use this command to check:Code: Select all
python3 -V
If it is not there then use :Code: Select all
dpkg --get-selections | grep libpython
If you still do not see the python version in Domoticz menu Setup - About Domoticz please install python3-dev:Code: Select all
sudo apt install libpython3.10
then try to import the library:Code: Select all
sudo apt-get install python3-dev
if no pip3:Code: Select all
sudo pip3 python3-requests
Code: Select all
sudo apt-get install python3-pip
Code: Select all
user@Domoticz:~$ python3 -V
Python 3.9.2
user@Domoticz:~$ dpkg --get-selections | grep libpython
libpython2-stdlib:arm64 install
libpython2.7-minimal:arm64 install
libpython2.7-stdlib:arm64 install
libpython3-dev:arm64 install
libpython3-stdlib:arm64 install
libpython3.9:arm64 install
libpython3.9-dev:arm64 install
libpython3.9-minimal:arm64 install
libpython3.9-stdlib:arm64 install
user@Domoticz:~$ sudo apt install libpython3.10
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpython3.10
E: Couldn't find any package by glob 'libpython3.10'
user@Domoticz:~$ sudo apt-get install python3-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-dev is already the newest version (3.9.2-3).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
user@Domoticz:~$
Code: Select all
2024-06-05 11:48:46.280 Status: PluginSystem: Started, Python version '3.10.13', 4 plugin definitions loaded.
Code: Select all
2024-07-03 09:12:35.324 Status: Somfy Tahoma IO: Stop directive received.
2024-07-03 09:12:35.412 Status: Somfy Tahoma IO: Exiting work loop.
2024-07-03 09:12:35.425 Status: Somfy Tahoma IO: Stopping threads.
2024-07-03 09:12:35.425 Status: Somfy Tahoma IO: Stopped.
2024-07-03 09:12:35.426 Status: Somfy Tahoma IO: Entering work loop.
2024-07-03 09:12:35.426 Somfy Tahoma IO: Worker thread started.
2024-07-03 09:12:35.427 Status: Somfy Tahoma IO: Started.
2024-07-03 09:12:35.814 Status: Somfy Tahoma IO: Initialized version 4.2.16, author 'MadPatrick'
2024-07-03 09:12:35.816 Status: Somfy Tahoma IO: Location does not exist, logging to default location
2024-07-03 09:12:35.816 Status: Somfy Tahoma IO: Starting Tahoma blind plugin, logging to file somfy.log
2024-07-03 09:12:35.816 Somfy Tahoma IO: Debug logging mask set to: PYTHON
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameters count: 25
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'HardwareID':'35'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'HomeFolder':'/home/pi/domoticz/plugins/somfy/'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'StartupFolder':'/home/pi/domoticz/'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'UserDataFolder':'/home/pi/domoticz/'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Database':'/home/pi/domoticz/domoticz.db'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Language':'en'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Version':'4.2.16'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Author':'MadPatrick'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Name':'Somfy Tahoma IO'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Port':'8443'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Username':'xxxxxxx@xxxxxxx'
2024-07-03 09:12:35.816 Somfy Tahoma IO: Parameter: 'Password':'xxxxxxxx'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Key':'tahomaIO'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Mode1':'False'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Mode2':'20'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Mode3':'2xxx-xxxx-xxx7'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Mode4':'Local'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'Mode6':'Debug'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'DomoticzVersion':'2024.4 (build 16110)'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'DomoticzHash':'252859365'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Parameter: 'DomoticzBuildTime':'2024-07-02 08:10:24'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration count: 5
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration 'MajorVersion':'4'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration 'MinorVersion':'2'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration 'patchVersion':'16'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration 'plugin version':'4.2.16'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Configuration 'token':'6xxxxxxxxxxxxxxxx2'
2024-07-03 09:12:35.817 Somfy Tahoma IO: Device count: 3
2024-07-03 09:12:35.817 Somfy Tahoma IO: Device: internal://2xxx-xxxx-xxx7/pod/0 - DeviceID: 'internal://2xxx-xxxx-xxx7/pod/0', Units: 1
2024-07-03 09:12:35.817 Somfy Tahoma IO: Device: io://2xxx-xxxx-xxx7/14845326 - DeviceID: 'io://2xxx-xxxx-xxx7/14845326', Units: 1
2024-07-03 09:12:35.817 Somfy Tahoma IO: Device: io://2xxx-xxxx-xxx7/285159 - DeviceID: 'io://2xxx-xxxx-xxx7/285159', Units: 1
2024-07-03 09:12:35.818 Somfy Tahoma IO: os.path.exists(Parameters['Mode5']) = False
2024-07-03 09:12:35.818 Somfy Tahoma IO: Starting version: 4.2.16
Code: Select all
2024-07-03 09:40:30.109 Status: User: Phil (IP: 192.168.1.106) initiated a switch command (1335/Store-banne/Close)
Code: Select all
2024-10-19 11:18:27.504 Status: Somfy: Initialized version 4.2.16, author 'MadPatrick'
2024-10-19 11:18:27.505 Status: Somfy: Location /var/log/somfy does not exist, logging to default location
2024-10-19 11:18:27.505 Status: Somfy: Starting Tahoma blind plugin, logging to file somfy.log
2024-10-19 11:18:27.506 Somfy: Starting version: 4.2.16
2024-10-19 11:18:33.292 Error: Somfy: Call to function 'onStart' failed, exception details:
2024-10-19 11:18:33.332 Error: Somfy: Traceback (most recent call last):
2024-10-19 11:18:33.332 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 174, in _new_conn
2024-10-19 11:18:33.332 Error: Somfy: conn = connection.create_connection(
2024-10-19 11:18:33.332 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.332 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
2024-10-19 11:18:33.332 Error: Somfy: for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
2024-10-19 11:18:33.332 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.332 Error: Somfy: File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo
2024-10-19 11:18:33.332 Error: Somfy: for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
2024-10-19 11:18:33.332 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.332 Error: Somfy: socket.gaierror: [Errno -2] Name or service not known
2024-10-19 11:18:33.332 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: During handling of the above exception, another exception occurred:
2024-10-19 11:18:33.333 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: Traceback (most recent call last):
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
2024-10-19 11:18:33.333 Error: Somfy: httplib_response = self._make_request(
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
2024-10-19 11:18:33.333 Error: Somfy: self._validate_conn(conn)
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1045, in _validate_conn
2024-10-19 11:18:33.333 Error: Somfy: conn.connect()
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 358, in connect
2024-10-19 11:18:33.333 Error: Somfy: self.sock = conn = self._new_conn()
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 186, in _new_conn
2024-10-19 11:18:33.333 Error: Somfy: raise NewConnectionError(
2024-10-19 11:18:33.333 Error: Somfy: urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fac49db10>: Failed to establish a new connection: [Errno -2] Name or service not known
2024-10-19 11:18:33.333 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: During handling of the above exception, another exception occurred:
2024-10-19 11:18:33.333 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: Traceback (most recent call last):
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
2024-10-19 11:18:33.333 Error: Somfy: resp = conn.urlopen(
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
2024-10-19 11:18:33.333 Error: Somfy: retries = retries.increment(
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 592, in increment
2024-10-19 11:18:33.333 Error: Somfy: raise MaxRetryError(_pool, url, error or ResponseError(cause))
2024-10-19 11:18:33.333 Error: Somfy: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/events/register (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fac49db10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
2024-10-19 11:18:33.333 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: During handling of the above exception, another exception occurred:
2024-10-19 11:18:33.333 Error: Somfy:
2024-10-19 11:18:33.333 Error: Somfy: Traceback (most recent call last):
2024-10-19 11:18:33.333 Error: Somfy: File "/home/Morek/domoticz/plugins/somfy/plugin.py", line 576, in onStart
2024-10-19 11:18:33.333 Error: Somfy: _plugin.onStart()
2024-10-19 11:18:33.333 Error: Somfy: File "/home/Morek/domoticz/plugins/somfy/plugin.py", line 172, in onStart
2024-10-19 11:18:33.333 Error: Somfy: self.tahoma.register_listener()
2024-10-19 11:18:33.333 Error: Somfy: File "/home/Morek/domoticz/plugins/somfy/tahoma_local.py", line 254, in register_listener
2024-10-19 11:18:33.333 Error: Somfy: response = self.listener.register_listener(self.base_url_local + "/events/register", headers=self.headers_with_token, verify=False)
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/home/Morek/domoticz/plugins/somfy/listener.py", line 42, in register_listener
2024-10-19 11:18:33.333 Error: Somfy: response = requests.post(url, headers=headers, verify=verify, timeout=timeout)
2024-10-19 11:18:33.333 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.333 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/api.py", line 115, in post
2024-10-19 11:18:33.334 Error: Somfy: return request("post", url, data=data, json=json, **kwargs)
2024-10-19 11:18:33.334 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.334 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/api.py", line 59, in request
2024-10-19 11:18:33.334 Error: Somfy: return session.request(method=method, url=url, **kwargs)
2024-10-19 11:18:33.334 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.334 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
2024-10-19 11:18:33.334 Error: Somfy: resp = self.send(prep, **send_kwargs)
2024-10-19 11:18:33.334 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.334 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
2024-10-19 11:18:33.334 Error: Somfy: r = adapter.send(request, **kwargs)
2024-10-19 11:18:33.334 Error: Somfy: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-19 11:18:33.334 Error: Somfy: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 565, in send
2024-10-19 11:18:33.334 Error: Somfy: raise ConnectionError(e, request=request)
2024-10-19 11:18:33.334 Error: Somfy: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/events/register (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fac49db10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
2024-10-19 11:18:57.090 Error: Somfy: Failed to request data: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/setup/devices (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f74f96b90>: Failed to establish a new connection: [Errno -2] Name or service not known'))
2024-10-19 11:19:02.484 RF868: Temp + Humidity (Strych)
2024-10-19 11:19:21.099 Error: Somfy: Failed to request data: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/setup/devices (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f74f97590>: Failed to establish a new connection: [Errno -2] Name or service not known'))
2024-10-19 11:19:34.153 RF868: Temp + Humidity (Lenka)
2024-10-19 11:19:44.285 RF868: Temp + Humidity (Łazienka)
2024-10-19 11:19:45.107 Error: Somfy: Failed to request data: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/setup/devices (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f74f97b10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
2024-10-19 11:20:09.115 Error: Somfy: Failed to request data: HTTPSConnectionPool(host='2034-6295-1023.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/setup/devices (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f74f97e10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Code: Select all
ERROR - plugin.py - Failed to request data: HTTPSConnectionPool(host='tahomalink.com', port=443): Max retries exceeded with url: /enduser-mobile-web/enduserAPI/login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f84119970>, 'Connection to tahomalink.com timed out. (connect timeout=10)'))
Code: Select all
ping 2115-9012-2458.local
PING 2115-9012-2458.local (192.168.0.162) 56(84) bytes of data.
64 bytes from 2115-9012-2458.local (192.168.0.162): icmp_seq=1 ttl=64 time=48.9 ms
64 bytes from 2115-9012-2458.local (192.168.0.162): icmp_seq=2 ttl=64 time=66.5 ms
64 bytes from 2115-9012-2458.local (192.168.0.162): icmp_seq=3 ttl=64 time=90.8 ms
Code: Select all
2025-03-01 18:40:43,488 - INFO - plugin.py - starting plugin version 4.2.16
2025-03-01 18:40:43,490 - INFO - plugin.py - Starting version: 4.2.16
2025-03-01 18:40:43,708 - INFO - tahoma_local.py - Tahoma authentication succeeded, login valid until 2025-03-07 18:40:43
2025-03-01 18:41:03,190 - ERROR - plugin.py - Failed to request data: HTTPSConnectionPool(host='2090-0842-4872.local', port=8443): Max retries exceeded with url: /enduser-mobile-web/1/enduserAPI/setup/devices (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa413b9a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Code: Select all
2025-03-01 19:02:59,429 - INFO - plugin.py - starting plugin version 4.2.16
2025-03-01 19:02:59,431 - INFO - plugin.py - Starting version: 4.2.16
2025-03-01 19:02:59,658 - INFO - tahoma_local.py - Tahoma authentication succeeded, login valid until 2025-03-07 19:02:59
2025-03-01 19:03:00,281 - INFO - plugin.py - New device created: Salle de bain