[Plugin] Volet Velux IO-Homecontrol

Vous avez créé un script LUA dont vous êtes fier, un .sh génial, un programme Python hors du commun, un Tuto, c'est ici que vous pouvez les partager.
codercrack
Messages : 59
Inscription : 15 oct. 2016, 12:42

Re: [Plugin] Volet Velux IO-Homecontrol

Message par codercrack »

Bonjour,
Merci et bravo pour le développement de ce plugin :)
J'ai cependant un soucis, j'ai un Kit de connectivité Somfy avec un volet roulant Somfy IO.
L’intégration dans les autres systèmes comme Homebridge / Home Assistant etc... ne m'a posé aucun problème.
Par contre avec Domoticz c'est une autre histoire, j'ai bine installé les plugin avec les prérequis, celui-ci se connecte visiblement correctement :

Code : Tout sélectionner

022-09-10 13:21:34,118 - INFO     - plugin.py          - starting plugin version 2.2.0
2022-09-10 13:21:34,766 - INFO     - tahoma.py          - Tahoma authentication succeeded, login valid until 2022-09-16 13:21:34
2022-09-10 13:21:34,888 - INFO     - tahoma.py          - Tahoma listener registred
2022-09-10 13:21:34,889 - INFO     - tahoma.py          - Checking setup status at startup

Mais je n'ai aucun dispositif qui remonte.
Concernant l'OS, il s'agit de Debian 10 ;)

Merci pour votre aide
madpatrick
Messages : 12
Inscription : 04 mai 2021, 14:53

Re: [Plugin] Volet Velux IO-Homecontrol

Message par madpatrick »

Please share some more information.
Activate the debug mode and check (or post) the log file.
Essential is the somfy.log file.

S'il vous plaît partager plus d'informations.
Activez le mode débogage et vérifiez (ou publiez) le fichier journal.
L'essentiel est le fichier somfy.log.
Dernière modification par madpatrick le 11 sept. 2022, 08:42, modifié 3 fois.
codercrack
Messages : 59
Inscription : 15 oct. 2016, 12:42

Re: [Plugin] Volet Velux IO-Homecontrol

Message par codercrack »

Voici les log avec le mode débug

Code : Tout sélectionner

2022-09-10 21:16:14,285 - INFO     - plugin.py          - stopping plugin
2022-09-10 21:16:14,792 - INFO     - plugin.py          - starting plugin version 2.2.0
2022-09-10 21:16:14,792 - DEBUG    - plugin.py          - starting to log in
2022-09-10 21:16:14,801 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-09-10 21:16:15,533 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/login HTTP/1.1" 200 None
2022-09-10 21:16:15,534 - DEBUG    - tahoma.py          - Login respone: status_code: '200' reponse body: '{'success': True, 'roles': [{'name': 'ENDUSER'}]}'
2022-09-10 21:16:15,535 - INFO     - tahoma.py          - Tahoma authentication succeeded, login valid until 2022-09-16 21:16:15
2022-09-10 21:16:15,535 - DEBUG    - tahoma.py          - login: cookies: '<RequestsCookieJar[<Cookie JSESSIONID=FA674CACF0D88BF9A39731B3C1C610F6 for tahomalink.com/enduser-mobile-web>]>', headers: '{'Date': 'Sat, 10 Sep 2022 19:16:15 GM>
2022-09-10 21:16:15,535 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date >= datetime.datetime.now() = True
2022-09-10 21:16:15,535 - DEBUG    - tahoma.py          - start register
2022-09-10 21:16:15,536 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-09-10 21:16:15,585 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/register HTTP/1.1" 200 None
2022-09-10 21:16:15,586 - DEBUG    - tahoma.py          - register response: status '200' response body: '{'id': '28d4c25b-ac10-3e01-6399-5f11237bd0e2'}'
2022-09-10 21:16:15,586 - INFO     - tahoma.py          - Tahoma listener registred
2022-09-10 21:16:15,586 - INFO     - tahoma.py          - Checking setup status at startup
2022-09-10 21:16:15,586 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date >= datetime.datetime.now() = True
2022-09-10 21:16:15,586 - DEBUG    - tahoma.py          - start get devices
2022-09-10 21:16:15,587 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-09-10 21:16:15,641 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "GET /enduser-mobile-web/enduserAPI/setup/devices HTTP/1.1" 200 None
2022-09-10 21:16:15,648 - DEBUG    - tahoma.py          - get device response: url 'https://tahomalink.com:443/enduser-mobile-web/enduserAPI/setup/devices' response headers: '{'Date': 'Sat, 10 Sep 2022 19:16:15 GMT', 'Server': 'overkiz',>
2022-09-10 21:16:15,648 - DEBUG    - tahoma.py          - get device response: status '200' response body: '[{'creationTime': 1662652774000, 'lastUpdateTime': 1662652774000, 'label': 'Volet', 'deviceURL': 'ogp://2104-9448-3362/15684406',>
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: Device name: Volet Device class: Shutter
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: Device name: Connectivity kit-ledBox Device class: Light
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: Device name: io2way Device class: ProtocolGateway
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: Device name: rts Device class: ProtocolGateway
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: Device name: Connectivity kit-box Device class: ProtocolGateway
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - get_devices: devices found: 0 self.startup: True
2022-09-10 21:16:15,649 - DEBUG    - tahoma.py          - start get events
2022-09-10 21:16:15,650 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-09-10 21:16:15,697 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/28d4c25b-ac10-3e01-6399-5f11237bd0e2/fetch HTTP/1.1" 200 None
2022-09-10 21:16:15,698 - DEBUG    - tahoma.py          - get events response: status '200' response body: '[]'
2022-09-10 21:16:15,698 - DEBUG    - tahoma.py          - get_events: no DeviceStateChangedEvent found in response: []
2022-09-10 21:16:24,069 - DEBUG    - plugin.py          - Polling unit in 29 heartbeats.
2022-09-10 21:16:34,091 - DEBUG    - plugin.py          - Polling unit in 28 heartbeats.
2022-09-10 21:16:44,065 - DEBUG    - plugin.py          - Polling unit in 27 heartbeats.
2022-09-10 21:16:54,088 - DEBUG    - plugin.py          - Polling unit in 26 heartbeats.
2022-09-10 21:17:04,061 - DEBUG    - plugin.py          - Polling unit in 25 heartbeats.
2022-09-10 21:17:14,084 - DEBUG    - plugin.py          - Polling unit in 24 heartbeats.
2022-09-10 21:17:24,057 - DEBUG    - plugin.py          - Polling unit in 23 heartbeats.
2022-09-10 21:17:34,081 - DEBUG    - plugin.py          - Polling unit in 22 heartbeats.
2022-09-10 21:17:44,054 - DEBUG    - plugin.py          - Polling unit in 21 heartbeats.
2022-09-10 21:17:54,077 - DEBUG    - plugin.py          - Polling unit in 20 heartbeats.
2022-09-10 21:18:04,050 - DEBUG    - plugin.py          - Polling unit in 19 heartbeats.
2022-09-10 21:18:14,075 - DEBUG    - plugin.py          - Polling unit in 18 heartbeats.
2022-09-10 21:18:24,099 - DEBUG    - plugin.py          - Polling unit in 17 heartbeats.
2022-09-10 21:18:34,073 - DEBUG    - plugin.py          - Polling unit in 16 heartbeats.
2022-09-10 21:18:44,095 - DEBUG    - plugin.py          - Polling unit in 15 heartbeats.
2022-09-10 21:18:54,070 - DEBUG    - plugin.py          - Polling unit in 14 heartbeats.

Keros
Messages : 6638
Inscription : 23 juil. 2019, 20:57

Modération

Message par Keros »

@ madpatrick

Nous sommes sur le forum francophone, merci de rédiger vos messages en français.
madpatrick
Messages : 12
Inscription : 04 mai 2021, 14:53

Re: Modération

Message par madpatrick »

jcb2
Messages : 82
Inscription : 13 mars 2020, 10:23

Re: [Plugin] Volet Velux IO-Homecontrol

Message par jcb2 »

Bonjour,

J'ai des erreurs depuis quelques temps avec le plugin pour le contrôle des appareils (Vélux et store) via la box Connexoon.

Voici un log :

Code : Tout sélectionner

2023-01-02 10:10:21.685 Status: Domoticz V2022.2 (c)2012-2022 GizMoCuz
2023-01-02 10:10:21.685 Status: Build Hash: eea9db734, Date: 2022-11-05 13:05:35
2023-01-02 10:10:21.685 Status: Startup Path: /home/jcb/domoticz/
2023-01-02 10:10:23.214 Sunrise: 08:47:00 SunSet: 16:51:00
2023-01-02 10:10:23.214 Day length: 08:04:00 Sun at south: 12:49:00
2023-01-02 10:10:23.214 Civil twilight start: 08:08:00 Civil twilight end: 17:30:00
2023-01-02 10:10:23.214 Nautical twilight start: 07:26:00 Nautical twilight end: 18:12:00
2023-01-02 10:10:23.214 Astronomical twilight start: 06:46:00 Astronomical twilight end: 18:52:00
2023-01-02 10:10:23.921 Active notification Subsystems: email (1/13)
2023-01-02 10:10:23.998 Starting shared server on: :::6144
2023-01-02 10:10:23.864 Status: PluginSystem: Started, Python version '3.9.2', 3 plugin definitions loaded.
2023-01-02 10:10:23.927 Status: WebServer(HTTP) started on address: :: with port 8080
2023-01-02 10:10:23.991 Status: WebServer(SSL) started on address: :: with port 8483
2023-01-02 10:10:24.000 Status: TCPServer: shared server started...
2023-01-02 10:10:24.004 Status: RxQueue: queue worker started...
2023-01-02 10:10:26.013 Connexoon Somfy Vélux: Worker thread started.
2023-01-02 10:10:26.012 Status: Météo: Worker started...
2023-01-02 10:10:26.013 Status: Connexoon Somfy Vélux: Started.
2023-01-02 10:10:26.014 Status: Connexoon Somfy Vélux: Entering work loop.
2023-01-02 10:10:26.014 Status: NotificationSystem: thread started...
2023-01-02 10:10:26.014 Status: EventSystem: reset all events...
2023-01-02 10:10:26.022 Status: EventSystem: reset all device statuses...
2023-01-02 10:10:26.214 Status: RF Link (via Arduino USB): Using serial port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
2023-01-02 10:10:26.339 Status: PluginSystem: 1 plugins started.
2023-01-02 10:10:27.011 Status: MQTT: Connecting to localhost:1883
2023-01-02 10:10:27.144 Status: RF Link (via Arduino USB): Controller Initialized!...
2023-01-02 10:10:27.212 Status: MQTT: connected to: localhost:1883
2023-01-02 10:10:27.220 Status: RF Link (via Arduino USB): RFLink Detected, Version: 1.1 Revision: 48 Build: 4
2023-01-02 10:10:27.938 Status: Python EventSystem: Initializing event module.
2023-01-02 10:10:27.945 Status: EventSystem: Started
2023-01-02 10:10:27.945 Status: EventSystem: Queue thread started...
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Debug logging mask set to: PYTHON
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameters count: 25
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'HardwareID':'58'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'HomeFolder':'/home/jcb/domoticz/plugins/somfy/'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'StartupFolder':'/home/jcb/domoticz/'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'UserDataFolder':'/home/jcb/domoticz/'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Database':'/home/jcb/domoticz/domoticz.db'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Language':'fr'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Version':'4.2.1'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Author':'MadPatrick'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Name':'Connexoon Somfy Vélux'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Port':'8443'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Username':'jean-charles.*******@******.***'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Password':'********'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Key':'tahomaIO'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Mode1':'False'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Mode2':'300'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Mode3':'0828-8553-9093'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Mode4':'Web'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'Mode6':'Debug'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'DomoticzVersion':'2022.2'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'DomoticzHash':'eea9db734'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Parameter: 'DomoticzBuildTime':'2022-11-05 13:05:35'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Configuration count: 4
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Configuration 'MajorVersion':'4'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Configuration 'MinorVersion':'2'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Configuration 'patchVersion':'1'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Configuration 'plugin version':'4.2.1'
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device count: 6
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: internal://0828-8553-9093/pod/0 - DeviceID: 'internal://0828-8553-9093/pod/0', Units: 1
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: io://0828-8553-9093/13219150 - DeviceID: 'io://0828-8553-9093/13219150', Units: 1
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: io://0828-8553-9093/15363054 - DeviceID: 'io://0828-8553-9093/15363054', Units: 1
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: io://0828-8553-9093/6070825 - DeviceID: 'io://0828-8553-9093/6070825', Units: 1
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: io://0828-8553-9093/7444963 - DeviceID: 'io://0828-8553-9093/7444963', Units: 1
2023-01-02 10:10:30.569 Connexoon Somfy Vélux: Device: io://0828-8553-9093/8877583 - DeviceID: 'io://0828-8553-9093/8877583', Units: 1
2023-01-02 10:10:30.571 Connexoon Somfy Vélux: os.path.exists(Parameters['Mode5']) = False
2023-01-02 10:10:30.572 Connexoon Somfy Vélux: Starting version: 4.2.1
2023-01-02 10:10:30.567 Status: Connexoon Somfy Vélux: Initialized version 4.2.1, author 'MadPatrick'
2023-01-02 10:10:30.568 Status: Connexoon Somfy Vélux: Location does not exist, logging to default location
2023-01-02 10:10:30.569 Status: Connexoon Somfy Vélux: Starting Tahoma blind plugin, logging to file somfy.log
2023-01-02 10:12:40.443 Status: User: Admin (IP: 192.168.2.91) initiated a switch command (542/Store rivière/Set Level)
2023-01-02 10:12:40.727 Error: Connexoon Somfy Vélux: Call to function 'onCommand' failed, exception details:
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: Traceback (most recent call last):
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/plugin.py", line 587, in onCommand
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: _plugin.onCommand(DeviceId, Unit, Command, Level, Color)
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/plugin.py", line 267, in onCommand
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: self.tahoma.send_command(self.command_data)
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/tahoma.py", line 206, in send_command
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: self.handle_response(response, "send command")
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/tahoma.py", line 221, in handle_response
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code))
2023-01-02 10:12:40.729 Error: Connexoon Somfy Vélux: exceptions.TahomaException: failed request during send command, check credentials: 401
J'ai retiré la version nonolk et je suis passé sur la version MadPatrick, j'ai bien récupéré tous mes devices mais j'ai toujours le même problème pour l'utilisation
Ca fonctionne dès fois pour le setLevel mais pas tout le temps, pour le open et close par contre ça foire tout le temps ... étrange.

Est-ce que d'autres utilisateurs de la box Connexoon ont des soucis ?

Merci,

Jean-Charles
NUC en Debian 13 via Proxmox
Beaucoup de SonOff flashé Tasmota (en Wifi)
RF Link - Stations Netatmo
Box Somfy Connexoon pour volets Vélux et stores Somfy
... et pour combiner le tout, plein de script LUA pour automatiser la maison
jcb2
Messages : 82
Inscription : 13 mars 2020, 10:23

Re: [Plugin] Volet Velux IO-Homecontrol

Message par jcb2 »

Visiblement le plugin est en cours d'adaptation pour des problèmes avec l'API de Somfy : https://github.com/MadPatrick/somfy/issues/33

Le fait que ça soit aléatoire est aussi expliqué. Affaire a suivre donc !
NUC en Debian 13 via Proxmox
Beaucoup de SonOff flashé Tasmota (en Wifi)
RF Link - Stations Netatmo
Box Somfy Connexoon pour volets Vélux et stores Somfy
... et pour combiner le tout, plein de script LUA pour automatiser la maison
jcb2
Messages : 82
Inscription : 13 mars 2020, 10:23

Re: [Plugin] Volet Velux IO-Homecontrol

Message par jcb2 »

Pour info le nouveau plugin est complétement opérationnel avec la connexoon : https://github.com/MadPatrick/somfy
Merci a JanJaapKo et MadPatrick pour leur travail !!
NUC en Debian 13 via Proxmox
Beaucoup de SonOff flashé Tasmota (en Wifi)
RF Link - Stations Netatmo
Box Somfy Connexoon pour volets Vélux et stores Somfy
... et pour combiner le tout, plein de script LUA pour automatiser la maison
nene82
Messages : 61
Inscription : 17 févr. 2017, 11:05

Re: [Plugin] Volet Velux IO-Homecontrol

Message par nene82 »

Bonjour tout le monde,
J'essaie désespérément (depuis une bonne année maintenant) de mettre en œuvre ce plugin mais bute sur le chapitre "Configuration de l'accès API locale".
j'ai essayé de suivre les instructions fournies par Somfy, https://github.com/Somfy-Developer/Somf ... loper-Mode, mais force est de constater que je suis dans mes limites.
J'ai à peut près réussi à mettre en œuvre le reste du Post en suivant des tutos ci et là, mais pour ce chapitre là, je sèche.
Est que quelqu'un aurait trouvé un tuto un peu plus précis que celui proposé par Somfy ou aurait des infos à me communiquer qui me permettraient de finaliser, à défaut d'avancer.
je vous remercie par avance,
JP
Nota :
Domoticz tourne sur une VM installée sur ma freebox Delta.
Au regard des logs, le plugin Python est fonctionnel et démarre.
nene82
Messages : 61
Inscription : 17 févr. 2017, 11:05

Re: [Plugin] Volet Velux IO-Homecontrol

Message par nene82 »

ben dis donc!
Répondre