tydom2MQTT addon :D - Delta Dore Tydom to MQTT Broker

I fixed this in a recent PR, so that should be solved now!

Can we have any motion detector activity and door sensor status ??
It would be a great enhancement !
Also can we have the info of who desarmed the alarm? I have a push notif saying the alarm have been disarmed, but i want to know who did it. I will know when my children are at home.

It seems this application for homebridge is providing relevant data : https://github.com/mgcrea/node-tydom-client
I can see in live motion detection or door opening by executing the command line below :

npx tydom-client listen --username 001A25XXXXXX --password XXXXXX

motionDetect or intrusionDetect switch from false to true instantely.

Does anyone have an idea how to grab theses data to home assistant or to integrate theses functions in the tydom add-on of @fmartinou ?

Hello,

I just migrated my tydom2mqtt add-on from mrwiwi’s Github repository to fmartinou’s.

I saw in the 2.0.1 changelog “Fix sensor type for windows giving status (OPEN, CLOSE, OPEN_HOPPER) and Fix wrong binary_sensor type in some cases”

But my window and door sensors are not reporting correctly on HA. However when an opening is detected it appears in the logs of tydom2MQTT

2022-03-05 10:46:02,751 - sensors - INFO - Binary sensor created / updated: intrusionDetect_tydom__Bureau True
2022-03-05 10:46:02,751 - tydomMessagehandler - INFO - Incoming data parsed successfully!
2022-03-05 10:46:27,151 - sensors - INFO - Binary sensor created / updated: intrusionDetect_tydom__Bureau False
2022-03-05 10:46:27,151 - tydomMessagehandler - INFO - Incoming data parsed successfully!

If I want the sensors to work correctly I have to add this kind of lines in configuration.yaml

binary_sensor:
  - platform: mqtt
    name: Bureau
    state_topic: "binary_sensor/tydom/intrusionDetect_tydom_1616951540_1616951540/state"
    payload_on: true
    payload_off: false
    device_class: windows

My sensors are correctly configured as a window or door on the Tydom application

My lovelace card :

tempsnip

Is it possible to improve the automatic integration of sensors so that “device_class” is up to date?

Thanks for your work!

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