Tydom de deltadore

Bonjour, ayant une installation delta avec une tydom, j’essaye d’utiliser mqtt2tydom.
mais je bataille un peu … installation de mqtt d’un coté et de mqtt2tydom de l’autre.
sous mqtt2tydom j’ai le message suivant

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STARTING TYDOM2MQTT
Dectecting environnement......
/data/options.json detected ! Hassio Addons Environnement : parsing options.json....
{'TYDOM_MAC': '001A2XXXXXXXX', 'TYDOM_IP': '192.168.0.10', 'TYDOM_PASSWORD': 'XXXXX', 'TYDOM_ALARM_PIN': 123456, 'TYDOM_ALARM_HOME_ZONE': 1, 'TYDOM_ALARM_NIGHT_ZONE': 2, 'MQTT_HOST': 'localhost', 'MQTT_USER': 'jppmqtt', 'MQTT_PASSWORD': 'jppmqtt', 'MQTT_PORT': 1883, 'MQTT_SSL': False, 'log_level': 'info'}
Initialising TydomClient Class
Setting local mode context.
Starting main loop_task
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Attempting MQTT connection...
MQTT host :  localhost
MQTT user :  jppmqtt
##################################
Subscribing to :  +/tydom/#
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
TYDOM WEBSOCKET CONNECTION INITIALISING....                     
Building headers, getting 1st handshake and authentication....
Upgrading http connection to websocket....
Attempting websocket connection with tydom hub.......................
Host Target :
192.168.0.10
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<listen_tydom_forever() done, defined at /opt/tydom2mqtt/main.py:104> exception=InvalidMessage('did not receive a valid HTTP response')>
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 101, in read_http_response
    status_code, reason, headers = await read_response(self.reader)
  File "/usr/lib/python3.8/site-packages/websockets/http.py", line 160, in read_response
    headers = await read_headers(stream)
  File "/usr/lib/python3.8/site-packages/websockets/http.py", line 188, in read_headers
    raise ValueError(f"invalid HTTP header line: {d(line)}") from None
ValueError: invalid HTTP header line:   realm="Protected Area",
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/opt/tydom2mqtt/main.py", line 113, in listen_tydom_forever
    await tydom_client.connect()
  File "/opt/tydom2mqtt/tydomConnector.py", line 120, in connect
    self.connection = await websockets.client.connect('wss://{}:443/mediation/client?mac={}&appli=1'.format(self.host, self.mac),
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 542, in __await_impl__
    await protocol.handshake(
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 290, in handshake
    status_code, response_headers = await self.read_http_response()
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 103, in read_http_response
    raise InvalidMessage("did not receive a valid HTTP response") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
Starting /opt/tydom2mqtt/main.py

Quelqu’un a une idée de l’erreur ? pas clair pour moi :frowning:
Merci à tous.

1 « J'aime »

Perso j’ai installé Mqtt et mqtt2tydom et celà fonctionne bien pour mes thermostats et détecteur de fenêtre/porte

Quelle version de mqtt2tydom utilises-tu ?

personnellement j’utilise celui la car l’autre ne marche pas pour mes cover
https://github.com/max5962/tydom2mqtt
Et j’ai creer mes cover dans config.yaml

 
  - platform: Tydom2MQTT
    tydomMAC: "001A2502A16B" # MAC address of your tydom
    tydomIP: "192.168.1.16"  # IP address of your tydom
    tydomPassword: "*******" #Tydom password
    mqttIP: "192.168.1.20"        # MQTT broker
    mqttPort: 1883```
```cover:

#### Volet ####

  - platform: mqtt
    name: "Volet Salon"
    state_topic: "volet salon"
    command_topic: "cover/tydom/1552989403/set_position"
    position_topic: "cover/tydom/1552989403/current_position"
    #availability_topic: "home/living/couch/cover/availability"
    set_position_topic: "cover/tydom/1552989403/set_position"
    qos: 0
    retain: false
    payload_open: "100"
    payload_close: "0"
    payload_stop: "stop"
    position_open: 100
    position_closed: 0
    #payload_available: "online"
    #payload_not_available: "offline"
    optimistic: false
    ```

Salut, je suis avec Mosquitto broker version: 5.1 et Tydom2MQTT release_0.96c

la conf de mon tydom2mqtt

TYDOM_MAC: 001A250XXXX
TYDOM_IP: 192.168.0.10
TYDOM_PASSWORD: fXXXXX
TYDOM_ALARM_PIN: '123456'
TYDOM_ALARM_HOME_ZONE: 1
TYDOM_ALARM_NIGHT_ZONE: 2
MQTT_HOST: localhost
MQTT_USER: jppmqtt
MQTT_PASSWORD: jppmqtt
MQTT_PORT: 1883
MQTT_SSL: false
log_level: info

j’ai laissé le host de MQTT a localhost car il tourne directement sous HA

dans MQTT_HOST: mets l’adresse ip

TYDOM_MAC: 001A2502A16B
TYDOM_IP: 192.168.1.16
TYDOM_PASSWORD: S*******
TYDOM_ALARM_PIN: '123456'
TYDOM_ALARM_HOME_ZONE: 1
TYDOM_ALARM_NIGHT_ZONE: 2
MQTT_HOST: 192.168.1.20
MQTT_USER: mqtt
MQTT_PASSWORD: S*******
MQTT_PORT: 1883
MQTT_SSL: false
log_level: info

Salut, pour avoir celui de max5963 comment fais-tu. Celui de GitHub - mrwiwi/tydom2mqtt: Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course. , un repo est indiqué, je suis donc passé par le repo, facile.
Pour le tien pas de repo.

si installe le repo sur HACS

J’ai bien HACS, si tu peux me guider un peu …je ne vois pas quoi faire avec …

ah si le placer dans custom_components !


en haut a droite tu clique sur les 3 petit point
puis tu clic sur custom repositories et tu met le liens dans add repositories

1 « J'aime »

le tydom2mqtt de max5962 est bien installé sous HACS
dans le fichier de conf de /config/configuration.yaml il y a :

sensor:
  - platform: Tydom2MQTT
    tydomMAC: "001A2503XXXX" # MAC address of your tydom
    tydomIP: "192.168.0.10"  # IP address of your tydom
    tydomPassword: "XXXX" #Tydom password
    mqttIP: "192.168.0.28"        # MQTT broker
    mqttPort: 1883
      

faut-il rajouter ces ligne dns la conf ? c’est indiqué sous GitHub - max5962/tydom2mqtt: Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course.

mqtt:
  broker: 192.168.0.28
  discovery: true
  discovery_prefix: homeassistant

mon Mosquitto broker est déjà configuré dans la configuration dans le supervisor comme ca :

logins:
  - username: jppmqtt
    password: jppmqtt
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

j’ai l’impression que d’un coté il faut des identifiants et de l’autre ce n’est pas précisé …

Je suis un peu perdu.
comment voir le liste des équipements deltadore qui sont trouvés ? comment deboguer.

Merci pour l’aide.

apres il faut cree tes sensor dans config yaml voici mes sensor pour des volets


#### Volet ####

  - platform: mqtt
    name: "Volet Salon"
    state_topic: "volet salon"
    command_topic: "cover/tydom/1552989403/set_position"
    position_topic: "cover/tydom/1552989403/current_position"
    #availability_topic: "home/living/couch/cover/availability"
    set_position_topic: "cover/tydom/1552989403/set_position"
    qos: 0
    retain: false
    payload_open: "100"
    payload_close: "0"
    payload_stop: "stop"
    position_open: 100
    position_closed: 0
    #payload_available: "online"
    #payload_not_available: "offline"
    optimistic: false
    
  - platform: mqtt
    name: "Volet Tv"
    state_topic: "volet tv"
    command_topic: "cover/tydom/1552989350/set_position"
    position_topic: "cover/tydom/1552989350/current_position"
    #availability_topic: "home/living/couch/cover/availability"
    set_position_topic: "cover/tydom/1552989350/set_position"
    qos: 0
    retain: false
    payload_open: "100"
    payload_close: "0"
    payload_stop: "STOP"
    position_open: 100
    position_closed: 0
    #payload_available: "online"
    #payload_not_available: "offline"
    optimistic: false

pour d’autre classe voir MQTT Sensor - Home Assistant

ok mais comment connaitre les commandes exactes des volets, lampes, thermostats ?
sur la console si je fais un mosquitto_sub -h 192.168.0.28 -t « # » -d
je ne vois rien passer, sauf si je fais explicitement un mosquitto_pub -h 192.168.0.28 -t « toto » -m 1
et je vois passer mon « 1 »
il n’y a pas un moyen de découvrir les équipements ?
Je voudrai être certain que je n’ai pas de pb de conf soit coté mosquito, soit coté mqtt2tydom.

Merci.

sur Windows installe mqtt explorer « http://mqtt-explorer.com/ » et essai de voir se qui remonte sous home assistant/tydom
tu devrais y avoir tes covers et sensor qui remonte. je ne suis pas a la maison j’ai pu te faire un screen de se que tu devrais voir

j’ai installé mqttexplorer. je ne vois dans la branche que $SYS/Broker puis client load etc.
rien vu pour tydom, bizarre …
J’ai du m’indentifier pour accéder à mqtt, alors que dans la conf de mqtt2tydom, il n’y a pas d’identifiant pour mqtt.

il n y a pas car dans ton fichier config.yaml tu declare ca ```# Tydom

  - platform: Tydom2MQTT
    tydomMAC: "001A2502A16B" # MAC address of your tydom
    tydomIP: "192.168.1.16"  # IP address of your tydom
    tydomPassword: "Sa******" #Tydom password
    mqttIP: "192.168.1.20"        # MQTT broker
    mqttPort: 1883

As tu ca dans ton fichier ? c’est un sensor

oui j’avais placé ma conf un peu plus tot hier.
Elle ne te semble pas bonne ?

tu devrais voir sur mqtt /# des truc remonter. tu possedes quoi comme Tydom ? et tu veux piloter quoi

bon j’ai tout desinstallé.

  1. j’ai installé l’addon officiel Mosquitto broker 5.1. avec login/password car pour la conf de tydom2mqtt la conf en impose un.
  2. le boker fonctionne, car sous le shell j’arrive à publier un message et le voir sous mqtt explorer
  3. j’ai installé tydom2mqtt celui de GitHub - mrwiwi/tydom2mqtt: Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course., mais une fois configuré j’ai un message d’erreur …
STARTING TYDOM2MQTT
Dectecting environnement......
/data/options.json detected ! Hassio Addons Environnement : parsing options.json....
{'TYDOM_MAC': '001A250XXX', 'TYDOM_IP': '192.168.0.10', 'TYDOM_PASSWORD': 'XXX!', 'TYDOM_ALARM_PIN': 123456, 'TYDOM_ALARM_HOME_ZONE': 1, 'TYDOM_ALARM_NIGHT_ZONE': 2, 'MQTT_HOST': 'localhost', 'MQTT_USER': 'jppmqtt', 'MQTT_PASSWORD': 'jppmqtt', 'MQTT_PORT': 1883, 'MQTT_SSL': False, 'log_level': 'info'}
Initialising TydomClient Class
Setting local mode context.
Starting main loop_task
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Attempting MQTT connection...
MQTT host :  localhost
MQTT user :  jppmqtt
##################################
Subscribing to :  +/tydom/#
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
TYDOM WEBSOCKET CONNECTION INITIALISING....                     
Building headers, getting 1st handshake and authentication....
Upgrading http connection to websocket....
Attempting websocket connection with tydom hub.......................
Host Target :
192.168.0.10
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<listen_tydom_forever() done, defined at /opt/tydom2mqtt/main.py:104> exception=InvalidMessage('did not receive a valid HTTP response')>
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 101, in read_http_response
    status_code, reason, headers = await read_response(self.reader)
  File "/usr/lib/python3.8/site-packages/websockets/http.py", line 160, in read_response
    headers = await read_headers(stream)
  File "/usr/lib/python3.8/site-packages/websockets/http.py", line 188, in read_headers
    raise ValueError(f"invalid HTTP header line: {d(line)}") from None
ValueError: invalid HTTP header line:   realm="Protected Area",
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/opt/tydom2mqtt/main.py", line 113, in listen_tydom_forever
    await tydom_client.connect()
  File "/opt/tydom2mqtt/tydomConnector.py", line 120, in connect
    self.connection = await websockets.client.connect('wss://{}:443/mediation/client?mac={}&appli=1'.format(self.host, self.mac),
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 542, in __await_impl__
    await protocol.handshake(
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 290, in handshake
    status_code, response_headers = await self.read_http_response()
  File "/usr/lib/python3.8/site-packages/websockets/client.py", line 103, in read_http_response
    raise InvalidMessage("did not receive a valid HTTP response") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
Starting /opt/tydom2mqtt/main.py

sniff …