Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. LaCrosse Sensoren TX29DTH-IT

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    LaCrosse Sensoren TX29DTH-IT

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kleinerDrache last edited by

      So hier für alle die nicht auf den Adapter für die Dinger warten wollen.

      ! [
      ! {
      ! "id": "50a787a6.a55658",
      ! "type": "function",
      ! "z": "563d2dda.8436b4",
      ! "name": "Parse LaCrosse",
      ! "func": "var tmp = msg.payload.split(" ");\n //# OK 9 ID XXX XXX XXX XXX\n //# | | | | | | |\n //# [4]| | | | | | –- Humidity incl. WeakBatteryFlag\n //# [3]| | | | | |–---- Temp * 10 + 1000 LSB\n //# [2]| | | | |–-------- Temp * 10 + 1000 MSB\n //# [1]| | | |–------------ Sensor type (1 or 2) +128 if NewBatteryFlag\n //# [0]| | |–--------------- Sensor ID\n //# | |------------------- fix "9"\n //# |---------------------- fix "OK"\n\n\nif(tmp[0]==='OK'){\n if(tmp[1]=='9'){\n var tmpp=tmp.splice(2,6);\n var buf = new Buffer(tmpp);\n var msg1 = { payload: (buf.readIntLE(0))};\n //Sensor ID\n var msg2 = { payload: ((buf.readIntLE(1) & 0x70) >> 4)};\n //$type = ($bytes[1] & 0x70) >> 4;\n var msg3 = { payload: ((buf.readIntLE(1) & 0x80) >> 7)};\n //$battery_new = ($bytes[1] & 0x80) >> 7;\n var msg4 = { payload: ((((buf.readIntLE(2))*256)+(buf.readIntLE(3))-1000)/10)};\n //$temperature = ($bytes[2]*256 + $bytes[3] - 1000)/10;\n var msg5 = { payload: (buf.readIntLE(4) & 0x7f)};\n //$humidity = $bytes[4] & 0x7f;\n var msg6 = { payload: ((buf.readIntLE(4) & 0x80) >> 7)};\n //$battery_low = ($bytes[4] & 0x80) >> 7;\n }\n}\n\nreturn [msg1,msg2,msg3,msg4,msg5,msg6];",
      ! "outputs": "6",
      ! "noerr": 0,
      ! "x": 420,
      ! "y": 120,
      ! "wires": [
      ! [
      ! "7f265b57.ab33b4"
      ! ],
      ! [
      ! "7fdddeaf.082a4"
      ! ],
      ! [
      ! "73e963a2.2ed33c"
      ! ],
      ! [
      ! "c7cfd66c.52fe58"
      ! ],
      ! [
      ! "3d4f97ef.189fc8"
      ! ],
      ! [
      ! "b53b8687.b299d8"
      ! ]
      ! ]
      ! },
      ! {
      ! "id": "14ad88ed.d69e87",
      ! "type": "serial in",
      ! "z": "563d2dda.8436b4",
      ! "name": "",
      ! "serial": "96009430.bf4df8",
      ! "x": 180,
      ! "y": 120,
      ! "wires": [
      ! [
      ! "50a787a6.a55658"
      ! ]
      ! ]
      ! },
      ! {
      ! "id": "73e963a2.2ed33c",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Batterie Neu ?",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 660,
      ! "y": 120,
      ! "wires": []
      ! },
      ! {
      ! "id": "7f265b57.ab33b4",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Sensor ID",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 640,
      ! "y": 40,
      ! "wires": []
      ! },
      ! {
      ! "id": "7fdddeaf.082a4",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Sensor Type",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 650,
      ! "y": 80,
      ! "wires": []
      ! },
      ! {
      ! "id": "c7cfd66c.52fe58",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Temperatur",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 650,
      ! "y": 160,
      ! "wires": []
      ! },
      ! {
      ! "id": "3d4f97ef.189fc8",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Humidity",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 640,
      ! "y": 200,
      ! "wires": []
      ! },
      ! {
      ! "id": "b53b8687.b299d8",
      ! "type": "debug",
      ! "z": "563d2dda.8436b4",
      ! "name": "Batterie schwach ?",
      ! "active": true,
      ! "console": "false",
      ! "complete": "payload",
      ! "x": 670,
      ! "y": 240,
      ! "wires": []
      ! },
      ! {
      ! "id": "96009430.bf4df8",
      ! "type": "serial-port",
      ! "z": "563d2dda.8436b4",
      ! "serialport": "/dev/ttyUSB0",
      ! "serialbaud": "57600",
      ! "databits": "8",
      ! "parity": "none",
      ! "stopbits": "1",
      ! "newline": "\n\r",
      ! "bin": "false",
      ! "out": "char",
      ! "addchar": false
      ! }
      ! ]

      Nur den Serial Node anpassen und alle gefundenen Sensoren werden im Debug angezeigt. Macht was draus und viel Spass 😉

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      547
      Online

      31.7k
      Users

      79.7k
      Topics

      1.3m
      Posts

      1
      1
      1373
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo