tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

tydom2mqtt in Home Assistant : feedback, questions and remarks.

Open schmurtzm opened this issue 3 years ago • 18 comments

Hi,

Like many , many , many , many people I had to reinit the password to make it work correctly. To reinit I used the local button on the box and then I use an old version of the app on android (v3+ as recommended in FAQ). As I don't have an android device I have used an android emulator (This NOX portable version).

I use the tydom2mqtt Home Assistant Addon. MQTT discovery has done his job, I have a lot of tydom sensors in HA. So I have some questions about the add-on in Home Assistant :

  1. By default HA create 2 button for the alarm. So what is the difference between : "Arm away" and "Arm Home" ? Is it really applicable to Tydom alarm ?
  2. I really can't use my motion detectors in Home Assistant ?
  3. What is this "cdata message" for motion detectors ? Is it an xml sent to MQTT ? Can we use it in HA (to have a presence history for example ) ?
  4. Is the parameter "TYDOM_ALARM_PIN" really useful to make the add-on working ?
  5. I would prefer to type it manually on a pinpad directly in Home Assistant UI. I see that it is possible to add a pinpad in HA so is it possible to send the typed pinpad to the tydom alarm (to avoid to put it in configuration file) ?

Some remarks :

  • Little problem on the add-on : if you don't specify a TYDOM_ALARM_PIN , it is set by default to "9999" which crash the add-on at start (it seems it require 6 characters)
  • May be a filter / additional parameters in the add-on could be useful to expose only what we need.

Thanks for the great work on this add-on !

schmurtzm avatar Dec 21 '21 23:12 schmurtzm

Thanks for your feedback!

And thanks for the guidance regarding "how to set/reset the tydom password" 👍

For most of your points, I let @mrwiwi answer because he's the Tydom expert 😄 .

For the following points...

Little problem on the add-on : if you don't specify a TYDOM_ALARM_PIN , it is set by default to "9999" which crash the add-on at start (it seems it require 6 characters)

I didn't experience it myself but I'll test it (if you have any log regarding that issue, I'm interested).

May be a filter / additional parameters in the add-on could be useful to expose only what we need.

That's a great idea. It'll require some development efforts but it should be doable. (I don't know how I could test it by myself because... I only have 1 single deltadore device at home 😂 )

fmartinou avatar Dec 22 '21 10:12 fmartinou

Here, the log of TYDOM_ALARM_PIN issue

Échec de l'enregistrement de la configuration du module complémentaire, not a valid value. Got {'TYDOM_MAC': '001A25xx', 'TYDOM_IP': '192.168.1.xx', 'TYDOM_PASSWORD': 'xx', 'TYDOM_ALARM_PIN': 999999, 'TYDOM_ALARM_HOME_ZONE': 1, 'TYDOM_ALARM_NIGHT_ZONE': 2, 'MQTT_HOST': 'xx', 'MQTT_USER': 'xx', 'MQTT_PASSWORD': 'xx', 'MQTT_PORT': 1883, 'MQTT_SSL': False, 'log_level': 'info'}

Not working with 6 characters but working by manually editing the yaml configuration file and put a single quote working with TYDOM_ALARM_PIN: '999999' and TYDOM_ALARM_PIN: '9999'

faber357 avatar Dec 22 '21 13:12 faber357

Hi,

Are you sure you have the latest version of the fmartinou repository?

Because a week ago, I changed the alarm_pin config type from int to string. (it prevented from setting values starting with a 0; see issue #2 )

In your log, it seems you still get an int so it's why I'm asking. Maybe try refreshing the fmartinou hass.io repository? If I'm right, your issue should be resolved as well 🤞 .

fmartinou avatar Dec 22 '21 16:12 fmartinou

i can't connect too my log

Starting main loop_task
/app/main.py:119: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Attempting MQTT connection...
MQTT host :  192.168.1.45
MQTT user :  usermqtt
##################################
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.1.53
Exception when trying to connect with websocket !
did not receive a valid HTTP response
wss://192.168.1.53:443/mediation/client?mac=001A2502279D&appli=1
{'Authorization': 'Digest username="001A2502279D", realm="protected area", nonce="a7d62e33da79be4bab1fad34e836f260", uri="/mediation/client?mac=001A2502279D&appli=1", response="dd363871f60012a7481f2818a40e0e07", qop="auth", nc=00000001, cnonce="a21ef990c8a01eab"'}

papo-o avatar Dec 22 '21 16:12 papo-o

Hi @papo-o , Did you take a look at issue #5? My guess it's that the same kind of issue for you (authentication error).

fmartinou avatar Dec 22 '21 17:12 fmartinou

i have 6 number in password i change the ip address with mediation.tydom.com same problem

TYDOM WEBSOCKET CONNECTION INITIALISING....                     
Building headers, getting 1st handshake and authentication....
Upgrading http connection to websocket....
Attempting websocket connection with tydom hub.......................
Host Target :
mediation.tydom.com
Exception when trying to connect with websocket !
server rejected WebSocket connection: HTTP 401
wss://mediation.tydom.com:443/mediation/client?mac=001A2502279D&appli=1
{'Authorization': 'Digest username="001A2502279D", realm="ServiceMedia", nonce="MTY0MDE5MzQ0MzI4MTpkZDE0MzU5ZDA3Yzc1OTcwNDk1ODBkZmQ0Y2YyZDRlMw==", uri="/mediation/client?mac=001A2502279D&appli=1", response="d63c505a43e283801b855882e835af77", qop="auth", nc=00000001, cnonce="8f14b15bbcbeb305"'}

papo-o avatar Dec 22 '21 17:12 papo-o

No special character in the password?

fmartinou avatar Dec 22 '21 17:12 fmartinou

no only 6 numbers

papo-o avatar Dec 22 '21 17:12 papo-o

Hi everybody, I've got the same error :Tydom rejected connection with a basic password set. Maybe due to an updade on the tydom box from Deltadore ?

Neojedy avatar Jan 02 '22 10:01 Neojedy

same error with v2.1.0 with local ip or mediation.tydom.com

2022-01-25 14:19:39,482 - tydomConnector - ERROR - wss://192.168.1.53:443/mediation/client?mac=001A2502279D&appli=1
2022-01-25 14:19:39,483 - tydomConnector - ERROR - {'Authorization': 'Digest username="001A2502280C", realm="protected area", nonce="f8999d7b54b835b37135dcbdd446ba91", uri="/mediation/client?mac=001A2502279D&appli=1", response="c97ab80e99f5a50f36b962b5b87b2fda", qop="auth", nc=00000001, cnonce="07df707382b545ae"'}

papo-o avatar Jan 25 '22 13:01 papo-o

Hi @papo-o ,

2.1.0 changes are not related to Tydom auth issues so that's normal you don't see any improvements on your end.

I keep thinking the issue is not caused by the code (because it works for most users) but rather by a specific authentication configuration on your tydom.

Personally, before I took over the project, I had spent many hours looking for why I had this damn Exception when trying to connect with websocket ! error...

...until I found a solution by downloading an old Deltadore APK, setting a new password and so on...

To help you setup your environment and confirm that your issue isn't related to tydom2mqtt, you can also try very easily the tydom-client js library

You'll quicky see if you manage to connect to your tydom:

npx tydom-client listen --username 001A25XXXXXX --password XXXXXX --hostname 192.168.x.y

fmartinou avatar Jan 25 '22 14:01 fmartinou

One thing I did as part of my troubleshooting was to set my password to 10 characters, no symbols, starting with a letter. I can't guarantee that will help, but it's worth trying to see if it does.

RosemaryOrchard avatar Jan 25 '22 15:01 RosemaryOrchard

Bon j'ai tout essayé : downgrade appli; réinitialisation password commençant par une lettre sur le tydom puis réinitialisation complète. Rien n'y fait toujours le même message d'erreur. Si vous avez d'autres idées je suis preneur.

papo-o avatar Feb 17 '22 21:02 papo-o

Hallo. Ich habe seit 1,5 Monaten Home Assistant. Von Anfang an nutze ich tydom2mqtt . Seit einer Woche bekomme ich keine Verbindung mehr zum Tydom 2.0 . Kann mir jemang hierzu behilflich sein?

TRX160UP avatar Jun 25 '22 10:06 TRX160UP

Hi @TRX160UP ,

Some other users have reported the same kind of issue from few weeks.

It's not an issue from tydom2mqtt because this app hasn't been updated recently.

It's maybe related to an update applied by Deltadore on its boxes (although I haven't found any information on this for the moment).

Try to restart the add-on, try to setup with a local IP address, with the remote mediation address... to see if one of these tries can have any positive effect...

fmartinou avatar Jun 25 '22 12:06 fmartinou

Hi fmartinou.

Ich habe einiges versucht. Tydom 2.0 neu gestartet, die Addons neu installiert, das Update getestet. Das Tydom Passwort habe ich über die alte APP Version 03.06 kontrolliert. Aber ich habe keine Verbindung. Danach habe ich ein anderes Raspberry mit Homme Assistant nur mit Mosquitto und tydom2mqtt aufgesetzt. Die gleichen Einstellungen verwendet und mit diesem Gerät klappt alles. Ich verstehe das nicht. ????????? Gruß Dieter

TRX160UP avatar Jun 29 '22 17:06 TRX160UP

Jetzt bekomme ich folgende Meldung.

2022-06-29 20_18_59-Home Assistant

TRX160UP avatar Jun 29 '22 18:06 TRX160UP

Taking a look at your logs, I have the feeling that you're container cannot reach the Tydom API (you have no http response, success or error). What destination are you using? A local IP address or mediation.tydom.com? Are you sure about your network configuration so tydom2mqtt can connect to the Tydom (locally or via internet depending on your setup)?

fmartinou avatar Jun 30 '22 07:06 fmartinou