Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. (Gelöst) Füllstände mit Node Red auslesen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    (Gelöst) Füllstände mit Node Red auslesen

    This topic has been deleted. Only users with topic management privileges can see it.
    • Damrak2022
      Damrak2022 @mickym last edited by

      @mickym sagte in Füllstände mit Node Red auslesen:

      ls -la

      pi@homebridge:~ $ cd ~
      pi@homebridge:~ $ ls -la
      total 52
      drwxr-xr-x 7 pi   pi   4096 Jun  6 05:21 .
      drwxr-xr-x 4 root root 4096 May 29 05:16 ..
      -rw------- 1 pi   pi   3234 Jun  6 05:14 .bash_history
      -rw-r--r-- 1 pi   pi    220 Apr  4 16:28 .bash_logout
      -rw-r--r-- 1 pi   pi   3716 May 29 05:18 .bashrc
      drwxr-xr-x 4 pi   pi   4096 May 29 05:18 .cache
      drwx------ 3 pi   pi   4096 May 29 05:15 .config
      drwxr-xr-x 2 pi   pi   4096 May 29 05:18 .iobroker
      drwxr-xr-x 6 pi   pi   4096 Jun  6 05:21 node_modules
      drwxr-xr-x 5 pi   pi   4096 Jun  6 05:21 .npm
      -rw------- 1 pi   pi     36 May 29 05:15 .npmrc
      -rw-r--r-- 1 pi   pi   1242 Jun  6 05:21 package-lock.json
      -rw-r--r-- 1 pi   pi    807 Apr  4 16:28 .profile
      pi@homebridge:~ $
      
      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @Damrak2022 last edited by

        @damrak2022 Ja wie befürchtet.

        Also das node_modules Verzeichnis löschen und die package-lock.json

        rm -R node_modules
        rm package-lock.json
        

        dann nochmal prüfen, ob das weg ist mit ls -la

        Damrak2022 1 Reply Last reply Reply Quote 0
        • Damrak2022
          Damrak2022 @mickym last edited by

          @mickym sagte in Füllstände mit Node Red auslesen:

          rm package-lock.json

          pi@homebridge:~ $ rm -R node_modules
          pi@homebridge:~ $ rm package-lock.json
          pi@homebridge:~ $ ls -la
          total 44
          drwxr-xr-x 6 pi   pi   4096 Jun  6 06:11 .
          drwxr-xr-x 4 root root 4096 May 29 05:16 ..
          -rw------- 1 pi   pi   3234 Jun  6 05:14 .bash_history
          -rw-r--r-- 1 pi   pi    220 Apr  4 16:28 .bash_logout
          -rw-r--r-- 1 pi   pi   3716 May 29 05:18 .bashrc
          drwxr-xr-x 4 pi   pi   4096 May 29 05:18 .cache
          drwx------ 3 pi   pi   4096 May 29 05:15 .config
          drwxr-xr-x 2 pi   pi   4096 May 29 05:18 .iobroker
          drwxr-xr-x 5 pi   pi   4096 Jun  6 05:21 .npm
          -rw------- 1 pi   pi     36 May 29 05:15 .npmrc
          -rw-r--r-- 1 pi   pi    807 Apr  4 16:28 .profile
          pi@homebridge:~ $
          
          mickym 1 Reply Last reply Reply Quote 0
          • mickym
            mickym Most Active @Damrak2022 last edited by

            @damrak2022 Ok dann ist das wieder sauber und die snmp Nodes sind installiert. Nun musst Du aus dem Thread den ich Dir gepostet habe, den Flow importieren.

            Ich stell ihn Dir hier nochmal rein:

            Also den Code über Select All markieren und in die Zwischenablage kopieren.

            [
               {
                   "id": "af33b6f4.f4e758",
                   "type": "subflow",
                   "name": "SNMP Printer MIB",
                   "info": "# SNMP SNMP Printer MIB\n\n**[node-red-node-snmp](https://flows.nodered.org/node/node-red-node-snmp) must be installed first, that subflow works**\n\nThe node was tested on a HP Printer with 4 ink cartridges. \n`msg.payload` needs to be a boolean. If _true_ the monitoring starts, if _false_ the monitoring stops.\n\nIn addition the IP-address has to be provided by `msg.host` or specified in the node in the environment variable IP Address.\n\n`msg.payload` on the output is monitoring status of the node (_true_ or _false_). If the printer is offline, monitoring is stopped automatically and has to be manually restarted. \n\nIn addition to the monitoring status, the status is published in a `msg.printer` object.\n\n{\n    \"pages\": 0,\n    \"status\": {\n        \"device\": \"\",\n        \"printer\": \"\",\n        \"since\": \"\"\n    }\n    \"cartridges\": {\n        \"percent\": {\n            \"black\": 0,\n            \"yellow\": 0,\n            \"cyan\": 0,\n            \"magenta\": 0\n        }\n    }\n}\n\n# SNMP Printer MIB\n\n**Voraussetzung ist die Installation der snmp Nodes: [node-red-node-snmp](https://flows.nodered.org/node/node-red-node-snmp)**\n\nDie Node bzw. Subflow wurde mit einem HP Printer mit 4 Tintenpatronen getestet. \n`msg.payload` muss ein Boolean/Logikwert sein. Wenn _true_ dann startet das Monitoring, if _false_ stoppt das Monitoring.\n\nZusätzlich muss die IP-Adresse des Druckers in der Eigenschaft `msg.host` mitgegeben werden oder kann über die Umgebungsvariable IP Address in der Node mitgegeben werden.\n\nDie Ausgabe der Node in `msg.payload` entspricht dem Status des Monitorings (_true_ oder _false_).\nWenn der Drucker offline ist, dann stoppt das Monitoring automatisch und muss manuell wieder gestartet werden. \n\nZusätzlich zum Monitoring status, wird der Status des Druckers im `msg.printer` Objekt ausgegeben.\n\n{\n    \"pages\": 0,\n    \"status\": {\n        \"device\": \"\",\n        \"printer\": \"\",\n        \"since\": \"\"\n    }\n    \"cartridges\": {\n        \"percent\": {\n            \"black\": 0,\n            \"yellow\": 0,\n            \"cyan\": 0,\n            \"magenta\": 0\n        }\n    }\n}\n",
                   "category": "SNMP",
                   "in": [
                       {
                           "x": 80,
                           "y": 560,
                           "wires": [
                               {
                                   "id": "fd22ba53c406b582"
                               }
                           ]
                       }
                   ],
                   "out": [
                       {
                           "x": 2600,
                           "y": 440,
                           "wires": [
                               {
                                   "id": "c85d9732.2190c8",
                                   "port": 0
                               }
                           ]
                       }
                   ],
                   "env": [
                       {
                           "name": "IP Address",
                           "type": "str",
                           "value": "127.0.0.1"
                       }
                   ],
                   "meta": {},
                   "color": "#C7E9C0",
                   "icon": "node-red/parser-json.svg",
                   "status": {
                       "x": 2780,
                       "y": 380,
                       "wires": [
                           {
                               "id": "b7cbd22.9562b3",
                               "port": 0
                           }
                       ]
                   }
               },
               {
                   "id": "f15ff765.2e3668",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Tintenfüllstand - Schwarz",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$round(payload.'0.1'.'9' / payload.'0.1'.'8' * 100 , 0)",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2290,
                   "y": 80,
                   "wires": [
                       [
                           "b436d7a6.58a688"
                       ]
                   ]
               },
               {
                   "id": "a51ff4e0.937778",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Tintenfüllstand - Gelb",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$round(payload.'0.2'.'9' / payload.'0.2'.'8' * 100 , 0)",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2280,
                   "y": 160,
                   "wires": [
                       [
                           "6d10dec2.86a89"
                       ]
                   ]
               },
               {
                   "id": "376553b5.6e182c",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Tintenfüllstand - Cyan",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$round(payload.'0.3'.'9' / payload.'0.3'.'8' * 100 , 0)",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2280,
                   "y": 240,
                   "wires": [
                       [
                           "a205458.53b91b8"
                       ]
                   ]
               },
               {
                   "id": "4f56704e.3f626",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Tintenfüllstand - Magenta",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$round(payload.'0.4'.'9' / payload.'0.4'.'8' * 100 , 0)",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2290,
                   "y": 320,
                   "wires": [
                       [
                           "6710284c.0bcb88"
                       ]
                   ]
               },
               {
                   "id": "853f7770.689788",
                   "type": "snmp table",
                   "z": "af33b6f4.f4e758",
                   "host": "",
                   "version": "1",
                   "timeout": 5,
                   "community": "public",
                   "oids": "1.3.6.1.2.1.43.11.1",
                   "name": "snmp Drucker - Patronenfüllstände - prtMarkerSuppliesTable",
                   "x": 1760,
                   "y": 200,
                   "wires": [
                       [
                           "f15ff765.2e3668",
                           "a51ff4e0.937778",
                           "376553b5.6e182c",
                           "4f56704e.3f626",
                           "de6284f8.4dc138"
                       ]
                   ]
               },
               {
                   "id": "67f704d6.3910dc",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Geräte Status",
                   "rules": [
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "1",
                           "fromt": "num",
                           "to": "unbekannt",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "2",
                           "fromt": "num",
                           "to": "bereit",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "3",
                           "fromt": "num",
                           "to": "warnt",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "4",
                           "fromt": "num",
                           "to": "testet",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "5",
                           "fromt": "num",
                           "to": "nicht bereit",
                           "tot": "str"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2320,
                   "y": 560,
                   "wires": [
                       [
                           "c01cdabe.769ea8"
                       ]
                   ]
               },
               {
                   "id": "f79c0323.65825",
                   "type": "snmp",
                   "z": "af33b6f4.f4e758",
                   "host": "",
                   "version": "1",
                   "timeout": 5,
                   "community": "public",
                   "oids": "1.3.6.1.2.1.25.3.2.1.5.1,1.3.6.1.2.1.25.3.5.1.1.1,1.3.6.1.2.1.1.3.0",
                   "name": "snmp Drucker Status",
                   "x": 1560,
                   "y": 760,
                   "wires": [
                       [
                           "2e59df90.47d8",
                           "7d5786ed.3fafe8",
                           "2550df51.d2985",
                           "9f5048d1.6ce418"
                       ]
                   ]
               },
               {
                   "id": "a26308a8.d333a8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "Drucker Status",
                   "rules": [
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "1",
                           "fromt": "num",
                           "to": "nicht aufgelistet",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "2",
                           "fromt": "num",
                           "to": "unbekannt",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "3",
                           "fromt": "num",
                           "to": "im Leerlauf",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "4",
                           "fromt": "num",
                           "to": "druckt",
                           "tot": "str"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "5",
                           "fromt": "num",
                           "to": "fährt hoch",
                           "tot": "str"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2320,
                   "y": 640,
                   "wires": [
                       [
                           "14723db8.d52622"
                       ]
                   ]
               },
               {
                   "id": "d43a8173.eb1dd",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$millis()-payload*10\t",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2050,
                   "y": 760,
                   "wires": [
                       [
                           "9ce003c1.e1d68"
                       ]
                   ]
               },
               {
                   "id": "2550df51.d2985",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "online - Geräte Status",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload[0].value",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1860,
                   "y": 560,
                   "wires": [
                       [
                           "67f704d6.3910dc"
                       ]
                   ]
               },
               {
                   "id": "2e59df90.47d8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "online - Drucker Status",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload[1].value",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1860,
                   "y": 640,
                   "wires": [
                       [
                           "a26308a8.d333a8"
                       ]
                   ]
               },
               {
                   "id": "7d5786ed.3fafe8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "online seit",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload[2].value",
                           "tot": "msg"
                       },
                       {
                           "t": "set",
                           "p": "status",
                           "pt": "msg",
                           "to": "Gerät online",
                           "tot": "str"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1820,
                   "y": 760,
                   "wires": [
                       [
                           "d43a8173.eb1dd"
                       ]
                   ]
               },
               {
                   "id": "9147a585.026348",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload[\"0.1\"][\"4\"]",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2190,
                   "y": 860,
                   "wires": [
                       [
                           "da172e87.462b6"
                       ]
                   ]
               },
               {
                   "id": "84af89d1.cf4908",
                   "type": "snmp table",
                   "z": "af33b6f4.f4e758",
                   "host": "",
                   "version": "1",
                   "timeout": 5,
                   "community": "public",
                   "oids": "1.3.6.1.2.1.43.10.2",
                   "name": "snmp Drucker gedruckte Seiten",
                   "x": 1590,
                   "y": 860,
                   "wires": [
                       [
                           "9147a585.026348"
                       ]
                   ]
               },
               {
                   "id": "16a4ff47.1517f1",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "offline - Geräte Status",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "1",
                           "tot": "num"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1860,
                   "y": 600,
                   "wires": [
                       [
                           "67f704d6.3910dc"
                       ]
                   ]
               },
               {
                   "id": "2df9aa7f.dade36",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "offline - Drucker Status",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "2",
                           "tot": "num"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1860,
                   "y": 680,
                   "wires": [
                       [
                           "a26308a8.d333a8"
                       ]
                   ]
               },
               {
                   "id": "d572ccde.c7249",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "",
                           "tot": "date"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2050,
                   "y": 720,
                   "wires": [
                       [
                           "9ce003c1.e1d68"
                       ]
                   ]
               },
               {
                   "id": "4d0360fb.440bd",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "offline seit",
                   "rules": [
                       {
                           "t": "set",
                           "p": "status",
                           "pt": "msg",
                           "to": "Kein Monitoring",
                           "tot": "str"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1820,
                   "y": 720,
                   "wires": [
                       [
                           "d572ccde.c7249"
                       ]
                   ]
               },
               {
                   "id": "a9536849.3db4f8",
                   "type": "catch",
                   "z": "af33b6f4.f4e758",
                   "name": "überwache Drucker snmp Nodes",
                   "scope": [
                       "853f7770.689788",
                       "f79c0323.65825",
                       "84af89d1.cf4908"
                   ],
                   "uncaught": false,
                   "x": 710,
                   "y": 380,
                   "wires": [
                       [
                           "5b0a78c4.7fcd68"
                       ]
                   ]
               },
               {
                   "id": "4db349eb.b32a28",
                   "type": "trigger",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "op1": "true",
                   "op2": "0",
                   "op1type": "bool",
                   "op2type": "str",
                   "duration": "-60",
                   "extend": false,
                   "overrideDelay": false,
                   "units": "min",
                   "reset": "false",
                   "bytopic": "all",
                   "topic": "topic",
                   "outputs": 1,
                   "x": 1310,
                   "y": 200,
                   "wires": [
                       [
                           "853f7770.689788"
                       ]
                   ]
               },
               {
                   "id": "58b1b312.0f75ac",
                   "type": "trigger",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "op1": "true",
                   "op2": "0",
                   "op1type": "bool",
                   "op2type": "str",
                   "duration": "-10",
                   "extend": false,
                   "overrideDelay": false,
                   "units": "s",
                   "reset": "false",
                   "bytopic": "all",
                   "topic": "topic",
                   "outputs": 1,
                   "x": 1300,
                   "y": 760,
                   "wires": [
                       [
                           "f79c0323.65825",
                           "84af89d1.cf4908"
                       ]
                   ]
               },
               {
                   "id": "5b0a78c4.7fcd68",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "setze false",
                   "rules": [
                       {
                           "t": "set",
                           "p": "monitoring",
                           "pt": "flow",
                           "to": "false",
                           "tot": "bool"
                       },
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "false",
                           "tot": "bool"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 990,
                   "y": 380,
                   "wires": [
                       [
                           "7a0bab5.ccc2754",
                           "4db349eb.b32a28",
                           "58b1b312.0f75ac"
                       ]
                   ]
               },
               {
                   "id": "7a0bab5.ccc2754",
                   "type": "switch",
                   "z": "af33b6f4.f4e758",
                   "name": "ist offline",
                   "property": "payload",
                   "propertyType": "msg",
                   "rules": [
                       {
                           "t": "false"
                       }
                   ],
                   "checkall": "true",
                   "repair": false,
                   "outputs": 1,
                   "x": 1520,
                   "y": 560,
                   "wires": [
                       [
                           "16a4ff47.1517f1",
                           "2df9aa7f.dade36",
                           "4d0360fb.440bd",
                           "9f5048d1.6ce418"
                       ]
                   ]
               },
               {
                   "id": "7dd43fb4.a4c8f",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "setze printer status & pages",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer",
                           "pt": "msg",
                           "to": "{}",
                           "tot": "json"
                       },
                       {
                           "t": "set",
                           "p": "printer.status",
                           "pt": "msg",
                           "to": "printer.status",
                           "tot": "flow"
                       },
                       {
                           "t": "set",
                           "p": "printer.pages",
                           "pt": "msg",
                           "to": "printer.pages",
                           "tot": "flow"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2140,
                   "y": 460,
                   "wires": [
                       [
                           "c85d9732.2190c8"
                       ]
                   ]
               },
               {
                   "id": "c01cdabe.769ea8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.status[\"device\"]",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2580,
                   "y": 560,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "14723db8.d52622",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.status[\"printer\"]",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2550,
                   "y": 640,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "45d284c7.09966c",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.status[\"since\"]",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2570,
                   "y": 740,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "da172e87.462b6",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.pages",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2530,
                   "y": 860,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "6710284c.0bcb88",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.cartridges[\"percent\"].magenta",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2620,
                   "y": 320,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "a205458.53b91b8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.cartridges[\"percent\"].yellow",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2610,
                   "y": 240,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "6d10dec2.86a89",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.cartridges[\"percent\"].cyan",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2610,
                   "y": 160,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "b436d7a6.58a688",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer.cartridges[\"percent\"].black",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2610,
                   "y": 80,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "9ce003c1.e1d68",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "$moment(payload).locale(\"de\").tz('Europe/Berlin').format('DD.MM.YY - HH:mm')",
                           "tot": "jsonata"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2310,
                   "y": 740,
                   "wires": [
                       [
                           "45d284c7.09966c"
                       ]
                   ]
               },
               {
                   "id": "a8d55658.629d38",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "setze printer.cartridges",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer",
                           "pt": "msg",
                           "to": "{}",
                           "tot": "json"
                       },
                       {
                           "t": "set",
                           "p": "printer.cartridges",
                           "pt": "msg",
                           "to": "printer.cartridges",
                           "tot": "flow"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2120,
                   "y": 400,
                   "wires": [
                       [
                           "c85d9732.2190c8"
                       ]
                   ]
               },
               {
                   "id": "c85d9732.2190c8",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "monitoring",
                           "tot": "flow"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2430,
                   "y": 440,
                   "wires": [
                       [
                           "b7cbd22.9562b3"
                       ]
                   ]
               },
               {
                   "id": "9f5048d1.6ce418",
                   "type": "switch",
                   "z": "af33b6f4.f4e758",
                   "name": "flow.printer nicht leer",
                   "property": "printer",
                   "propertyType": "flow",
                   "rules": [
                       {
                           "t": "nempty"
                       }
                   ],
                   "checkall": "true",
                   "repair": false,
                   "outputs": 1,
                   "x": 1860,
                   "y": 460,
                   "wires": [
                       [
                           "7dd43fb4.a4c8f"
                       ]
                   ]
               },
               {
                   "id": "f328e54e.c9a428",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "monitoring",
                           "pt": "flow",
                           "to": "payload",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 780,
                   "y": 560,
                   "wires": [
                       [
                           "4ae447f0.185f18",
                           "7f00b497.90d35c",
                           "7a0bab5.ccc2754"
                       ]
                   ]
               },
               {
                   "id": "4ae447f0.185f18",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer",
                           "pt": "flow",
                           "to": "{\"pages\":0,\"status\":{\"device\":\"\",\"printer\":\"\",\"since\":\"\"}}",
                           "tot": "json"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1050,
                   "y": 760,
                   "wires": [
                       [
                           "58b1b312.0f75ac"
                       ]
                   ]
               },
               {
                   "id": "7f00b497.90d35c",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "printer",
                           "pt": "flow",
                           "to": "{\"cartridges\":{\"percent\":{\"black\":0,\"yellow\":0,\"cyan\":0,\"magenta\":0}}}",
                           "tot": "json"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 1030,
                   "y": 200,
                   "wires": [
                       [
                           "4db349eb.b32a28"
                       ]
                   ]
               },
               {
                   "id": "b7cbd22.9562b3",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "setze status",
                   "rules": [
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "true",
                           "fromt": "bool",
                           "to": "{\"fill\":\"green\",\"shape\":\"dot\",\"text\":\"true\"}",
                           "tot": "json"
                       },
                       {
                           "t": "change",
                           "p": "payload",
                           "pt": "msg",
                           "from": "false",
                           "fromt": "bool",
                           "to": "{\"fill\":\"red\",\"shape\":\"ring\",\"text\":\"false\"}",
                           "tot": "json"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2650,
                   "y": 380,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "de6284f8.4dc138",
                   "type": "switch",
                   "z": "af33b6f4.f4e758",
                   "name": "flow.printer nicht leer",
                   "property": "printer",
                   "propertyType": "flow",
                   "rules": [
                       {
                           "t": "nempty"
                       }
                   ],
                   "checkall": "true",
                   "repair": false,
                   "outputs": 1,
                   "x": 1860,
                   "y": 400,
                   "wires": [
                       [
                           "a8d55658.629d38"
                       ]
                   ]
               },
               {
                   "id": "7f8d419ea0707940",
                   "type": "debug",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "false",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 1190,
                   "y": 920,
                   "wires": []
               },
               {
                   "id": "fd22ba53c406b582",
                   "type": "switch",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "property": "payload",
                   "propertyType": "msg",
                   "rules": [
                       {
                           "t": "true"
                       },
                       {
                           "t": "false"
                       }
                   ],
                   "checkall": "true",
                   "repair": false,
                   "outputs": 2,
                   "x": 190,
                   "y": 560,
                   "wires": [
                       [
                           "dc52a45e9384ecdf"
                       ],
                       [
                           "f328e54e.c9a428"
                       ]
                   ]
               },
               {
                   "id": "dc52a45e9384ecdf",
                   "type": "switch",
                   "z": "af33b6f4.f4e758",
                   "name": "",
                   "property": "host",
                   "propertyType": "msg",
                   "rules": [
                       {
                           "t": "null"
                       },
                       {
                           "t": "nnull"
                       }
                   ],
                   "checkall": "true",
                   "repair": false,
                   "outputs": 2,
                   "x": 330,
                   "y": 520,
                   "wires": [
                       [
                           "c202182520b8e670"
                       ],
                       [
                           "f328e54e.c9a428"
                       ]
                   ]
               },
               {
                   "id": "c202182520b8e670",
                   "type": "change",
                   "z": "af33b6f4.f4e758",
                   "name": "host",
                   "rules": [
                       {
                           "t": "set",
                           "p": "host",
                           "pt": "msg",
                           "to": "IP Address",
                           "tot": "env"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 470,
                   "y": 480,
                   "wires": [
                       [
                           "f328e54e.c9a428"
                       ]
                   ]
               },
               {
                   "id": "85ccc155.f14e1",
                   "type": "subflow:af33b6f4.f4e758",
                   "z": "a442b54b44edc349",
                   "name": "",
                   "env": [
                       {
                           "name": "IP Address",
                           "value": "192.168.178.24",
                           "type": "str"
                       }
                   ],
                   "x": 790,
                   "y": 620,
                   "wires": [
                       [
                           "6828b34d419928fa"
                       ]
                   ]
               }
            ]
            
            

            Dann über den Import in das rosa Fenster kopieren:

            5aa7eafb-c3ee-4400-b240-171bb14ca73d-image.png

            c267cc42-9297-4d58-80fd-5bc3580fa77e-image.png

            Damrak2022 1 Reply Last reply Reply Quote 0
            • Damrak2022
              Damrak2022 @mickym last edited by Damrak2022

              @mickym kay, habe ich gemacht - sieht bei mir so aus:

              Bildschirmfoto 2022-06-06 um 06.22.54.png

              Ist das korrekt?

              Danke für Deine Hilfe. Gerne hätte ich auch Deine Grafik mit den Wellen, die sieht spitze aus.

              mickym 1 Reply Last reply Reply Quote 0
              • mickym
                mickym Most Active @Damrak2022 last edited by

                @damrak2022 Wunderbar, dann machst Du die Node auf und trägst dort die IP Adresse Deines Druckers ein:

                cc28afbc-3850-48ca-886f-3b9e8bbd9474-image.png

                Das mit der Grafik geht nicht - da ich das NodeRed Dashboard nutze und Du nutzt vis - aber lass uns erst mal schauen, dass es läuft.

                Wie gesagt mache die Node auf und trage dort erst mal Deine IP-Adresse ein.

                Damrak2022 1 Reply Last reply Reply Quote 0
                • Damrak2022
                  Damrak2022 @mickym last edited by Damrak2022

                  @mickym Okay, da stand schon die IP meines Raspi drin, Ist das richtig, das ich die jetzt auf die IP des Druckers geändert habe, oder war ich da wieder zu schnell?

                  Bildschirmfoto 2022-06-06 um 06.30.22.png

                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @Damrak2022 last edited by

                    @damrak2022 sagte in Füllstände mit Node Red auslesen:

                    @mickym Okay, da stand schon die IP meines Raspi drin, Ist das richtig, das ich die jetzt auf die IP des Druckers geändert habe, oder war ich da wieder zu schnell?

                    Nein das war richtig. 🙂 - Da muss die IP Adresse des Druckers rein.

                    Nun importierst Du noch diese 3 Nodes und verbindest sie wie in dem Bild:

                    [
                       {
                           "id": "a573677a596ae843",
                           "type": "inject",
                           "z": "a442b54b44edc349",
                           "name": "",
                           "props": [
                               {
                                   "p": "payload"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "true",
                           "payloadType": "bool",
                           "x": 150,
                           "y": 80,
                           "wires": [
                               [
                                   "85ccc155.f14e1"
                               ]
                           ]
                       },
                       {
                           "id": "354aa16f10ca5c1e",
                           "type": "inject",
                           "z": "a442b54b44edc349",
                           "name": "",
                           "props": [
                               {
                                   "p": "payload"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "false",
                           "payloadType": "bool",
                           "x": 150,
                           "y": 120,
                           "wires": [
                               [
                                   "85ccc155.f14e1"
                               ]
                           ]
                       },
                       {
                           "id": "6828b34d419928fa",
                           "type": "debug",
                           "z": "a442b54b44edc349",
                           "name": "",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "true",
                           "targetType": "full",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 550,
                           "y": 100,
                           "wires": []
                       }
                    ]
                    

                    efc36e92-94be-4f13-813d-11af1658f5f2-image.png

                    Damrak2022 1 Reply Last reply Reply Quote 0
                    • Damrak2022
                      Damrak2022 @mickym last edited by Damrak2022

                      @mickym

                      Bildschirmfoto 2022-06-06 um 06.33.32.png

                      Wie bekomme ich das "false" unter "SNMP"?

                      mickym 2 Replies Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @Damrak2022 last edited by

                        @damrak2022 Sehr gut - solange Du die blauen Punkte hast - musst Du oben rechts auf den Deploy Button drücken, damit das übernommen wird.

                        Dann machst Du das Debug Fenster auf (wie auf Abb. - die Wanze, Käfer .. 😉 ) und startest den Flow mit Druck auf true.

                        Dann machst Du die Nachrichten auf und schaust mal, ob die Druckerdaten raus kommen.

                        8159ac78-af23-40c8-bc31-f116ed107f9f-image.png

                        1 Reply Last reply Reply Quote 0
                        • mickym
                          mickym Most Active @Damrak2022 last edited by

                          @damrak2022 sagte in Füllstände mit Node Red auslesen:

                          Wie bekomme ich das "false" unter "SNMP"?

                          Mit true startest Du den Flow im Moment, mit false stoppst Du ihn wieder. Aber erst müssen wir mal schauen, ob wir die Daten überhaupt abrufen können.

                          Damrak2022 1 Reply Last reply Reply Quote 0
                          • Damrak2022
                            Damrak2022 @mickym last edited by

                            @mickym Ja, Daten kommen

                            Bildschirmfoto 2022-06-06 um 06.39.39.png

                            mickym 1 Reply Last reply Reply Quote 0
                            • mickym
                              mickym Most Active @Damrak2022 last edited by mickym

                              @damrak2022 Nee da ist noch ein Fehler drin. Klapp mal die Nachrichten auf und schau mal was für ein error kommt. Der Status der SMNP Node sollte auch den true status haben und nicht false, da sonst ein Fehler aufgetreten ist.

                              Damrak2022 1 Reply Last reply Reply Quote 0
                              • Damrak2022
                                Damrak2022 @mickym last edited by

                                @mickym Sorry, wo mache ich die Nachrichten auf?

                                mickym 1 Reply Last reply Reply Quote 0
                                • mickym
                                  mickym Most Active @Damrak2022 last edited by mickym

                                  @damrak2022 Auf die kleinen Pfeile neben dem Werten klicken. 😉

                                  c096e517-5743-4ed7-bbed-ee5367a76b13-image.png

                                  Hast Du auch auf den true und nicht auf den false Button geklickt?

                                  Damrak2022 1 Reply Last reply Reply Quote 0
                                  • Damrak2022
                                    Damrak2022 @mickym last edited by

                                    @mickym Ja, true habe ich gedrückt und das ist die Ausgabe:

                                    Bildschirmfoto 2022-06-06 um 06.46.53.png

                                    mickym 1 Reply Last reply Reply Quote 0
                                    • mickym
                                      mickym Most Active @Damrak2022 last edited by

                                      @damrak2022 Ja machst Du bitte mal alle Pfeile auf, dass man lesen kann, was unter error drin steht usw. 😉

                                      Damrak2022 1 Reply Last reply Reply Quote 0
                                      • Damrak2022
                                        Damrak2022 @mickym last edited by Damrak2022

                                        @mickym Sorry, hatte ich übersehen

                                        6.6.2022, 06:46:16node: 6828b34d419928fa
                                        msg : Object
                                        object
                                        _msgid: "9b95d3c7272df9be"
                                        payload: false
                                        host: "192.168.178.35"
                                        error: object
                                        message: "RequestFailedError: NoSuchName: 1.3.6.1.2.1.1.3.0"
                                        source: object
                                        id: "7945e1d506c3b56f"
                                        type: "snmp"
                                        name: "snmp Drucker Status"
                                        count: 1
                                        printer: object
                                        empty
                                        6.6.2022, 06:46:17node: 6828b34d419928fa
                                        msg : Object
                                        object
                                        _msgid: "9b95d3c7272df9be"
                                        payload: false
                                        host: "192.168.178.35"
                                        oid: "1.3.6.1.2.1.43.11.1"
                                        printer: object
                                        cartridges: object
                                        percent: object
                                        empty
                                        

                                        Bildschirmfoto 2022-06-06 um 06.51.56.png

                                        mickym 1 Reply Last reply Reply Quote 0
                                        • mickym
                                          mickym Most Active @Damrak2022 last edited by

                                          @damrak2022 OK dann funlktionieren bei Deinem Drucker die OIDs anscheinend nicht.

                                          Dann müssen wir das halt manuell machen.

                                          Schreibst Du mal die OIDs auf, mit denen Du die Daten erfolgreich mit dem MIB Browser ermitteln konntest?

                                          Damrak2022 1 Reply Last reply Reply Quote 0
                                          • Damrak2022
                                            Damrak2022 @mickym last edited by Damrak2022

                                            @mickym Dazu muss ich was sagen. Bei der ersten Einrichtung über snmp habe ich einfach die OID`s genommen, welche bei den Farben dabeistanden.
                                            Mittlerweile sieht es so aus:

                                            Bildschirmfoto 2022-06-06 um 06.58.28.png

                                            Bildschirmfoto 2022-06-06 um 06.58.46.png

                                            Das ganze Drama fing ja erst an, nachdem ich die Magenta Patrone gewechselt hatte. Vorher ging das.

                                            Vor allem steht da kein Wert mehr. Es gibt zwar andere ID`s welche, dem Füllstand entsprechen, welche der Drucker anzeigt, aber das wäre ja mehr geraten

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            640
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            74
                                            1874
                                            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