Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. [gelöst] Einbindung GCM-320plus Radioaktivitätssensor

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    719

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.9k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

[gelöst] Einbindung GCM-320plus Radioaktivitätssensor

Scheduled Pinned Locked Moved Node-Red
1 Posts 1 Posters 165 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    superflip
    wrote on last edited by
    #1

    Hi,

    keine Ahnung, ob das auch hier rein gehört - ich möchte meine Lösung zur Einbindung des GCM-320plus mittels USB-serial Adapter teilen, die relativ smart und einfach funktioniert, ohne viel Schnickschnack.

    1. Schritt: Die Daten müssen mal bei /dev/ttyUSB0 reinkommen - falls es hier Fragen gibt, gerne her damit
    2. node-red-node-serialport nachinstallieren.
    3. Node-RED Flow schreiben - unten mein Flow-Export dazu
    4. Mit dem iobroker out Node schreibe ich jede Minute den aktuellen Wert in ein User-Objekt rein.
    [
        {
            "id": "da8354a725a790f4",
            "type": "serial in",
            "z": "f54c133271527d6a",
            "name": "GMC-320",
            "serial": "15ad7491d36bd43d",
            "x": 440,
            "y": 180,
            "wires": [
                [
                    "cfbb2d86219dcc97"
                ]
            ]
        },
        {
            "id": "cfbb2d86219dcc97",
            "type": "function",
            "z": "f54c133271527d6a",
            "name": "function 3",
            "func": "//@superflip - 2025-03-25\n\nif (msg.payload && Buffer.isBuffer(msg.payload) && msg.payload.length > 0) {\n //read Buffer and write to local variable\n let buffer = msg.payload;\n let cpm = buffer.readUInt8(0);\n\n // check, if counter already exists\n if (!context.counterCPM) {\n    context.counterCPM = 0; // Initialisiere den Zähler\n    //first buffer is sometimes set to 128\n    if (cpm == 128) {\n        cpm=0;\n    }\n }\n\n // calculate time since last reset\n let currentTime = new Date().getTime();\n if (!context.lastResetTime) {\n    context.lastResetTime = currentTime;\n }\n\n //add new value to counter\n context.counterCPM += cpm;\n\n // if 60s are over\n if (currentTime - context.lastResetTime >= 60000) {\n    // write msg.payload.total for further processing\n    msg.payload = { total: context.counterCPM};\n    // reset counter\n    context.counterCPM = 0;\n    context.lastResetTime = currentTime;\n }\n\n} \n\nreturn msg;\n",
            "outputs": 1,
            "timeout": 0,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 600,
            "y": 180,
            "wires": [
                [
                    "32b1cdc92efb52a3"
                ]
            ]
        },
        {
            "id": "32b1cdc92efb52a3",
            "type": "switch",
            "z": "f54c133271527d6a",
            "name": "",
            "property": "payload.total",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "nnull"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 1,
            "x": 750,
            "y": 180,
            "wires": [
                [
                    "1992efb23bb5d735"
                ]
            ]
        },
        {
            "id": "7446ba3b5074a20c",
            "type": "ioBroker out",
            "z": "f54c133271527d6a",
            "name": "CPM schreiben",
            "topic": "0_userdata.0.aussen.klima.radioactivity",
            "ack": "true",
            "autoCreate": "false",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1140,
            "y": 180,
            "wires": []
        },
        {
            "id": "1992efb23bb5d735",
            "type": "change",
            "z": "f54c133271527d6a",
            "name": "",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.total",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 930,
            "y": 180,
            "wires": [
                [
                    "7446ba3b5074a20c"
                ]
            ]
        },
        {
            "id": "15ad7491d36bd43d",
            "type": "serial-port",
            "name": "",
            "serialport": "/dev/ttyUSB0",
            "serialbaud": "115200",
            "databits": "8",
            "parity": "none",
            "stopbits": "1",
            "waitfor": "",
            "dtr": "none",
            "rts": "none",
            "cts": "none",
            "dsr": "none",
            "newline": "0x80",
            "bin": "bin",
            "out": "char",
            "addchar": "",
            "responsetimeout": "10000"
        }
    ]
    

    Interessant finde ich auch, dass ich dieses Mal massiv die Hilfe von ChatGPT in Anspruch genommen habe und bei Fehlern dadurch immer wieder auf die richtigen Hinweise gekommen bin. Vorallem hat mich beeindruckt, dass ich ChatGPT ein PHP-Modul als Beispiel mitgeteilt habe und die KI mir die entsprechenden Einstellungen dafür in JS extrahiert hat, das war extrem hilfreich.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    Support us

    ioBroker
    Community Adapters
    Donate

    244

    Online

    32.7k

    Users

    82.6k

    Topics

    1.3m

    Posts
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
    ioBroker Community 2014-2025
    logo
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Home
    • Recent
    • Tags
    • Unread 0
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe