mrwiwi / tydom2mqtt

Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course.
MIT License
28 stars 17 forks source link

Update tydomMessagehandler to add door opening sensors #30

Closed RomainGx closed 3 years ago

RomainGx commented 3 years ago

Opening sensors contain no openState attribute but an intrusionDetect attribute.

Here is the format of my sensors' config:

{
  "id_endpoint": 1591129980,
  "first_usage": "klineDetect",
  "id_device": 1591129980,
  "name": "Porte Service",
  "anticipation_start": false,
  "picto": "picto_detect_door_service",
  "last_usage": "klineDoor"
}

And the associated data:

{
  "id": XXXXXXXXXX,
  "endpoints": [
    {
      "id": XXXXXXXXXX,
      "error": 0,
      "data": [
        {
          "name": "config",
          "validity": "upToDate",
          "value": 2
        },
        {
          "name": "battDefect",
          "validity": "upToDate",
          "value": false
        },
        {
          "name": "supervisionMode",
          "validity": "upToDate",
          "value": "LONG"
        },
        {
          "name": "intrusionDetect",
          "validity": "upToDate",
          "value": false
        }
      ]
    }
  ]
}