tydom2MQTT addon :D - Delta Dore Tydom to MQTT Broker

Thanks to @mimil, I notice in the logs that there is a trigger when I open/close my door.
It means something happen. But the point is the door detector is not recognized :

I have a DO BL. These detector is well associated to my tyxal alarm, but I cannot add it directly in the tydom app. Is it related ?
What am I doing wrong ? :roll_eyes:

New info, my detector and motion sensor are empty for last_usage in the data :

{'id_endpoint': 1590338186
, 'picto': ''
, 'name': 'équipement non géré'
, 'id_device': 1590338189
, 'anticipation_start': False
, 'first_usage': ''
, 'last_usage': ''}

Is this normal ?

Also, for all binary sensor, the value are all at “unknown” state. It seems we miss somthing.
By switching them in classic sensor, I state is well reported as “False” or “True”.
Binary sensor

Same sensor but not in binary sensor

Last point, I don’t understand this code :

Currently, I don’t have any pincode to enter from homeassistant, but I have one on my real alarm panel of course! It should be done in the other way. If we fullfill a alarm_pin in the setup, we should have the code_arm_required to true !
@fmartinou : can you fix this or I do a mistake ?

Hello Guys,

I’am facing issue to configure the addon from fmartinou for tydom.

Working on HAssIO on Raspberry Pi4, already install mosquitto broker and configure it
Deploying tydom2MQTT addon and configuring it.
I use mqtt explorer on windows to connect to broker to check if tydom send information and i see nothing, just the SYS branch.

Looking into addon log give me these information :

2022-03-31 09:18:16,908 - main - INFO - STARTING TYDOM2MQTT
2022-03-31 09:18:16,908 - main - INFO - Detecting environnement…
2022-03-31 09:18:16,908 - main - INFO - /data/options.json detected ! Hassio Addons Environnement : parsing options.json…
2022-03-31 09:18:16,909 - tydomConnector - INFO - Initialising TydomClient Class
2022-03-31 09:18:16,909 - tydomConnector - INFO - Setting local mode context.
2022-03-31 09:18:16,913 - main - INFO - Starting main loop_task
/app/main.py:141: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
2022-03-31 09:18:16,916 - mqtt_client - INFO - “”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”
2022-03-31 09:18:16,916 - mqtt_client - INFO - Attempting MQTT connection…
2022-03-31 09:18:16,916 - mqtt_client - INFO - MQTT host : 192.168.0.131
2022-03-31 09:18:16,917 - mqtt_client - INFO - MQTT user : mqtt
2022-03-31 09:18:16,919 - gmqtt.mqtt.protocol - INFO - [CONNECTION MADE]
2022-03-31 09:18:16,922 - mqtt_client - INFO - ##################################
2022-03-31 09:18:16,922 - mqtt_client - INFO - Subscribing to : +/tydom/#
2022-03-31 09:18:16,922 - gmqtt.mqtt.package - INFO - [SEND SUB] 1 [b’homeassistant/status’]
2022-03-31 09:18:16,925 - gmqtt.mqtt.package - INFO - [SEND SUB] 2 [b’+/tydom/#']
2022-03-31 09:18:16,928 - gmqtt.mqtt.handler - INFO - [SUBACK] 1 (0,)
2022-03-31 09:18:16,929 - gmqtt.mqtt.handler - INFO - [SUBACK] 2 (0,)
2022-03-31 09:18:16,929 - tydomConnector - INFO - “”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”
2022-03-31 09:18:16,929 - tydomConnector - INFO - TYDOM WEBSOCKET CONNECTION INITIALISING…
2022-03-31 09:18:16,930 - tydomConnector - INFO - Building headers, getting 1st handshake and authentication…
2022-03-31 09:20:27,176 - gmqtt.mqtt.connection - WARNING - [LOST HEARTBEAT FOR 120 SECONDS, GOING TO CLOSE CONNECTION]
Traceback (most recent call last):
File “/app/main.py”, line 226, in
loop_task()
File “/app/main.py”, line 148, in loop_task
loop.run_until_complete(listen_tydom_forever(tydom_client))
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 641, in run_until_complete
return future.result()
File “/app/main.py”, line 160, in listen_tydom_forever
await tydom_client.connect()
File “/app/tydomConnector.py”, line 106, in connect
conn.request(
File “/usr/local/lib/python3.10/http/client.py”, line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/local/lib/python3.10/http/client.py”, line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.10/http/client.py”, line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.10/http/client.py”, line 1037, in _send_output
self.send(msg)
File “/usr/local/lib/python3.10/http/client.py”, line 975, in send
self.connect()
File “/usr/local/lib/python3.10/http/client.py”, line 1447, in connect
super().connect()
File “/usr/local/lib/python3.10/http/client.py”, line 941, in connect
self.sock = self._create_connection(
File “/usr/local/lib/python3.10/socket.py”, line 845, in create_connection
raise err
File “/usr/local/lib/python3.10/socket.py”, line 833, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out

If anybody could help me to implement this part :slight_smile:

Thanks !

Hello
Trying to relaunch the topic, i have progess on resolution and now i got another error into mosquitto log

Does anyboday have an idea to solve it ?

Hello Lionel,
I am in the same situation, correctly received when alarm is armed or disarmed, but arming and disarming alarm is not working :frowning:

Hello Alex,
I’ve just installed HA yesterday, and still struggling with a few bits, but I got same error message you reported. In my case it was due to error/mismatch in MQTT(mosquito) and tydom2mqtt add-ons setup.
IIRC, <unknown>, disconnecting message relates to SSL/secured connection on one side, while other has it disabled.
Hope this helps…

Look here guys !
https://forum.hacf.fr/t/tydom-de-deltadore/1642/44

Hi all,
I’m currently adding some new features (motion & door detector) from @fmartinou repo.
It seems to work when launching from a python console.
But now i would like to integrate it completely to HA from my hassio repo but I don’t succeed.
Can you help me ? If my test are correct, i will push a POUR to add theses features to @fmartinou .
Here is my repo : fransiouz (fransiouz) · GitHub
The issue I have when I try to install my addon:

Thanks !

I succeed to deploy and build the docker image correctly in github finally.
If someone wants to give a try, here is my repo with raise of door and motion detector : GitHub - fransiouz/hassio-addons
Anyway, it works with my config plugged on a tydom 2.0 video.

@fmartinou: get in touch with me if you think we can do a POUR

1 Like

@fmartinou: get in touch with me if you think we can do a POUR

For sure!
Once you think it’s ready, feel free to open a PR to my github and we’ll see to merge it into the main repo.

I have a Tyxal CSX40 alarm and I have the same problem turning the alarm on and off. Have you found a solution?

Hello, I’ve just update with latest ha version 2022.6.5, and tydom2mqtt is’nt working anymore
with 2022.6.4 it worked.
here is the error in log :slight_smile:
INFO - """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2022-06-11 22:49:00,144 - tydomConnector - INFO - TYDOM WEBSOCKET CONNECTION INITIALISING.... 2022-06-11 22:49:00,144 - tydomConnector - INFO - Building headers, getting 1st handshake and authentication.... Traceback (most recent call last): File "/app/main.py", line 226, in <module> loop_task() File "/app/main.py", line 148, in loop_task loop.run_until_complete(listen_tydom_forever(tydom_client)) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete return future.result() File "/app/main.py", line 160, in listen_tydom_forever await tydom_client.connect() File "/app/tydomConnector.py", line 106, in connect conn.request( File "/usr/local/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/local/lib/python3.10/http/client.py", line 975, in send self.connect() File "/usr/local/lib/python3.10/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, File "/usr/local/lib/python3.10/ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1070, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1341, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

Hi,

I’ve just updated to HA 2022.6.5 and all is working fine.
I don’t understand how an HA update could have a side effect on another Docker container? :thinking:
(tydom2mqtt hasn’t be updated within the last 2 months)

The only common item between tydom2mqtt and HA is the MQTT broker (Mosquitto…).

What tydom address are you using? (local IP address or mediation.tydom.com)?

Got same issue and just reboot my tydom 2.0. Then everything come back normally
Seems nothing to deal with HA but more a delta dore update :face_with_monocle:

2 Likes

Hi all,
I’m trying to configure this add-on, but I have always this error (with or without IP specified):

2022-06-24 16:56:23,044 - tydomConnector - ERROR - Exception when trying to connect with websocket !
2022-06-24 16:56:23,045 - tydomConnector - ERROR - server rejected WebSocket connection: HTTP 401
2022-06-24 16:56:23,048 - tydomConnector - ERROR - wss://192.168.1.181:443/mediation/client?mac=001A25XXXXXX&appli=1
2022-06-24 16:56:23,048 - tydomConnector - ERROR - {‘Authorization’: ‘Digest username=“001A25XXXXXX”, realm=“protected area”, nonce=“84aa1456ac8494545c6de3003fdfbd8e”, uri="/mediation/client?mac=001A25XXXXXX&appli=1", response=“dcd5fc406476e3d0461625fb1078cdcb”, qop=“auth”, nc=00000001, cnonce=“9e1cb689135dff39”’}

Of course my tydom MAC is well renseigned, I masked it in these logs.
Thanks a lot for any support !

Hi,

You have an authentication issue.
You likely have an error with your password.
Please notice that it’s not the password of your deltadore account but the password of the tydom box

See here how to renew it

Thanks a lot ! It works well now.
Thanks for your add-on !

1 Like

I also managed to get it working with node-tydom-client :slight_smile:
I tried with the simple example on node-tydom-client webpage with my id’s :

await client.put(/devices/${7}/endpoints/${7}/data , [
{
name: ‘alarmCmd’,
value: ‘OFF’,
pwd: ‘XXXX’
}

it works :slight_smile:
But with Tydom2mqtt, it still doesn’t work :frowning:

Hello, I installed HA (version 2022.6.7) few days ago, and today tydom2mqtt isn’t working anymore, it’s the same log than @cob94440. If someone can help me because I just start in HA recently.

(@G0nitte Paste the stack trace instead of an image next time, it is easier for people to find your post if they have the same issue)

Does this thread (in french) help ? Some people seem to have the same issue.

Did you try restarting your Tydom?