Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. Hilfe bei NodeRed wegen Status Fenster/Türen - GELÖST

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.9k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.3k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.4k

Hilfe bei NodeRed wegen Status Fenster/Türen - GELÖST

Geplant Angeheftet Gesperrt Verschoben Node-Red
16 Beiträge 2 Kommentatoren 1.2k Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • mickymM Offline
    mickymM Offline
    mickym
    Most Active
    schrieb am zuletzt editiert von
    #7

    Hier die relevanten Nodes nochmal zum Import (letzter Stand mit immer Array):

    [
       {
           "id": "6c6901822b24f320",
           "type": "change",
           "z": "7e6af0015415146d",
           "name": "Fenster zu",
           "rules": [
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "[payload.*[payload.contact=true].item.friendly_name]",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "payload ? payload : \"Alle Fenster geöffnet\"",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 550,
           "y": 7060,
           "wires": [
               [
                   "5960a47fef812439"
               ]
           ]
       },
       {
           "id": "5960a47fef812439",
           "type": "debug",
           "z": "7e6af0015415146d",
           "name": "Fenster geschlossen",
           "active": true,
           "tosidebar": true,
           "console": false,
           "tostatus": false,
           "complete": "payload",
           "targetType": "msg",
           "statusVal": "",
           "statusType": "auto",
           "x": 800,
           "y": 7060,
           "wires": []
       },
       {
           "id": "3aa357dca689ad3f",
           "type": "change",
           "z": "7e6af0015415146d",
           "name": "Fenster offen",
           "rules": [
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "[payload.*[payload.contact=false].item.friendly_name]",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "payload ? payload : \"Alle Fenster geschlossen\"",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 550,
           "y": 7120,
           "wires": [
               [
                   "da1365a7f5a03cfc"
               ]
           ]
       },
       {
           "id": "da1365a7f5a03cfc",
           "type": "debug",
           "z": "7e6af0015415146d",
           "name": "Fenster geöffnet",
           "active": true,
           "tosidebar": true,
           "console": false,
           "tostatus": false,
           "complete": "payload",
           "targetType": "msg",
           "statusVal": "",
           "statusType": "auto",
           "x": 780,
           "y": 7120,
           "wires": []
       }
    ]
    

    Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

    mac89mucM 1 Antwort Letzte Antwort
    0
    • mickymM mickym

      Hier die relevanten Nodes nochmal zum Import (letzter Stand mit immer Array):

      [
         {
             "id": "6c6901822b24f320",
             "type": "change",
             "z": "7e6af0015415146d",
             "name": "Fenster zu",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "[payload.*[payload.contact=true].item.friendly_name]",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload ? payload : \"Alle Fenster geöffnet\"",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 550,
             "y": 7060,
             "wires": [
                 [
                     "5960a47fef812439"
                 ]
             ]
         },
         {
             "id": "5960a47fef812439",
             "type": "debug",
             "z": "7e6af0015415146d",
             "name": "Fenster geschlossen",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 800,
             "y": 7060,
             "wires": []
         },
         {
             "id": "3aa357dca689ad3f",
             "type": "change",
             "z": "7e6af0015415146d",
             "name": "Fenster offen",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "[payload.*[payload.contact=false].item.friendly_name]",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload ? payload : \"Alle Fenster geschlossen\"",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 550,
             "y": 7120,
             "wires": [
                 [
                     "da1365a7f5a03cfc"
                 ]
             ]
         },
         {
             "id": "da1365a7f5a03cfc",
             "type": "debug",
             "z": "7e6af0015415146d",
             "name": "Fenster geöffnet",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 780,
             "y": 7120,
             "wires": []
         }
      ]
      

      mac89mucM Offline
      mac89mucM Offline
      mac89muc
      schrieb am zuletzt editiert von
      #8

      @mickym Wow - vielen Dank. Probiere ich die nächsten Tage aus und melde mich wieder. So, oder so schon mal vielen Dank

      1 Antwort Letzte Antwort
      0
      • mickymM Offline
        mickymM Offline
        mickym
        Most Active
        schrieb am zuletzt editiert von mickym
        #9

        Falls Du doch lieber mit Javascript programmieren willst, habe ich Dir noch eine function Node gebastelt mit 2 Ausgängen, für Fenster offen und geschlossen.

        05c34d75-a6b5-4893-8a04-a6572923fb3f-image.png

        Hier zum Import:

        [
           {
               "id": "3da931fb6f59da6d",
               "type": "inject",
               "z": "7e6af0015415146d",
               "name": "Daten von zigbee2mqtt",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "{\"0x54ef44100025b758\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor E1\",\"exposes\":[{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates if the battery of this device is almost empty\",\"label\":\"Battery low\",\"name\":\"battery_low\",\"property\":\"battery_low\",\"type\":\"binary\",\"value_off\":false,\"value_on\":true},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ14LM\",\"options\":[],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genPowerCfg\",\"genIdentify\",\"ssIasZone\",\"manuSpecificLumi\"],\"output\":[\"genIdentify\",\"genOta\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Küche FensterR Contact\",\"ieee_address\":\"0x54ef44100025b758\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.magnet.acn001\",\"network_address\":1783,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":89,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:46:47+01:00\",\"linkquality\":98,\"power_outage_count\":0,\"tamper\":false,\"voltage\":2983},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":89,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Küche FensterR Contact\",\"selector\":\"zigbee2mqtt_KcheFensterRContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":89,\"StatusLowBattery\":0}},\"payload\":{\"battery\":89,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:46:47+01:00\",\"linkquality\":98,\"power_outage_count\":0,\"tamper\":false,\"voltage\":2983},\"format\":{}},\"0x54ef44100025b3ff\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor E1\",\"exposes\":[{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates if the battery of this device is almost empty\",\"label\":\"Battery low\",\"name\":\"battery_low\",\"property\":\"battery_low\",\"type\":\"binary\",\"value_off\":false,\"value_on\":true},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ14LM\",\"options\":[],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genPowerCfg\",\"genIdentify\",\"ssIasZone\",\"manuSpecificLumi\"],\"output\":[\"genIdentify\",\"genOta\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Küche FensterL Contact\",\"ieee_address\":\"0x54ef44100025b3ff\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.magnet.acn001\",\"network_address\":30725,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":78,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:53:33+01:00\",\"linkquality\":76,\"power_outage_count\":1,\"tamper\":false,\"voltage\":2967},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":78,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Küche FensterL Contact\",\"selector\":\"zigbee2mqtt_KcheFensterLContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":78,\"StatusLowBattery\":0}},\"payload\":{\"battery\":78,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:53:33+01:00\",\"linkquality\":76,\"power_outage_count\":1,\"tamper\":false,\"voltage\":2967},\"format\":{}},\"0x00158d0006bd1963\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Studio FensterR Contact\",\"ieee_address\":\"0x00158d0006bd1963\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":39306,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":16,\"last_seen\":\"2025-02-18T16:47:16+01:00\",\"linkquality\":105,\"power_outage_count\":73,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Studio FensterR Contact\",\"selector\":\"zigbee2mqtt_StudioFensterRContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":16,\"last_seen\":\"2025-02-18T16:47:16+01:00\",\"linkquality\":105,\"power_outage_count\":73,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d00019f3819\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Bad Fenster Contact\",\"ieee_address\":\"0x00158d00019f3819\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":30025,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:08:11+01:00\",\"linkquality\":160,\"power_outage_count\":241,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Bad Fenster Contact\",\"selector\":\"zigbee2mqtt_BadFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:08:11+01:00\",\"linkquality\":160,\"power_outage_count\":241,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0006b7d36c\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Schlafzimmer Fenster Contact\",\"ieee_address\":\"0x00158d0006b7d36c\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":61288,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:23:11+01:00\",\"linkquality\":109,\"power_outage_count\":103,\"trigger_count\":0,\"voltage\":3025},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Schlafzimmer Fenster Contact\",\"selector\":\"zigbee2mqtt_SchlafzimmerFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:23:11+01:00\",\"linkquality\":109,\"power_outage_count\":103,\"trigger_count\":0,\"voltage\":3025},\"format\":{}},\"0x00158d0006b7ccb9\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Lina Fenster Contact\",\"ieee_address\":\"0x00158d0006b7ccb9\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":30017,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":23,\"last_seen\":\"2025-02-18T17:00:27+01:00\",\"linkquality\":160,\"power_outage_count\":24,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Lina Fenster Contact\",\"selector\":\"zigbee2mqtt_LinaFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":23,\"last_seen\":\"2025-02-18T17:00:27+01:00\",\"linkquality\":160,\"power_outage_count\":24,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0001dd431f\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"WC Fenster Contact\",\"ieee_address\":\"0x00158d0001dd431f\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":50753,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:47:38+01:00\",\"linkquality\":160,\"power_outage_count\":55,\"trigger_count\":0,\"voltage\":3045},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/WC Fenster Contact\",\"selector\":\"zigbee2mqtt_WCFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:47:38+01:00\",\"linkquality\":160,\"power_outage_count\":55,\"trigger_count\":0,\"voltage\":3045},\"format\":{}},\"0x00158d0001ddef66\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Dachbodenfenster Contact\",\"ieee_address\":\"0x00158d0001ddef66\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":42946,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":13,\"last_seen\":\"2025-02-18T17:26:36+01:00\",\"linkquality\":109,\"power_outage_count\":450,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Dachbodenfenster Contact\",\"selector\":\"zigbee2mqtt_DachbodenfensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":false,\"device_temperature\":13,\"last_seen\":\"2025-02-18T17:26:36+01:00\",\"linkquality\":109,\"power_outage_count\":450,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0001ddc8e5\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Studio FensterL Contact\",\"ieee_address\":\"0x00158d0001ddc8e5\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":16276,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:32:29+01:00\",\"linkquality\":76,\"power_outage_count\":160,\"trigger_count\":0,\"voltage\":3125},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Studio FensterL Contact\",\"selector\":\"zigbee2mqtt_StudioFensterLContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:32:29+01:00\",\"linkquality\":76,\"power_outage_count\":160,\"trigger_count\":0,\"voltage\":3125},\"format\":{}}}",
               "payloadType": "json",
               "x": 260,
               "y": 7160,
               "wires": [
                   [
                       "e29d13e39355375d",
                       "6c6901822b24f320",
                       "3aa357dca689ad3f",
                       "c7b9a3945149aaa6"
                   ]
               ]
           },
           {
               "id": "e29d13e39355375d",
               "type": "debug",
               "z": "7e6af0015415146d",
               "name": "Daten von zigbee2mqtt",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 550,
               "y": 7080,
               "wires": []
           },
           {
               "id": "6c6901822b24f320",
               "type": "change",
               "z": "7e6af0015415146d",
               "name": "Fenster zu",
               "rules": [
                   {
                       "t": "set",
                       "p": "topic",
                       "pt": "msg",
                       "to": "Fenster geschlossen",
                       "tot": "str"
                   },
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "[payload.*[payload.contact=true].item.friendly_name]",
                       "tot": "jsonata"
                   },
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload ? payload : \"Alle Fenster geöffnet\"",
                       "tot": "jsonata"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 510,
               "y": 7260,
               "wires": [
                   [
                       "5960a47fef812439"
                   ]
               ]
           },
           {
               "id": "5960a47fef812439",
               "type": "debug",
               "z": "7e6af0015415146d",
               "name": "Fenster geschlossen (JSONATA)",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 780,
               "y": 7260,
               "wires": []
           },
           {
               "id": "3aa357dca689ad3f",
               "type": "change",
               "z": "7e6af0015415146d",
               "name": "Fenster offen",
               "rules": [
                   {
                       "t": "set",
                       "p": "topic",
                       "pt": "msg",
                       "to": "Fenster geöffnet",
                       "tot": "str"
                   },
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "[payload.*[payload.contact=false].item.friendly_name]",
                       "tot": "jsonata"
                   },
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload ? payload : \"Alle Fenster geschlossen\"",
                       "tot": "jsonata"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 510,
               "y": 7300,
               "wires": [
                   [
                       "da1365a7f5a03cfc"
                   ]
               ]
           },
           {
               "id": "da1365a7f5a03cfc",
               "type": "debug",
               "z": "7e6af0015415146d",
               "name": "Fenster geöffnet (JSONATA)",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 760,
               "y": 7300,
               "wires": []
           },
           {
               "id": "c7b9a3945149aaa6",
               "type": "function",
               "z": "7e6af0015415146d",
               "name": "Fenster offen",
               "func": "var arrOpened=[];\nvar arrClosed=[];\nfor (var key in msg.payload){\n    var obj;\n    obj = msg.payload[key];\n    obj.payload.contact ? arrClosed.push(obj.item.friendly_name) : arrOpened.push(obj.item.friendly_name)\n}\n \nreturn [{ topic: \"Fenster geschlossen\", payload: arrClosed.length > 0 ? arrClosed : \"Alle Fenster geöffnet\"  },\n    {topic: \"Fenster geöffnet\", payload: arrOpened.length > 0 ? arrOpened : \"Alle Fenster geschlossen !\" }];",
               "outputs": 2,
               "timeout": 0,
               "noerr": 0,
               "initialize": "",
               "finalize": "",
               "libs": [],
               "x": 510,
               "y": 7160,
               "wires": [
                   [
                       "2f4bbe40257a37f3"
                   ],
                   [
                       "041a44ac252bbd51"
                   ]
               ]
           },
           {
               "id": "2f4bbe40257a37f3",
               "type": "debug",
               "z": "7e6af0015415146d",
               "name": "Fenster geschlossen (Javascript)",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 780,
               "y": 7140,
               "wires": []
           },
           {
               "id": "041a44ac252bbd51",
               "type": "debug",
               "z": "7e6af0015415146d",
               "name": "Fenster geöffnet (Javascript)",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 760,
               "y": 7180,
               "wires": []
           }
        ]
        

        Der Code mit Javascript ist natürlich länger:

        var arrOpened=[];
        var arrClosed=[];
        for (var key in msg.payload){
            var obj;
            obj = msg.payload[key];
            obj.payload.contact ? arrClosed.push(obj.item.friendly_name) : arrOpened.push(obj.item.friendly_name)
        }
         
        return [{ topic: "Fenster geschlossen", payload: arrClosed.length > 0 ? arrClosed : "Alle Fenster geöffnet"  },
            {topic: "Fenster geöffnet", payload: arrOpened.length > 0 ? arrOpened : "Alle Fenster geschlossen !" }];
        

        Aber ich habe die function Node gleich mit 2 Ausgängen gebastelt, so dass oben die geschlossenen Fenster und unten die offenen Fenster ausgegeben werden.

        Ich würde Dir aber trotzdem raten auf function Nodes so lange wie möglich zu verzichten - da Du sonst leicht wieder in Versuchung kommst, herkömmlichen Code zu schreiben - mit Schleifen etc.

        Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

        mac89mucM 1 Antwort Letzte Antwort
        0
        • mickymM mickym

          Falls Du doch lieber mit Javascript programmieren willst, habe ich Dir noch eine function Node gebastelt mit 2 Ausgängen, für Fenster offen und geschlossen.

          05c34d75-a6b5-4893-8a04-a6572923fb3f-image.png

          Hier zum Import:

          [
             {
                 "id": "3da931fb6f59da6d",
                 "type": "inject",
                 "z": "7e6af0015415146d",
                 "name": "Daten von zigbee2mqtt",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"0x54ef44100025b758\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor E1\",\"exposes\":[{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates if the battery of this device is almost empty\",\"label\":\"Battery low\",\"name\":\"battery_low\",\"property\":\"battery_low\",\"type\":\"binary\",\"value_off\":false,\"value_on\":true},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ14LM\",\"options\":[],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genPowerCfg\",\"genIdentify\",\"ssIasZone\",\"manuSpecificLumi\"],\"output\":[\"genIdentify\",\"genOta\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Küche FensterR Contact\",\"ieee_address\":\"0x54ef44100025b758\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.magnet.acn001\",\"network_address\":1783,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":89,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:46:47+01:00\",\"linkquality\":98,\"power_outage_count\":0,\"tamper\":false,\"voltage\":2983},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":89,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Küche FensterR Contact\",\"selector\":\"zigbee2mqtt_KcheFensterRContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":89,\"StatusLowBattery\":0}},\"payload\":{\"battery\":89,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:46:47+01:00\",\"linkquality\":98,\"power_outage_count\":0,\"tamper\":false,\"voltage\":2983},\"format\":{}},\"0x54ef44100025b3ff\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor E1\",\"exposes\":[{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates if the battery of this device is almost empty\",\"label\":\"Battery low\",\"name\":\"battery_low\",\"property\":\"battery_low\",\"type\":\"binary\",\"value_off\":false,\"value_on\":true},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ14LM\",\"options\":[],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genPowerCfg\",\"genIdentify\",\"ssIasZone\",\"manuSpecificLumi\"],\"output\":[\"genIdentify\",\"genOta\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Küche FensterL Contact\",\"ieee_address\":\"0x54ef44100025b3ff\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.magnet.acn001\",\"network_address\":30725,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":78,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:53:33+01:00\",\"linkquality\":76,\"power_outage_count\":1,\"tamper\":false,\"voltage\":2967},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":78,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Küche FensterL Contact\",\"selector\":\"zigbee2mqtt_KcheFensterLContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":78,\"StatusLowBattery\":0}},\"payload\":{\"battery\":78,\"battery_low\":false,\"contact\":true,\"last_seen\":\"2025-02-18T16:53:33+01:00\",\"linkquality\":76,\"power_outage_count\":1,\"tamper\":false,\"voltage\":2967},\"format\":{}},\"0x00158d0006bd1963\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Studio FensterR Contact\",\"ieee_address\":\"0x00158d0006bd1963\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":39306,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":16,\"last_seen\":\"2025-02-18T16:47:16+01:00\",\"linkquality\":105,\"power_outage_count\":73,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Studio FensterR Contact\",\"selector\":\"zigbee2mqtt_StudioFensterRContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":16,\"last_seen\":\"2025-02-18T16:47:16+01:00\",\"linkquality\":105,\"power_outage_count\":73,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d00019f3819\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Bad Fenster Contact\",\"ieee_address\":\"0x00158d00019f3819\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":30025,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:08:11+01:00\",\"linkquality\":160,\"power_outage_count\":241,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Bad Fenster Contact\",\"selector\":\"zigbee2mqtt_BadFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:08:11+01:00\",\"linkquality\":160,\"power_outage_count\":241,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0006b7d36c\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Schlafzimmer Fenster Contact\",\"ieee_address\":\"0x00158d0006b7d36c\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":61288,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:23:11+01:00\",\"linkquality\":109,\"power_outage_count\":103,\"trigger_count\":0,\"voltage\":3025},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Schlafzimmer Fenster Contact\",\"selector\":\"zigbee2mqtt_SchlafzimmerFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":18,\"last_seen\":\"2025-02-18T17:23:11+01:00\",\"linkquality\":109,\"power_outage_count\":103,\"trigger_count\":0,\"voltage\":3025},\"format\":{}},\"0x00158d0006b7ccb9\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Lina Fenster Contact\",\"ieee_address\":\"0x00158d0006b7ccb9\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":30017,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":23,\"last_seen\":\"2025-02-18T17:00:27+01:00\",\"linkquality\":160,\"power_outage_count\":24,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Lina Fenster Contact\",\"selector\":\"zigbee2mqtt_LinaFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":23,\"last_seen\":\"2025-02-18T17:00:27+01:00\",\"linkquality\":160,\"power_outage_count\":24,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0001dd431f\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"WC Fenster Contact\",\"ieee_address\":\"0x00158d0001dd431f\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":50753,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:47:38+01:00\",\"linkquality\":160,\"power_outage_count\":55,\"trigger_count\":0,\"voltage\":3045},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/WC Fenster Contact\",\"selector\":\"zigbee2mqtt_WCFensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:47:38+01:00\",\"linkquality\":160,\"power_outage_count\":55,\"trigger_count\":0,\"voltage\":3045},\"format\":{}},\"0x00158d0001ddef66\":{\"item\":{\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"icon\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAABhXpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2VVFtugzAQ/N9T9Ahmn/ZxKNh/lfrZ43fXUB4BFBUrJLFnZ2ZHtuHn6xs+4pFSgCbLNFrW2ZLOKsY6YIr/Omk1ijWaEXVQ1qaoQuMyv6EbIibYaXzyM0ok8ywJE5M280JMpFgp9Q9STSOmGG4BnVxpFGQG1hf9ZTE8ZGMfiUbXbNYfrOYgrF3CsNFAJQY2oEToE+jveSHxb7LitG7bMs4hEMu7l1dHzCpgpOQTpbdWPIXqDleA54Ku7UmEQw/iRHQcluHQVBDpXVvdU93j9t+en87e8FoTrQ09xHa1vjXwJzByL7dwLN4+LR1Q9aQm2Fmfge8EJAtClDh8iiQ2hUh3OkoE9A65S8CDRrkvvJFYkfCs8ZBT7KCism6PrQ4iqFNOD8B3AiBJswZRW85OpyFeNqQYrtGfSC/tOQf8l+TJGWysN+GKN+h7nm88XNBwhL+eJWzH03Q9TMebAHZwXAassdgpLrdUrMAvbhQcoxzYWVIAAAABb3JOVAHPoneaAAB8D0lEQVR42u39eZxkWVbfCf7Ove+ZmZvvsWVk5FK5VGVVVgIFimJRCYmIGWZKI0GxqD3YVUULFd108xH6SCC1+EjhMZ8ZNDNaWqNGS43UCKmhYTwQtARCIBpFIJUaWmQAVUVlLVmVS2XGHh6+mbuZvffuPf3He8/8mbmZufkabua/b34s3cOW5+7v3XfP75x77jkAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhB...\",\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[],\"output\":[]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Dachbodenfenster Contact\",\"ieee_address\":\"0x00158d0001ddef66\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":42946,\"power_source\":\"Battery\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":13,\"last_seen\":\"2025-02-18T17:26:36+01:00\",\"linkquality\":109,\"power_outage_count\":450,\"trigger_count\":0,\"voltage\":3005},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Dachbodenfenster Contact\",\"selector\":\"zigbee2mqtt_DachbodenfensterContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":false,\"device_temperature\":13,\"last_seen\":\"2025-02-18T17:26:36+01:00\",\"linkquality\":109,\"power_outage_count\":450,\"trigger_count\":0,\"voltage\":3005},\"format\":{}},\"0x00158d0001ddc8e5\":{\"item\":{\"date_code\":\"20161128\",\"definition\":{\"description\":\"Door and window sensor\",\"exposes\":[{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Remaining battery in %, can take up to 24 hours before reported\",\"label\":\"Battery\",\"name\":\"battery\",\"property\":\"battery\",\"type\":\"numeric\",\"unit\":\"%\",\"value_max\":100,\"value_min\":0},{\"access\":1,\"description\":\"Indicates if the contact is closed (= true) or open (= false)\",\"label\":\"Contact\",\"name\":\"contact\",\"property\":\"contact\",\"type\":\"binary\",\"value_off\":true,\"value_on\":false},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Temperature of the device\",\"label\":\"Device temperature\",\"name\":\"device_temperature\",\"property\":\"device_temperature\",\"type\":\"numeric\",\"unit\":\"°C\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Voltage of the battery in millivolts\",\"label\":\"Voltage\",\"name\":\"voltage\",\"property\":\"voltage\",\"type\":\"numeric\",\"unit\":\"mV\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Number of power outages\",\"label\":\"Power outage count\",\"name\":\"power_outage_count\",\"property\":\"power_outage_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Indicates how many times the sensor was triggered (since last scheduled report)\",\"label\":\"Trigger count\",\"name\":\"trigger_count\",\"property\":\"trigger_count\",\"type\":\"numeric\"},{\"access\":1,\"category\":\"diagnostic\",\"description\":\"Link quality (signal strength)\",\"label\":\"Linkquality\",\"name\":\"linkquality\",\"property\":\"linkquality\",\"type\":\"numeric\",\"unit\":\"lqi\",\"value_max\":255,\"value_min\":0}],\"model\":\"MCCGQ11LM\",\"options\":[{\"access\":2,\"description\":\"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.\",\"label\":\"Device temperature calibration\",\"name\":\"device_temperature_calibration\",\"property\":\"device_temperature_calibration\",\"type\":\"numeric\"}],\"supports_ota\":false,\"vendor\":\"Aqara\"},\"disabled\":false,\"endpoints\":{\"1\":{\"bindings\":[],\"clusters\":{\"input\":[\"genBasic\",\"genIdentify\",\"65535\",\"genOnOff\"],\"output\":[\"genBasic\",\"genGroups\",\"65535\"]},\"configured_reportings\":[],\"scenes\":[]}},\"friendly_name\":\"Studio FensterL Contact\",\"ieee_address\":\"0x00158d0001ddc8e5\",\"interview_completed\":true,\"interviewing\":false,\"manufacturer\":\"LUMI\",\"model_id\":\"lumi.sensor_magnet.aq2\",\"network_address\":16276,\"power_source\":\"Battery\",\"software_build_id\":\"3000-0001\",\"supported\":true,\"type\":\"EndDevice\",\"current_values\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:32:29+01:00\",\"linkquality\":76,\"power_outage_count\":160,\"trigger_count\":0,\"voltage\":3125},\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"format\":{}},\"topic\":\"zigbee2mqtt/Studio FensterL Contact\",\"selector\":\"zigbee2mqtt_StudioFensterLContact\",\"homekit\":{\"ContactSensor\":{\"ContactSensorState\":0},\"ContactSensor_Inverse\":{\"ContactSensorState\":1},\"Battery\":{\"BatteryLevel\":100,\"StatusLowBattery\":0}},\"payload\":{\"battery\":100,\"contact\":true,\"device_temperature\":12,\"last_seen\":\"2025-02-18T16:32:29+01:00\",\"linkquality\":76,\"power_outage_count\":160,\"trigger_count\":0,\"voltage\":3125},\"format\":{}}}",
                 "payloadType": "json",
                 "x": 260,
                 "y": 7160,
                 "wires": [
                     [
                         "e29d13e39355375d",
                         "6c6901822b24f320",
                         "3aa357dca689ad3f",
                         "c7b9a3945149aaa6"
                     ]
                 ]
             },
             {
                 "id": "e29d13e39355375d",
                 "type": "debug",
                 "z": "7e6af0015415146d",
                 "name": "Daten von zigbee2mqtt",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 550,
                 "y": 7080,
                 "wires": []
             },
             {
                 "id": "6c6901822b24f320",
                 "type": "change",
                 "z": "7e6af0015415146d",
                 "name": "Fenster zu",
                 "rules": [
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "Fenster geschlossen",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "[payload.*[payload.contact=true].item.friendly_name]",
                         "tot": "jsonata"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "payload ? payload : \"Alle Fenster geöffnet\"",
                         "tot": "jsonata"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 510,
                 "y": 7260,
                 "wires": [
                     [
                         "5960a47fef812439"
                     ]
                 ]
             },
             {
                 "id": "5960a47fef812439",
                 "type": "debug",
                 "z": "7e6af0015415146d",
                 "name": "Fenster geschlossen (JSONATA)",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 780,
                 "y": 7260,
                 "wires": []
             },
             {
                 "id": "3aa357dca689ad3f",
                 "type": "change",
                 "z": "7e6af0015415146d",
                 "name": "Fenster offen",
                 "rules": [
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "Fenster geöffnet",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "[payload.*[payload.contact=false].item.friendly_name]",
                         "tot": "jsonata"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "payload ? payload : \"Alle Fenster geschlossen\"",
                         "tot": "jsonata"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 510,
                 "y": 7300,
                 "wires": [
                     [
                         "da1365a7f5a03cfc"
                     ]
                 ]
             },
             {
                 "id": "da1365a7f5a03cfc",
                 "type": "debug",
                 "z": "7e6af0015415146d",
                 "name": "Fenster geöffnet (JSONATA)",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 760,
                 "y": 7300,
                 "wires": []
             },
             {
                 "id": "c7b9a3945149aaa6",
                 "type": "function",
                 "z": "7e6af0015415146d",
                 "name": "Fenster offen",
                 "func": "var arrOpened=[];\nvar arrClosed=[];\nfor (var key in msg.payload){\n    var obj;\n    obj = msg.payload[key];\n    obj.payload.contact ? arrClosed.push(obj.item.friendly_name) : arrOpened.push(obj.item.friendly_name)\n}\n \nreturn [{ topic: \"Fenster geschlossen\", payload: arrClosed.length > 0 ? arrClosed : \"Alle Fenster geöffnet\"  },\n    {topic: \"Fenster geöffnet\", payload: arrOpened.length > 0 ? arrOpened : \"Alle Fenster geschlossen !\" }];",
                 "outputs": 2,
                 "timeout": 0,
                 "noerr": 0,
                 "initialize": "",
                 "finalize": "",
                 "libs": [],
                 "x": 510,
                 "y": 7160,
                 "wires": [
                     [
                         "2f4bbe40257a37f3"
                     ],
                     [
                         "041a44ac252bbd51"
                     ]
                 ]
             },
             {
                 "id": "2f4bbe40257a37f3",
                 "type": "debug",
                 "z": "7e6af0015415146d",
                 "name": "Fenster geschlossen (Javascript)",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 780,
                 "y": 7140,
                 "wires": []
             },
             {
                 "id": "041a44ac252bbd51",
                 "type": "debug",
                 "z": "7e6af0015415146d",
                 "name": "Fenster geöffnet (Javascript)",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 760,
                 "y": 7180,
                 "wires": []
             }
          ]
          

          Der Code mit Javascript ist natürlich länger:

          var arrOpened=[];
          var arrClosed=[];
          for (var key in msg.payload){
              var obj;
              obj = msg.payload[key];
              obj.payload.contact ? arrClosed.push(obj.item.friendly_name) : arrOpened.push(obj.item.friendly_name)
          }
           
          return [{ topic: "Fenster geschlossen", payload: arrClosed.length > 0 ? arrClosed : "Alle Fenster geöffnet"  },
              {topic: "Fenster geöffnet", payload: arrOpened.length > 0 ? arrOpened : "Alle Fenster geschlossen !" }];
          

          Aber ich habe die function Node gleich mit 2 Ausgängen gebastelt, so dass oben die geschlossenen Fenster und unten die offenen Fenster ausgegeben werden.

          Ich würde Dir aber trotzdem raten auf function Nodes so lange wie möglich zu verzichten - da Du sonst leicht wieder in Versuchung kommst, herkömmlichen Code zu schreiben - mit Schleifen etc.

          mac89mucM Offline
          mac89mucM Offline
          mac89muc
          schrieb am zuletzt editiert von
          #10

          @mickym vielen lieben Dank für Deine Mühe!!! - hab ich importiert und funktioniert wie gewünscht. :+1: :relaxed:
          In dem Fall bin ich komplett deiner Meinung mit dem Verzicht auf die Function node, ich dachte das wird etwas umfangreicher was die Anzahl der nodes angeht und da ist mir dann normalerweise eine Function node immer lieber. Aber in dem Beispiel sehe ich das genauso wie Du.
          Beim Thema JSONATA muss ich mich mal einarbeiten, ich glaube das ist genau das was ich für ein paar Themen brauchen kann als Ansatz - Danke dafür.

          Hast Du ggf. noch einen kurzen Tipp für mich, wenn ich die geöffneten Fenster nicht in einem Array ausgegeben haben möchte, sondern in einem einzigen getrennt durch Kommas? Muss ich das Array danach nochmal anfassen und zusammenfassen? Das müsste dann doch bestimmt mit JSONATA auch schon in einem Aufwasch direkt funktionieren, oder??

          Viele Grüße

          mickymM 1 Antwort Letzte Antwort
          0
          • mac89mucM mac89muc

            @mickym vielen lieben Dank für Deine Mühe!!! - hab ich importiert und funktioniert wie gewünscht. :+1: :relaxed:
            In dem Fall bin ich komplett deiner Meinung mit dem Verzicht auf die Function node, ich dachte das wird etwas umfangreicher was die Anzahl der nodes angeht und da ist mir dann normalerweise eine Function node immer lieber. Aber in dem Beispiel sehe ich das genauso wie Du.
            Beim Thema JSONATA muss ich mich mal einarbeiten, ich glaube das ist genau das was ich für ein paar Themen brauchen kann als Ansatz - Danke dafür.

            Hast Du ggf. noch einen kurzen Tipp für mich, wenn ich die geöffneten Fenster nicht in einem Array ausgegeben haben möchte, sondern in einem einzigen getrennt durch Kommas? Muss ich das Array danach nochmal anfassen und zusammenfassen? Das müsste dann doch bestimmt mit JSONATA auch schon in einem Aufwasch direkt funktionieren, oder??

            Viele Grüße

            mickymM Offline
            mickymM Offline
            mickym
            Most Active
            schrieb am zuletzt editiert von mickym
            #11

            @mac89muc sagte in Hilfe bei NodeRed wegen Status Fenster/Türen:

            Hast Du ggf. noch einen kurzen Tipp für mich, wenn ich die geöffneten Fenster nicht in einem Array ausgegeben haben möchte, sondern in einem einzigen getrennt durch Kommas? Muss ich das Array danach nochmal anfassen und zusammenfassen? Das müsste dann doch bestimmt mit JSONATA auch schon in einem Aufwasch direkt funktionieren, oder??

            Viele Grüße

            Einfach das Array in eine Join Funktion geben.

            https://docs.jsonata.org/string-functions#join

            1. Du kannst entweder die letzte Regel nehmen - wenn sonst ausgegeben wird, dass Alle Fenster geschlossen sind

            07c9c9d4-f713-4853-aa8e-dfbc64806dc8-image.png

            1. oder falls Du keine Ausgabe und die letzte Regel nicht brauchst(falls alle Fenster geschlossen sind) wünschst kannst Du auch einfach das Ergebnis weitergeben

            62bbb235-4770-40dc-86b3-7d1d524835a9-image.png

            Dann brauchst natürlich auch die eckige Klammer nicht, wenn nur ein Element vorhanden ist.

            2f1391a4-38c4-407f-8686-d5b1cbb6b1a6-image.png

            Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

            mac89mucM 1 Antwort Letzte Antwort
            0
            • mickymM mickym

              @mac89muc sagte in Hilfe bei NodeRed wegen Status Fenster/Türen:

              Hast Du ggf. noch einen kurzen Tipp für mich, wenn ich die geöffneten Fenster nicht in einem Array ausgegeben haben möchte, sondern in einem einzigen getrennt durch Kommas? Muss ich das Array danach nochmal anfassen und zusammenfassen? Das müsste dann doch bestimmt mit JSONATA auch schon in einem Aufwasch direkt funktionieren, oder??

              Viele Grüße

              Einfach das Array in eine Join Funktion geben.

              https://docs.jsonata.org/string-functions#join

              1. Du kannst entweder die letzte Regel nehmen - wenn sonst ausgegeben wird, dass Alle Fenster geschlossen sind

              07c9c9d4-f713-4853-aa8e-dfbc64806dc8-image.png

              1. oder falls Du keine Ausgabe und die letzte Regel nicht brauchst(falls alle Fenster geschlossen sind) wünschst kannst Du auch einfach das Ergebnis weitergeben

              62bbb235-4770-40dc-86b3-7d1d524835a9-image.png

              Dann brauchst natürlich auch die eckige Klammer nicht, wenn nur ein Element vorhanden ist.

              2f1391a4-38c4-407f-8686-d5b1cbb6b1a6-image.png

              mac89mucM Offline
              mac89mucM Offline
              mac89muc
              schrieb am zuletzt editiert von
              #12

              @mickym perfekt - eine letzte minimale Optimierung ist mir gerade noch aufgefallen...

              Ich habe zwecks Organisation und Übersicht bei meinen Zigbee Kontaktsensoren im Namen immer Contact mit am Schluss stehen. Das hätte ich in der Aufzählung gerne entfernt - wie bekomme ich das noch integriert also ->

              friendly_name.slice(0, -8)
              

              Wenn ich das direkt dranhänge

              payload.*[payload.contact=false].item.friendly_name.slice(0, -8)~>$join(", ")
              

              bekomme ich einen Fehler

              Invalid JSONata expression: Attempted to invoke a non-function
              

              Kann ich mich für Deine Hilfe irgendwo mit einer Kaffeespende revanchieren?
              Danke & Gruß

              mickymM 1 Antwort Letzte Antwort
              0
              • mac89mucM mac89muc

                @mickym perfekt - eine letzte minimale Optimierung ist mir gerade noch aufgefallen...

                Ich habe zwecks Organisation und Übersicht bei meinen Zigbee Kontaktsensoren im Namen immer Contact mit am Schluss stehen. Das hätte ich in der Aufzählung gerne entfernt - wie bekomme ich das noch integriert also ->

                friendly_name.slice(0, -8)
                

                Wenn ich das direkt dranhänge

                payload.*[payload.contact=false].item.friendly_name.slice(0, -8)~>$join(", ")
                

                bekomme ich einen Fehler

                Invalid JSONata expression: Attempted to invoke a non-function
                

                Kann ich mich für Deine Hilfe irgendwo mit einer Kaffeespende revanchieren?
                Danke & Gruß

                mickymM Offline
                mickymM Offline
                mickym
                Most Active
                schrieb am zuletzt editiert von mickym
                #13

                @mac89muc sagte in Hilfe bei NodeRed wegen Status Fenster/Türen:

                @mickym perfekt - eine letzte minimale Optimierung ist mir gerade noch aufgefallen...

                Ich habe zwecks Organisation und Übersicht bei meinen Zigbee Kontaktsensoren im Namen immer Contact mit am Schluss stehen. Das hätte ich in der Aufzählung gerne entfernt - wie bekomme ich das noch integriert also ->

                friendly_name.slice(0, -8)
                

                Wenn ich das direkt dranhänge

                payload.*[payload.contact=false].item.friendly_name.slice(0, -8)~>$join(", ")
                

                bekomme ich einen Fehler

                Invalid JSONata expression: Attempted to invoke a non-function
                

                slice ist keine JSONATA Funktion sondern eine Javascript Funktion

                Kann ich mich für Deine Hilfe irgendwo mit einer Kaffeespende revanchieren?
                Danke & Gruß

                Nein - brauchst Du nicht, mache ich gerne

                In JSONATA machst Du das so:

                payload.*[payload.contact=false].$substringBefore(item.friendly_name," Contact")~>$join(", ")
                

                f0954d5a-856a-475d-9fc3-3435a7a64596-image.png

                Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                1 Antwort Letzte Antwort
                0
                • mickymM Offline
                  mickymM Offline
                  mickym
                  Most Active
                  schrieb am zuletzt editiert von mickym
                  #14

                  @mac89muc sagte in Hilfe bei NodeRed wegen Status Fenster/Türen:

                  Ich habe zwecks Organisation und Übersicht bei meinen Zigbee Kontaktsensoren im Namen immer Contact mit am Schluss stehen. Das hätte ich in der Aufzählung

                  Falls Du zigbee2mqtt verwendest, was Du auch tust - soweit ich mich erinnere, kannst Du als friendly Name auch Hierarchien bilden und dann brauchst Du diese Konstrukte mit den Namen nicht.

                  267b10e4-2112-439d-8908-d25a302175c8-image.png

                  Also einfach die Gerätenamen entsprechend mqtt topics in der Hierarchie benennen:

                  9cde8811-71b6-414c-9176-c675ff9d49c4-image.png

                  Im friendlyName wird das mqtt topic dann entsprechend eingetragen:
                  897ef0b6-eec5-43d1-b3db-a0af66a378f2-image.png

                  Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                  mickymM 1 Antwort Letzte Antwort
                  0
                  • mickymM mickym

                    @mac89muc sagte in Hilfe bei NodeRed wegen Status Fenster/Türen:

                    Ich habe zwecks Organisation und Übersicht bei meinen Zigbee Kontaktsensoren im Namen immer Contact mit am Schluss stehen. Das hätte ich in der Aufzählung

                    Falls Du zigbee2mqtt verwendest, was Du auch tust - soweit ich mich erinnere, kannst Du als friendly Name auch Hierarchien bilden und dann brauchst Du diese Konstrukte mit den Namen nicht.

                    267b10e4-2112-439d-8908-d25a302175c8-image.png

                    Also einfach die Gerätenamen entsprechend mqtt topics in der Hierarchie benennen:

                    9cde8811-71b6-414c-9176-c675ff9d49c4-image.png

                    Im friendlyName wird das mqtt topic dann entsprechend eingetragen:
                    897ef0b6-eec5-43d1-b3db-a0af66a378f2-image.png

                    mickymM Offline
                    mickymM Offline
                    mickym
                    Most Active
                    schrieb am zuletzt editiert von mickym
                    #15

                    @mickym Vorteil für Dich ist, dass Du diese Nodes eigentlich dann nicht brauchst, sondern über die mqtt Hierachien selektieren kannst.
                    In meinem Fall selektiere (subscribe) ich alle Kontakte mit

                    zigbee2mqtt/kontakt/#
                    

                    Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                    mac89mucM 1 Antwort Letzte Antwort
                    0
                    • mickymM mickym

                      @mickym Vorteil für Dich ist, dass Du diese Nodes eigentlich dann nicht brauchst, sondern über die mqtt Hierachien selektieren kannst.
                      In meinem Fall selektiere (subscribe) ich alle Kontakte mit

                      zigbee2mqtt/kontakt/#
                      
                      mac89mucM Offline
                      mac89mucM Offline
                      mac89muc
                      schrieb am zuletzt editiert von
                      #16

                      @mickym
                      Vielen Dank ich probiere jetzt mal ein bisschen rum und passe meine Flows an. Ich habe noch 2-3 andere Themen bzgl. Node-Red und würde mich dann mit einem separaten Thread nochmal melden, vielleicht hast Du dann ja nochmal Zeit & Lust mir weiterzuhelfen. Vielen Dank nochmals für die schnelle und ausführliche Hilfe.

                      Gruß

                      1 Antwort Letzte Antwort
                      0
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      356

                      Online

                      32.5k

                      Benutzer

                      81.6k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe