Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. USB RFID Reader mit node-red

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    USB RFID Reader mit node-red

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

      Falls es jemand mal braucht.

      einfach kopieren und einfügen aber vorher noch node-red-contrib-usbhid installieren.

      Quelle: https://medium.com/coinmonks/iot-tutori … 54836be127

      [
          {
              "id": "592e7da0.0b2a44",
              "type": "function",
              "z": "c59dac6a.8f18d",
              "name": "select id part",
              "func": "msg.payload = msg.payload[2]\nreturn msg;",
              "outputs": 1,
              "noerr": 0,
              "x": 310,
              "y": 700,
              "wires": [
                  [
                      "f4f6990f.bdbc98"
                  ]
              ]
          },
          {
              "id": "f4f6990f.bdbc98",
              "type": "switch",
              "z": "c59dac6a.8f18d",
              "name": "filter digits",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "btwn",
                      "v": "31",
                      "vt": "num",
                      "v2": "39",
                      "v2t": "num"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 1,
              "x": 490,
              "y": 700,
              "wires": [
                  [
                      "2def329b.1aa87e"
                  ]
              ]
          },
          {
              "id": "2def329b.1aa87e",
              "type": "function",
              "z": "c59dac6a.8f18d",
              "name": "translate bits",
              "func": "keymap = [\n    '', '', '', '',\n    'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',\n    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n    '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\\n', '^]', '^H',\n    '^I', ' ', '-', '=', '[', ']', '\\\\', '>', ';', \"'\", '`', ',', '.',\n    '/', 'CapsLock', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12',\n    'PS', 'SL', 'Pause', 'Ins', 'Home', 'PU', '^D', 'End', 'PD', '->', '<-', '-v', '-^', 'NL',\n    'KP/', 'KP*', 'KP-', 'KP+', 'KPE', 'KP1', 'KP2', 'KP3', 'KP4', 'KP5', 'KP6', 'KP7', 'KP8',\n    'KP9', 'KP0', '\\\\', 'App', 'Pow', 'KP=', 'F13', 'F14'\n]\nvar replacechars = function(c){\n    return keymap[c]|| c; \n}; \nmsg.payload = replacechars(msg.payload)\nreturn msg;",
              "outputs": 1,
              "noerr": 0,
              "x": 430,
              "y": 820,
              "wires": [
                  [
                      "78b813a2.d15a5c"
                  ]
              ]
          },
          {
              "id": "78b813a2.d15a5c",
              "type": "join",
              "z": "c59dac6a.8f18d",
              "name": "join id bytes",
              "mode": "custom",
              "build": "string",
              "property": "payload",
              "propertyType": "msg",
              "key": "topic",
              "joiner": "",
              "joinerType": "str",
              "accumulate": false,
              "timeout": "0.2",
              "count": "",
              "reduceRight": false,
              "reduceExp": "",
              "reduceInit": "",
              "reduceInitType": "num",
              "reduceFixup": "",
              "x": 650,
              "y": 820,
              "wires": [
                  [
                      "f522bc50.2f817"
                  ]
              ]
          },
          {
              "id": "f522bc50.2f817",
              "type": "debug",
              "z": "c59dac6a.8f18d",
              "name": "",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "false",
              "x": 870,
              "y": 820,
              "wires": []
          },
          {
              "id": "16289df5.43ba12",
              "type": "HIDdevice",
              "z": "c59dac6a.8f18d",
              "connection": "6b3a553f.f84efc",
              "name": "",
              "x": 190,
              "y": 640,
              "wires": [
                  [
                      "592e7da0.0b2a44"
                  ],
                  []
              ]
          },
          {
              "id": "6b3a553f.f84efc",
              "type": "HIDConfig",
              "z": "",
              "vid": "5050",
              "pid": "24",
              "name": "RFID"
          }
      ]
      
      1 Reply Last reply Reply Quote 0
      • P
        ple last edited by

        Es ist zwar schon eine Weile her, aber ich bin auf der Suche nach einer einfachen Möglichkeit einen usb geräte, welches als HID erkannt wird, am Raspberry auszulesen.
        Speziell geht es um einen USB RFID Scanner.
        Leider bekomme ich nicht mal das "node-red-contrib-usbhid " installiert.

        Gibt es da vielleicht workaround zu oder vielleicht was einfacheres, um an den String vom Reader zu kommen?

        Gruß und Danke

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

        Support us

        ioBroker
        Community Adapters
        Donate

        864
        Online

        31.8k
        Users

        80.0k
        Topics

        1.3m
        Posts

        2
        2
        1282
        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