tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

Add to dashboard issue

Open am11r opened this issue 2 years ago • 9 comments

Hi, I have a strange issue… under tydom2mqtt log i can see all my lights, shutters,… when they are on/off… so it seems food for me. The probleme is that i can not see any of my captors/sensors in devices/services so i can not add them to my dashboard… Do you have any idea? Thanks for help

am11r avatar Aug 12 '23 12:08 am11r

Hi,

Under home-assistant, tydom sensors are not associated to devices so you cannot see them via the "devices" page. If you directly go to the "entities" page, can you see them?

image

fmartinou avatar Sep 02 '23 11:09 fmartinou

Bonjour @fmartinou , vous qu'on parle francais tous les 2 ce sera plus simple :) Merci pour les retours et les correctifs. Avec cette derniere mise à jour, je n'ai plus les erreurs d'avant mais que des warning:

2023-09-02 14:24:58,426 - tydom.MessageHandler - INFO - Device update (id=21, endpoint=21, name=Chambre_Parents, type=light) 2023-09-02 14:24:58,427 - sensors.Sensor - INFO - Sensor created / updated : level 0 2023-09-02 14:24:58,428 - sensors.Light - INFO - light created / updated : Chambre_Parents 21_21 0 2023-09-02 14:29:42,801 - tydom.MessageHandler - WARNING - Unknown message type received ({"status": "CLOSE", "lastAccess": "2014-01-01T00:00:00Z"}) 2023-09-02 14:54:22,830 - tydom.MessageHandler - INFO - Device update (id=12, endpoint=12, name=Rampe_cuisine, type=light) 2023-09-02 14:54:22,832 - sensors.Sensor - INFO - Sensor created / updated : level 0 2023-09-02 14:54:22,832 - sensors.Light - INFO - light created / updated : Rampe_cuisine 12_12 0 2023-09-02 14:54:22,832 - tydom.MessageHandler - INFO - Device update (id=11, endpoint=11, name=Cuisine, type=light)

tout à l'ai de fonctionner mais je n'ai rien Parametres/appareils et services/ que ce soit dans "appareils" ou "entites" ou "entrees" Je n'ai aucune integration "mqtt". J'en ai plein d'autres: freebox, tuya,... mais pas de mqtt ou tydom2mqtt sauf: Capture d’écran 2023-09-02 à 15 36 14

Merci pour votre aide bonne apres midi

am11r avatar Sep 02 '23 13:09 am11r

Bonjour @fmartinou depuis hier j'ai :

2023-09-02 18:55:26,098 - asyncio - ERROR - Future exception was never retrieved future: <Future finished exception=ConnectionClosedError(None, None, None)> websockets.exceptions.ConnectionClosedError: no close frame received or sent 2023-09-02 18:55:26,098 - asyncio - ERROR - Future exception was never retrieved future: <Future finished exception=ConnectionClosedError(None, None, None)> websockets.exceptions.ConnectionClosedError: no close frame received or sent 2023-09-02 18:55:26,098 - asyncio - ERROR - Future exception was never retrieved future: <Future finished exception=ConnectionClosedError(None, None, None)> websockets.exceptions.ConnectionClosedError: no close frame received or sent 2023-09-02 18:55:26,098 - asyncio - ERROR - Task exception was never retrieved future: <Task finished name='Task-2' coro=<listen_tydom() done, defined at /app/main.py:41> exception=NameError("name 'websockets' is not defined")> Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 959, in transfer_data message = await self.read_message() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1029, in read_message frame = await self.read_data_frame(max_size=self.max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1104, in read_data_frame frame = await self.read_frame(max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1161, in read_frame frame = await Frame.read( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/websockets/legacy/framing.py", line 68, in read data = await reader(2) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/streams.py", line 733, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.11/asyncio/streams.py", line 526, in _wait_for_data await self._waiter File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 970, in _read_ready__get_buffer nbytes = self._sock.recv_into(buf) ^^^^^^^^^^^^^^^^^^^^^^^^^ ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/main.py", line 49, in listen_tydom incoming_bytes_str = await tydom_client.connection.recv() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 568, in recv await self.ensure_open() File "/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: no close frame received or sent

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/main.py", line 56, in listen_tydom except websockets.ConnectionClosed as e: ^^^^^^^^^^ NameError: name 'websockets' is not defined

si cela peut aider à comprendre mon probleme Bon diamche

am11r avatar Sep 03 '23 11:09 am11r

Est-ce que tu as bien un broker Mqtt qui fonctionne et si oui, est-il bien configuré côté home-assistant ?

https://www.home-assistant.io/integrations/mqtt/

Si oui, avec un outil de visualisation des topics Mqtt, peux-tu voir les topics de Tydom ? Y a-t-il des messages publiés dans ces topics ?

fmartinou avatar Sep 03 '23 20:09 fmartinou

Bonjour @fmartinou Effectivement, meme si Mosquitto est bien installé et tous les paramètres ok, je n’ai pas mqtt sous l’onglet « integration ». J’ai tout tenté : désinstallation Mosquitto, réinstallation, redémarrage ha puis Mosquitto… rien C’est etrange, mais cela met hors de cause tydom2mqtt👍 Je vais continuer de chercher mais si tu as un tuyau je suis preneur 😉 Merci pour le retour

am11r avatar Sep 04 '23 07:09 am11r

Par défaut, l'intégration MQTT de HA n'est pas active ; il faut l'activer soi-même. Tu l'as fait ?

https://www.home-assistant.io/integrations/mqtt/

image

fmartinou avatar Sep 04 '23 07:09 fmartinou

Bonsoir @fmartinou , j'ai essayé mais en vain. je vais comme indiqué sur le tutoriel: intégration, ajouter, je choisi MQTT: Capture d’écran 2023-09-04 à 19 51 10

puis j'arrive sur : Capture d’écran 2023-09-04 à 19 51 18

et la je ne sais pas quoi mettre dans broder, j'ai essayer: MQTT, mosquito,... puis mes identifiants associés à mosquito (les memes que ceux pour tydom2mqtt) et j'ai toujours: erreur de connexion...

Merci pour ton aide

am11r avatar Sep 04 '23 17:09 am11r

@fmartinou Bonsoir, j'ai essayer un tas de truc, désinstallation, réinstallation, redémarrage,... MQTT n'apparait jamais automatiquement dans intégration, jeune peux pas cocher "activer". si je tente un ajout manuel, comme indiqué au dessus je ne sais pas quoi remplir... Merci par avance

am11r avatar Sep 06 '23 18:09 am11r

Dans le champ broker, il faut mettre le hostname ou l'adresse IP de mosquito. Je ne peux pas te donner la valeur exacte à mettre car elle dépend de comment tu as installé HA et Mosquito.

fmartinou avatar Sep 07 '23 05:09 fmartinou