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

  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Bambu lab 3d Drucker MQTT Integration

NEWS

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

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

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

Bambu lab 3d Drucker MQTT Integration

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
121 Beiträge 9 Kommentatoren 28.0k Aufrufe 9 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.
  • D Offline
    D Offline
    djalexz
    schrieb am zuletzt editiert von djalexz
    #69

    Hallo zusammen,

    da hier immer nur so ein paar Schnipsel von Node-Red drinstehen und es wohl noch einige gibt für die Node-Red ein Buch mit sieben Siegeln ist, hier eine kleine Anleitung zur Installation und Einbindung meines Flows.

    f7825076-70f0-494e-bd66-671c9c80ea88-image.png

    Damit werden alle relevanten Werte des Druckers umgewandelt, sodass diese genutzt werden können.

    Hier kommt der Subflow von @mickym zum Einsatz (nochmals vielen Dank dafür an dieser Stelle).

    Da ich für diese Anleitung eine extra Node-Red Instanz anlegen musste, steht dort natürlich node-red.1.
    Stört euch nicht daran. Bei euch steht node-red.0

    Ich hoffe es hilft dem Ein oder Anderen und ihr könnt damit jetzt euren Bambu "Smart" machen.

    HINWEIS:
    Da ich einen X1C habe, kann ich nur für diesen sprechen.
    Ich kann keinerlei Garantie übernehmen, dass das bei einem P1P ebenfalls läuft.
    Theoretisch sollte es das. Ich kann es halt nur nicht testen.
    Ich gehe hier von der neuesten Firmware des Druckers aus (01.04.00.00 (20230207))
    Mit MQTT TLS Verschlüsselung usw.

    ansonsten muss die MQTT Node anders eingestellt werden (ohne Verschlüsselung).

    Bei mir kommt für das Dashboard Jarvis von @Zefau zum Einsatz.
    Die Datenpunkte dafür sind natürlich Teil dieses Flows.
    Wer das nicht braucht oder etwas Anderes nutzt, muss die Nodes (via Doppelklick) entsprechend anpassen.

    Und Übernahme (Deploy) nicht vergessen 😉

    Jetzt gehts los:

    Installation von Node-Red:


    Node-Red Instanz in ioBroker hinzufügen:

    bcaa382b-3cee-4478-8849-efa340eb6219-image.png

    e6270797-b9d9-4a5b-a402-915fbf47f5b4-image.png

    Haken bei Palletenmanager benutzen und bei Erstellung von Fremd-Objekten zulassen setzen und Speichern:

    28531052-444e-412b-87f4-581dc03ecdf3-image.png

    Darauf achten, dass die Instanz gestartet ist (grünes Symbol) und auf das Fenster Icon klicken:

    3a6a9bc7-6dac-444a-9990-6de0e2df31da-image.png


    Node-Red (die Oberfläche)

    Die Einführung könnt ihr euch gerne anschauen (m.M.n. sehr Sinnvoll) oder das Fenster schließen:

    9254918c-0bd6-4fe8-9922-3a44e67db493-image.png

    Importieren meines Flows:

    eeaf90fd-838d-4926-ad42-323facbd3044-image.png

    Hier der Flow zum Kopieren und Importieren

    [
        {
            "id": "6e802f1553b18149",
            "type": "subflow",
            "name": "JSON or Obj to IOBroker",
            "info": "# Creates an IOBroker tree\n\nThis node creates an IOBroker tree out of an Java-Object or JSON String.\n\nThe object tree will be created under 0_userdata.0\nIn addition to the JSON-String or Java Object as `msg.payload` it is necessary to specify a `msg.top` properity in addition to the msg-Object.\n\nThe object tree will be created under 0_userdata.0\n\nExisting `msg.topic` entries will be deleted.\nAn iobroker-out node has to be appended to this subflow node. It is not part of the subflow itself. No topic should be specified in the iobroker out node.\n\nIs `msg.top` property isn't defined, the `top` property of the subflow-node is used. \n\nIn the properties of the subflow node a new property `keepTopic` has been added. Default is _false_ to keep the current behaviour. If set to _true_ then the originial topic will be placed between the `top` property of the subflow node and the property of the analyzed JSON object.\n\n**Attention:**\nIf msg.top and top is empty, all msg.topics (msg.topic) will be directly prefixed with 0_userdata.0. . \n\n**Update 13.09.2022:**\nSpaces in topics of objects are no longer replaced with underscores in objects. No differences between all data types.\n\n# Erstellt einen Objektbaum im ioBroker\n\nDiese Node erstellt einen Objektbaum im ioBroker aus einem JAVA Objekt bzw. einem JSON String. \n\nDer Baum wird in jedem Fall unter 0_userdata.0 erstellt und zwar unter dem Topic der in` msg.top` mitgegeben wurde. In der `msg.payload` befindet sich dann der JSON String oder das entsprechende Objekt.\n\nExistierende `msg.topic `Einträge werden gelöscht.\nEin entsprechende iobroker-out Node muss an den Flow angehängt werden. Sie ist nicht Bestandteil des Subflows. In dieser iobroker-out Node darf kein Topic angegeben werden. \n\nFalls msg.top nicht definiert wurde, wird der `top`-Wert der Subflow-Node verwendet.\n\nIn den Eigenschaften der Subflow-Node wurde ein neuer Parameter `keepTopic` hinzugefügt. Standardwert ist _false_, um das bisherige Verhalten beizubehalten. Setzt man die Eigenschaft auf _true_, dann wird das originale Topic zwischen der `top` Eigenschaft der Subflow-Node und Eigenschaft des analysierten JSON Objektes eingefügt.\n\n**Achtung:**\nWenn top und msg.top leer ist, werden alle msg.topics (msg.topic) direkt unter dem Präfix 0_userdata.0., angelegt bzw. ausgegeben. \n\n**Update 13.09.2022:**\nLeerzeichen werden in Topics von Objekten nicht mehr durch Unterstriche ersetzt. Es gibt keine Unterschiede mehr zwischen den Datentypen.",
            "category": "",
            "in": [
                {
                    "x": 60,
                    "y": 160,
                    "wires": [
                        {
                            "id": "554b8c663bcb46c2"
                        }
                    ]
                }
            ],
            "out": [
                {
                    "x": 2620,
                    "y": 280,
                    "wires": [
                        {
                            "id": "0962842ebd23e0d7",
                            "port": 0
                        }
                    ]
                }
            ],
            "env": [
                {
                    "name": "top",
                    "type": "str",
                    "value": "objRoot"
                },
                {
                    "name": "keepTopic",
                    "type": "bool",
                    "value": "false"
                }
            ],
            "meta": {},
            "color": "#E2D96E",
            "icon": "node-red/batch.svg"
        },
        {
            "id": "3e11e8338f694832",
            "type": "split",
            "z": "6e802f1553b18149",
            "name": "split object",
            "splt": "\\n",
            "spltType": "str",
            "arraySplt": 1,
            "arraySpltType": "len",
            "stream": false,
            "addname": "key",
            "x": 1370,
            "y": 160,
            "wires": [
                [
                    "0562a4249c8b856b"
                ]
            ]
        },
        {
            "id": "0562a4249c8b856b",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "add key to topic",
            "rules": [
                {
                    "t": "set",
                    "p": "stateName",
                    "pt": "msg",
                    "to": "key",
                    "tot": "msg"
                },
                {
                    "t": "set",
                    "p": "topic",
                    "pt": "msg",
                    "to": "topic  & '.' & key",
                    "tot": "jsonata"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1560,
            "y": 160,
            "wires": [
                [
                    "ddc90985bef0fafa"
                ]
            ]
        },
        {
            "id": "ddc90985bef0fafa",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "is type?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "istype",
                    "v": "array",
                    "vt": "array"
                },
                {
                    "t": "istype",
                    "v": "object",
                    "vt": "object"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 3,
            "x": 1740,
            "y": 160,
            "wires": [
                [
                    "bfce19b206660fbe"
                ],
                [
                    "3e11e8338f694832"
                ],
                [
                    "1a8c03d866b85b12"
                ]
            ]
        },
        {
            "id": "bfce19b206660fbe",
            "type": "split",
            "z": "6e802f1553b18149",
            "name": "split array",
            "splt": "\\n",
            "spltType": "str",
            "arraySplt": 1,
            "arraySpltType": "len",
            "stream": false,
            "addname": "",
            "x": 780,
            "y": 280,
            "wires": [
                [
                    "e89927810c6d75ec"
                ]
            ]
        },
        {
            "id": "e89927810c6d75ec",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "add index to topic",
            "rules": [
                {
                    "t": "set",
                    "p": "topic",
                    "pt": "msg",
                    "to": "topic  & '.' & parts.index",
                    "tot": "jsonata"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 970,
            "y": 280,
            "wires": [
                [
                    "a4d1a5d04564dc77"
                ]
            ]
        },
        {
            "id": "f5d52c6a57d08904",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "finalize msg.topic",
            "rules": [
                {
                    "t": "set",
                    "p": "top",
                    "pt": "msg",
                    "to": "'0_userdata.0.' & top",
                    "tot": "jsonata"
                },
                {
                    "t": "set",
                    "p": "topic",
                    "pt": "msg",
                    "to": "top & '.' & topic",
                    "tot": "jsonata"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 2170,
            "y": 240,
            "wires": [
                [
                    "0962842ebd23e0d7"
                ]
            ]
        },
        {
            "id": "1a8c03d866b85b12",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "is msg.top != null",
            "property": "top",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "nnull"
                },
                {
                    "t": "null"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 1950,
            "y": 280,
            "wires": [
                [
                    "f5d52c6a57d08904"
                ],
                [
                    "74c895ce724750de"
                ]
            ]
        },
        {
            "id": "e023fe88445ce43e",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "",
            "rules": [
                {
                    "t": "delete",
                    "p": "topic",
                    "pt": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 350,
            "y": 200,
            "wires": [
                [
                    "3649300b4c233b10"
                ]
            ]
        },
        {
            "id": "3649300b4c233b10",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "is type?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "istype",
                    "v": "json",
                    "vt": "json"
                },
                {
                    "t": "istype",
                    "v": "array",
                    "vt": "array"
                },
                {
                    "t": "istype",
                    "v": "object",
                    "vt": "object"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 4,
            "x": 600,
            "y": 160,
            "wires": [
                [
                    "fc7913a8524badb7"
                ],
                [
                    "bfce19b206660fbe"
                ],
                [
                    "3e11e8338f694832"
                ],
                [
                    "9ac3cc3681e8b6c6"
                ]
            ]
        },
        {
            "id": "1b8480cd2df7ba3f",
            "type": "comment",
            "z": "6e802f1553b18149",
            "name": "Array",
            "info": "",
            "x": 600,
            "y": 280,
            "wires": []
        },
        {
            "id": "b3541807672be040",
            "type": "comment",
            "z": "6e802f1553b18149",
            "name": "object",
            "info": "",
            "x": 1340,
            "y": 100,
            "wires": []
        },
        {
            "id": "a4d1a5d04564dc77",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "is type?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "istype",
                    "v": "object",
                    "vt": "object"
                },
                {
                    "t": "istype",
                    "v": "array",
                    "vt": "array"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 3,
            "x": 1160,
            "y": 280,
            "wires": [
                [
                    "3e11e8338f694832"
                ],
                [
                    "bfce19b206660fbe"
                ],
                [
                    "a096a93bb82b7a93"
                ]
            ]
        },
        {
            "id": "74c895ce724750de",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "finalize msg.topic",
            "rules": [
                {
                    "t": "set",
                    "p": "top",
                    "pt": "msg",
                    "to": "top",
                    "tot": "env"
                },
                {
                    "t": "set",
                    "p": "top",
                    "pt": "msg",
                    "to": "'0_userdata.0.' & top",
                    "tot": "jsonata"
                },
                {
                    "t": "set",
                    "p": "topic",
                    "pt": "msg",
                    "to": "top & '.' & topic",
                    "tot": "jsonata"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 2170,
            "y": 320,
            "wires": [
                [
                    "0962842ebd23e0d7"
                ]
            ]
        },
        {
            "id": "554b8c663bcb46c2",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "",
            "property": "keepTopic",
            "propertyType": "env",
            "rules": [
                {
                    "t": "true"
                },
                {
                    "t": "false"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 170,
            "y": 160,
            "wires": [
                [
                    "e30ba9f0483285e4"
                ],
                [
                    "e023fe88445ce43e"
                ]
            ]
        },
        {
            "id": "e30ba9f0483285e4",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "",
            "rules": [
                {
                    "t": "change",
                    "p": "topic",
                    "pt": "msg",
                    "from": "/",
                    "fromt": "str",
                    "to": ".",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 350,
            "y": 120,
            "wires": [
                [
                    "3649300b4c233b10"
                ]
            ]
        },
        {
            "id": "0962842ebd23e0d7",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "translate invalid chars in topic",
            "rules": [
                {
                    "t": "change",
                    "p": "topic",
                    "pt": "msg",
                    "from": "..",
                    "fromt": "str",
                    "to": ".",
                    "tot": "str"
                },
                {
                    "t": "change",
                    "p": "topic",
                    "pt": "msg",
                    "from": "€",
                    "fromt": "str",
                    "to": "EUR",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 2430,
            "y": 280,
            "wires": [
                []
            ]
        },
        {
            "id": "9ac3cc3681e8b6c6",
            "type": "change",
            "z": "6e802f1553b18149",
            "name": "set topic, if empty",
            "rules": [
                {
                    "t": "set",
                    "p": "topic",
                    "pt": "msg",
                    "to": "topic ? topic : $type(payload)\t",
                    "tot": "jsonata"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 950,
            "y": 200,
            "wires": [
                [
                    "a096a93bb82b7a93"
                ]
            ]
        },
        {
            "id": "fc7913a8524badb7",
            "type": "json",
            "z": "6e802f1553b18149",
            "name": "",
            "property": "payload",
            "action": "obj",
            "pretty": false,
            "x": 750,
            "y": 100,
            "wires": [
                [
                    "d9e7bdd4c48a8aa1"
                ]
            ]
        },
        {
            "id": "d9e7bdd4c48a8aa1",
            "type": "switch",
            "z": "6e802f1553b18149",
            "name": "is type?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "istype",
                    "v": "array",
                    "vt": "array"
                },
                {
                    "t": "istype",
                    "v": "object",
                    "vt": "object"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 3,
            "x": 900,
            "y": 100,
            "wires": [
                [
                    "1520be42bcc2145e"
                ],
                [
                    "1520be42bcc2145e"
                ],
                [
                    "9ac3cc3681e8b6c6"
                ]
            ]
        },
        {
            "id": "a096a93bb82b7a93",
            "type": "junction",
            "z": "6e802f1553b18149",
            "x": 1380,
            "y": 280,
            "wires": [
                [
                    "1a8c03d866b85b12"
                ]
            ]
        },
        {
            "id": "1520be42bcc2145e",
            "type": "junction",
            "z": "6e802f1553b18149",
            "x": 480,
            "y": 20,
            "wires": [
                [
                    "3649300b4c233b10"
                ]
            ]
        },
        {
            "id": "9582121ff81174a6",
            "type": "tab",
            "label": "Flow 15",
            "disabled": false,
            "info": "",
            "env": []
        },
        {
            "id": "c3f9f96853c3f09c",
            "type": "group",
            "z": "9582121ff81174a6",
            "name": "Steuerung Steckdose",
            "style": {
                "label": true,
                "fill": "#7fb7df",
                "fill-opacity": "0.22",
                "color": "#000000"
            },
            "nodes": [
                "cd5f62e24a3e846f",
                "964df5b70be104e6",
                "ebace1619b2a4e15",
                "3143caf661f13237",
                "aeb883c176549af3",
                "f683e53accbca89f",
                "cff0b21c459cab43",
                "64fa2ca669c5a78d",
                "72cb87b2b06c4f05",
                "4ce8104a4e434a82",
                "e0079711246b60b0",
                "1d943caf9a8bc0f6",
                "ff01d8a59e17dc93",
                "c8abbf4d53a09ffe",
                "c5c06330d2e576f6",
                "f97a028e21d51bfb",
                "cac765606601d65c",
                "ae46dbed7e5925ae",
                "445ce2a0ad0a534a",
                "79d8f512af50dd04",
                "0c5048b46f072d52",
                "5c0e9eddf913e64d"
            ],
            "x": 74,
            "y": 379,
            "w": 1352,
            "h": 482
        },
        {
            "id": "4380d7035264bead",
            "type": "group",
            "z": "9582121ff81174a6",
            "name": "Online/Offline Anzeige",
            "style": {
                "label": true,
                "color": "#000000",
                "fill": "#addb7b",
                "fill-opacity": "0.38"
            },
            "nodes": [
                "d2a5ed4e2b8c8674",
                "b5c862f5d50c56cb",
                "2e71b198fe06ccdb",
                "144c29803a38e2a4",
                "3a131237a7bdec9d"
            ],
            "x": 1074,
            "y": 79,
            "w": 412,
            "h": 242
        },
        {
            "id": "19ede36faf38f69b",
            "type": "group",
            "z": "9582121ff81174a6",
            "name": "X1C Datenpunkt Umwandlung",
            "style": {
                "fill": "#ffff00",
                "label": true,
                "fill-opacity": "0.36",
                "color": "#000000"
            },
            "nodes": [
                "e2852c3101736fc9",
                "477ecaa1b9913815",
                "9fadcc36a22ec38b",
                "44d9370861f0a79a",
                "33a162f31f850a9e",
                "f6c8fbdf638c04e8",
                "ce27f3362985a4d3",
                "89074ea56277b288",
                "01c35b9bb3921713",
                "3eb26b7322587c6b",
                "21081e6a23dc83a1"
            ],
            "x": 14,
            "y": 39,
            "w": 1032,
            "h": 322
        },
        {
            "id": "e2852c3101736fc9",
            "type": "subflow:6e802f1553b18149",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "",
            "env": [
                {
                    "name": "top",
                    "value": "X1C",
                    "type": "str"
                }
            ],
            "x": 170,
            "y": 160,
            "wires": [
                [
                    "ce27f3362985a4d3"
                ]
            ]
        },
        {
            "id": "477ecaa1b9913815",
            "type": "mqtt in",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "Bambu X1C Bambu_X1C",
            "topic": "device/DieSeriennummerDeinesDruckers/report",
            "qos": "2",
            "datatype": "auto-detect",
            "broker": "84f61d394ba2ab34",
            "nl": false,
            "rap": true,
            "rh": 0,
            "inputs": 0,
            "x": 150,
            "y": 100,
            "wires": [
                [
                    "e2852c3101736fc9"
                ]
            ]
        },
        {
            "id": "9fadcc36a22ec38b",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "schreibe Datenpunkte in ioBroker",
            "topic": "",
            "ack": "true",
            "autoCreate": "true",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 880,
            "y": 200,
            "wires": []
        },
        {
            "id": "44d9370861f0a79a",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "heatbreak_fan_speed",
            "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 560,
            "y": 120,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "33a162f31f850a9e",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "Stage Parser",
            "func": "\nfunction parseAction(actionId) {\n    if(actionId === undefined) {\n        return \"\";\n    }\n    switch (actionId) {\n        case -2:\n            return \"Offline\";\n        case -1:\n            return \"Idle\";\n        case 0:\n            return \"Printing\";  // idle or printing\n        case 1:\n            return \"Auto bed leveling\";\n        case 2:\n            return \"Heatbed preheating\";\n        case 3:\n            return \"Sweeping XY mech mode\";\n        case 4:\n            return \"Changing filament\";\n        case 5:\n            return \"M400 pause\";\n        case 6:\n            return \"Paused due to filament runout\";\n        case 7:\n            return \"Heating hotend\";\n        case 8:\n            return \"Calibrating extrusion\";\n        case 9:\n            return \"Scanning bed surface\";\n        case 10:\n            return \"Inspecting first layer\";\n        case 11:\n            return \"Identifying build plate type\";\n        case 12:\n            return \"Calibrating Micro Lidar\";\n        case 13:\n            return \"Homing toolhead\";\n        case 14:\n            return \"Cleaning nozzle tip\";\n        case 15:\n            return \"Checking extruder temperature\";\n        case 16:\n            return \"Printing was paused by the user\";\n        case 17:\n            return \"Pause of front cover falling\";\n        case 18:\n            return \"Calibrating the micro lidar\";\n        case 19:\n            return \"Calibrating extrusion flow\";\n        case 20:\n            return \"Paused due to nozzle temperature malfunction\";\n        case 21:\n            return \"Paused due to heat bed temperature malfunction\";\n        default:\n            return actionId.toString()\n    }\n}\n\n\n\n    \nvar current_action = parseAction(msg.payload);\n\n\n\n    msg.payload = current_action;\n\n\n\n    return [msg];\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 530,
            "y": 160,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "f6c8fbdf638c04e8",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "Translate X1C Speed Profile",
            "func": "function parseAction(SpeedProfile) {\n    if (SpeedProfile === undefined) {\n        return \"\";\n    }\n    switch (SpeedProfile) {\n        case 1:\n            return \"Silent\";\n           \n        case 2:\n            return \"Standard\";\n            \n        case 3:\n            return \"Sport\";\n           \n        case 4:\n            return \"Ludicrous\";\n           \n        default:\n            return \"Undefined\";\n          \n\n   \n    }\n\n}\n\n\n\n    var SpeedProfile = parseAction(msg.payload);\n    msg.payload = SpeedProfile;\n\n\n    return [msg];\n\n\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 580,
            "y": 200,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "ce27f3362985a4d3",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "Verteiler",
            "property": "topic",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.cooling_fan_speed",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.stg_cur",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.spd_lvl",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.big_fan1_speed",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.big_fan2_speed",
                    "vt": "str"
                },
                {
                    "t": "eq",
                    "v": "0_userdata.0.X1C.print.mc_remaining_time",
                    "vt": "str"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 8,
            "x": 360,
            "y": 140,
            "wires": [
                [
                    "89074ea56277b288"
                ],
                [
                    "44d9370861f0a79a"
                ],
                [
                    "33a162f31f850a9e"
                ],
                [
                    "f6c8fbdf638c04e8"
                ],
                [
                    "3eb26b7322587c6b"
                ],
                [
                    "01c35b9bb3921713"
                ],
                [
                    "21081e6a23dc83a1"
                ],
                [
                    "9fadcc36a22ec38b"
                ]
            ],
            "outputLabels": [
                "Cooling Fan Speed",
                "Heatbreak Fan Speed",
                "Stage Parser",
                "Speed Profile",
                "AUX Fan Speed",
                "Chamber Fan Speed",
                "remaining_time",
                ""
            ]
        },
        {
            "id": "89074ea56277b288",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "cooling_fan_speed",
            "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 550,
            "y": 80,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "01c35b9bb3921713",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "big_fan2_speed (Chamber)",
            "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 580,
            "y": 280,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "3eb26b7322587c6b",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "big_fan1_speed (AUX)",
            "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 560,
            "y": 240,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "21081e6a23dc83a1",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "19ede36faf38f69b",
            "name": "remaining_time",
            "func": "//var timeleft = 3727; //1h:2m:7s\n//Umrechnung in Stunden, Minuten, Sekunden\n\nvar hour = Math.floor((msg.payload % 3600) / 60);\nvar minute = Math.floor(msg.payload % 60);\n\n//Den String von Stunden, Minuten und Sekunden auf 2 Stellen ändern\nif (hour < 10) {\nhour = \"0\" + hour;\n}\n\nif (minute < 10) {\nminute = \"0\" + minute;\n}\n\n\nmsg.payload = hour + \":\" + minute;\n\n\n\n\nreturn msg;\n\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 540,
            "y": 320,
            "wires": [
                [
                    "9fadcc36a22ec38b"
                ]
            ]
        },
        {
            "id": "cd5f62e24a3e846f",
            "type": "function",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "erstelle Jarvis Benachrichtigung",
            "func": "var jarvisNotify = {};\n//Beispiele\njarvisNotify.title = \"Abschalten nicht möglich\";\njarvisNotify.caption = \"\"; // wird unter dem Titel angezeigt\njarvisNotify.message = '<b>Ich drucke gerade, die Steckdose abzuschalten wäre eine blöde Idee!</b>';\n// Alternative Möglichkeiten\n//jarvisNotify.message= '<img src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></img>'; //Klappt, wird komplett angezeigt\n//jarvisNotify.message= '<iFrame src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></iFrame>'; //Klappt nicht, nur Teil wird angezeigt\n//jarvisNotify.message= getState('0_userdata.0.jarvis.pollenflug.Html').val;\n//jarvisNotify.message= getState('0_userdata.0.Html.HTML').val;\n//jarvisNotify.state = \"unread\";          //Damit bleibt die Benachrichtigung auch nach POPUP ungelesen und wird oben angezeigt mit der Zahl\njarvisNotify.criticality = \"error\";      // error,warning,info,success\njarvisNotify.display = \"popup\";          //drawer,snackbar,popup, none für focusTab\njarvisNotify.timeout = 10000;  //10000ms -> 10 Sekunden\n//jarvisNotify.timeout = 15000;  //5000ms -> 5 Sekunden\n//jarvisNotify.spinner= false; // drehender dreiViertel Kreis\njarvisNotify.progress = true;\njarvisNotify.position = \"top-left\";\njarvisNotify.icon = \"ic:outline-error\"; //mdi Iconify battery-alert-variant-outline\njarvisNotify.iconColor = \"white\";\njarvisNotify.color = \"red\";\njarvisNotify.textColor = \"white\";\nmsg.payload = JSON.stringify(jarvisNotify);\nreturn msg;",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 710,
            "y": 540,
            "wires": [
                [
                    "964df5b70be104e6"
                ]
            ]
        },
        {
            "id": "964df5b70be104e6",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Datenpunkt Jarvis Benachrichtigung",
            "topic": "jarvis.0.addNotification",
            "ack": "false",
            "autoCreate": "false",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1030,
            "y": 540,
            "wires": []
        },
        {
            "id": "ebace1619b2a4e15",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "> oder < als 1",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "gt",
                    "v": "1",
                    "vt": "str"
                },
                {
                    "t": "lt",
                    "v": "1",
                    "vt": "str"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 440,
            "y": 540,
            "wires": [
                [
                    "cd5f62e24a3e846f",
                    "72cb87b2b06c4f05"
                ],
                [
                    "aeb883c176549af3"
                ]
            ],
            "outputLabels": [
                "Druck aktiv",
                "Druck nicht aktiv"
            ]
        },
        {
            "id": "3143caf661f13237",
            "type": "ioBroker get",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "heatbreak_fan_speed",
            "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
            "attrname": "payload",
            "payloadType": "value",
            "errOnInvalidState": "nothing",
            "x": 220,
            "y": 540,
            "wires": [
                [
                    "ebace1619b2a4e15"
                ]
            ]
        },
        {
            "id": "aeb883c176549af3",
            "type": "change",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "setze msg.payload auf false",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "false",
                    "tot": "bool"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 700,
            "y": 580,
            "wires": [
                [
                    "4ce8104a4e434a82"
                ]
            ]
        },
        {
            "id": "f683e53accbca89f",
            "type": "ioBroker in",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Schalter in Dashboard (Steckdose Drucker)",
            "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
            "payloadType": "value",
            "onlyack": "",
            "func": "all",
            "gap": "",
            "fireOnStart": "false",
            "outFormat": "MQTT",
            "x": 280,
            "y": 460,
            "wires": [
                [
                    "cff0b21c459cab43"
                ]
            ]
        },
        {
            "id": "cff0b21c459cab43",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "TRUE oder FALSE?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "true"
                },
                {
                    "t": "false"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 220,
            "y": 500,
            "wires": [
                [
                    "4ce8104a4e434a82"
                ],
                [
                    "3143caf661f13237"
                ]
            ]
        },
        {
            "id": "64fa2ca669c5a78d",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Schalter in Dashboard (Steckdose Drucker)",
            "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
            "ack": "false",
            "autoCreate": "true",
            "stateName": "",
            "role": "",
            "payloadType": "boolean",
            "readonly": "false",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1090,
            "y": 480,
            "wires": []
        },
        {
            "id": "72cb87b2b06c4f05",
            "type": "change",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "setze msg.payload auf true",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "true",
                    "tot": "bool"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 700,
            "y": 460,
            "wires": [
                [
                    "64fa2ca669c5a78d"
                ]
            ]
        },
        {
            "id": "b5c862f5d50c56cb",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "4380d7035264bead",
            "name": "FALSE oder nicht?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "false"
                },
                {
                    "t": "else"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 1230,
            "y": 160,
            "wires": [
                [
                    "144c29803a38e2a4"
                ],
                [
                    "2e71b198fe06ccdb"
                ]
            ]
        },
        {
            "id": "2e71b198fe06ccdb",
            "type": "change",
            "z": "9582121ff81174a6",
            "g": "4380d7035264bead",
            "name": "setze msg.payload auf online",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "online",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1260,
            "y": 240,
            "wires": [
                [
                    "3a131237a7bdec9d"
                ]
            ]
        },
        {
            "id": "144c29803a38e2a4",
            "type": "change",
            "z": "9582121ff81174a6",
            "g": "4380d7035264bead",
            "name": "setze msg.payload auf offline",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "offline",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1260,
            "y": 200,
            "wires": [
                [
                    "3a131237a7bdec9d"
                ]
            ]
        },
        {
            "id": "4ce8104a4e434a82",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Datenpunkt Steckdose Drucker An/AUS",
            "topic": "alias.0.Buero.3D-Drucker.SET",
            "ack": "false",
            "autoCreate": "false",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 740,
            "y": 500,
            "wires": []
        },
        {
            "id": "3a131237a7bdec9d",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "4380d7035264bead",
            "name": "Datenpunkt Verbindungsstatus des Druckers",
            "topic": "0_userdata.0.X1C.Verbindungsstatus",
            "ack": "false",
            "autoCreate": "true",
            "stateName": "",
            "role": "",
            "payloadType": "string",
            "readonly": "false",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1290,
            "y": 280,
            "wires": []
        },
        {
            "id": "e0079711246b60b0",
            "type": "comment",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Abschalten verhindern, wenn Heatbreak_Fan_Speed über 1 (Düse ist heiß)",
            "info": "",
            "x": 380,
            "y": 420,
            "wires": []
        },
        {
            "id": "1d943caf9a8bc0f6",
            "type": "ioBroker get",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
            "topic": "0_userdata.0.X1C.automatisch_abschalten",
            "attrname": "payload",
            "payloadType": "value",
            "errOnInvalidState": "nothing",
            "x": 340,
            "y": 720,
            "wires": [
                [
                    "c8abbf4d53a09ffe"
                ]
            ]
        },
        {
            "id": "ff01d8a59e17dc93",
            "type": "inject",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "alle 10 Min. TRUE senden",
            "props": [
                {
                    "p": "payload"
                }
            ],
            "repeat": "600",
            "crontab": "",
            "once": false,
            "onceDelay": 0.1,
            "topic": "",
            "payload": "true",
            "payloadType": "bool",
            "x": 240,
            "y": 820,
            "wires": [
                [
                    "1d943caf9a8bc0f6"
                ]
            ]
        },
        {
            "id": "c8abbf4d53a09ffe",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "TRUE?",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "true"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 1,
            "x": 180,
            "y": 760,
            "wires": [
                [
                    "c5c06330d2e576f6"
                ]
            ]
        },
        {
            "id": "f97a028e21d51bfb",
            "type": "switch",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "> oder < als 1",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "gt",
                    "v": "1",
                    "vt": "str"
                },
                {
                    "t": "lt",
                    "v": "1",
                    "vt": "str"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 560,
            "y": 760,
            "wires": [
                [],
                [
                    "cac765606601d65c"
                ]
            ],
            "outputLabels": [
                "Druck aktiv",
                "Druck nicht aktiv"
            ]
        },
        {
            "id": "c5c06330d2e576f6",
            "type": "ioBroker get",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "heatbreak_fan_speed",
            "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
            "attrname": "payload",
            "payloadType": "value",
            "errOnInvalidState": "nothing",
            "x": 360,
            "y": 760,
            "wires": [
                [
                    "f97a028e21d51bfb"
                ]
            ]
        },
        {
            "id": "cac765606601d65c",
            "type": "change",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "setze msg.payload auf false",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "false",
                    "tot": "bool"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 780,
            "y": 760,
            "wires": [
                [
                    "ae46dbed7e5925ae",
                    "445ce2a0ad0a534a",
                    "0c5048b46f072d52"
                ]
            ]
        },
        {
            "id": "ae46dbed7e5925ae",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Datenpunkt Steckdose Drucker An/AUS",
            "topic": "alias.0.Buero.3D-Drucker.SET",
            "ack": "false",
            "autoCreate": "false",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1120,
            "y": 720,
            "wires": []
        },
        {
            "id": "445ce2a0ad0a534a",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
            "topic": "0_userdata.0.X1C.automatisch_abschalten",
            "ack": "false",
            "autoCreate": "true",
            "stateName": "",
            "role": "",
            "payloadType": "boolean",
            "readonly": "false",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1180,
            "y": 800,
            "wires": []
        },
        {
            "id": "79d8f512af50dd04",
            "type": "comment",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "automatisch Abschalten nach Druck",
            "info": "",
            "x": 260,
            "y": 680,
            "wires": []
        },
        {
            "id": "0c5048b46f072d52",
            "type": "ioBroker out",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "Schalter in Dashboard (Steckdose Drucker)",
            "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
            "ack": "false",
            "autoCreate": "true",
            "stateName": "",
            "role": "",
            "payloadType": "boolean",
            "readonly": "false",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1130,
            "y": 760,
            "wires": []
        },
        {
            "id": "5c0e9eddf913e64d",
            "type": "inject",
            "z": "9582121ff81174a6",
            "g": "c3f9f96853c3f09c",
            "name": "nur zum Testen",
            "props": [
                {
                    "p": "payload"
                }
            ],
            "repeat": "",
            "crontab": "",
            "once": false,
            "onceDelay": 0.1,
            "topic": "",
            "payload": "true",
            "payloadType": "bool",
            "x": 1180,
            "y": 420,
            "wires": [
                [
                    "4ce8104a4e434a82"
                ]
            ]
        },
        {
            "id": "d2a5ed4e2b8c8674",
            "type": "ping",
            "z": "9582121ff81174a6",
            "g": "4380d7035264bead",
            "protocol": "IPv4",
            "mode": "timed",
            "name": "Ping IP des Druckers",
            "host": "192.168.0.111",
            "timer": "60",
            "inputs": 0,
            "x": 1200,
            "y": 120,
            "wires": [
                [
                    "b5c862f5d50c56cb"
                ]
            ]
        },
        {
            "id": "84f61d394ba2ab34",
            "type": "mqtt-broker",
            "name": "Bambu X1C MQTT Bambu_X1C",
            "broker": "IP_Deines_Druckers",
            "port": "8883",
            "tls": "",
            "clientid": "",
            "autoConnect": true,
            "usetls": true,
            "protocolVersion": "4",
            "keepalive": "60",
            "cleansession": true,
            "birthTopic": "",
            "birthQos": "0",
            "birthPayload": "",
            "birthMsg": {},
            "closeTopic": "",
            "closeQos": "0",
            "closePayload": "",
            "closeMsg": {},
            "willTopic": "",
            "willQos": "0",
            "willPayload": "",
            "willMsg": {},
            "userProps": "",
            "sessionExpiry": ""
        }
    ]
    

    a6b8157c-4eab-4adb-8239-61b1a747c063-image.png

    Nun auf den Flow 15 klicken (der Name kann per Doppelklick jederzeit geändert werden:

    954dd30c-67d0-49e0-928d-d030f4446bb6-image.png

    Hier seht ihr nun den Flow in seiner vollen Pracht :-)
    Allerdings haben wir noch einen Fehler, da die Ping Node fehlt:

    3beacdea-ecbc-4327-ac98-8d5796ac8582-image.png

    Um das zu beheben klickt ihr wieder oben rechts auf das Burgermenü und auf Palette verwalten:

    16ebcde0-b624-4a38-b3a2-3c722efc9119-image.png

    Reiter Installation anklicken, Suchbegriff Ping eingeben und beim ersten Eintrag auf Installieren klicken:

    ed75d327-daab-457b-88f9-0758f27bf97f-image.png

    In der Meldung ebenfalls auf Installieren klicken:

    a15378d3-8eaa-49ce-a16b-1effa6761166-image.png

    Das Ganze übernehmen (oben rechts auf Deploy klicken):

    234c3c71-0040-454b-ab8a-17a58d63da07-image.png

    Einstellungen

    Doppelklick auf die MQTT Node um die Einstellungen zu gelangen:

    6c7be134-2bc1-4f41-aa61-ea07cb1a16a0-image.png

    Die Seriennummer deines Druckers eintragen und auf den Reiter Sicherheit klicken:

    f3bc9d1e-8a58-422a-a41e-b1a42c81b9ee-image.png

    Bitte auch https://forum.iobroker.net/post/943312 beachten.


    PS:

    Das soll kein Node-Red Zwang werden.
    Das Ganze klappt garantiert auch mit Blockly und/ oder anderen Scripten.
    Kann ich aber nicht und möchte ich auch nicht.
    Wer Bock auf Node-Red hat, kann diese Anleitung nutzen, wer keinen Bock darauf hat, lässt es halt sein 😉

    PPS:
    Der Fairness halber geht auch ein großer Dank an die Jungs (und Mädels?) aus dem Home Assistant Forum, da dort die initialen Funktionen zum Interprätieren der MQTT Daten des Bambus aufgedröselt wurden.


    https://community.home-assistant.io/t/bambu-lab-x1-x1c-mqtt/489510

    mickymM D 4 Antworten Letzte Antwort
    3
    • D djalexz

      Hallo zusammen,

      da hier immer nur so ein paar Schnipsel von Node-Red drinstehen und es wohl noch einige gibt für die Node-Red ein Buch mit sieben Siegeln ist, hier eine kleine Anleitung zur Installation und Einbindung meines Flows.

      f7825076-70f0-494e-bd66-671c9c80ea88-image.png

      Damit werden alle relevanten Werte des Druckers umgewandelt, sodass diese genutzt werden können.

      Hier kommt der Subflow von @mickym zum Einsatz (nochmals vielen Dank dafür an dieser Stelle).

      Da ich für diese Anleitung eine extra Node-Red Instanz anlegen musste, steht dort natürlich node-red.1.
      Stört euch nicht daran. Bei euch steht node-red.0

      Ich hoffe es hilft dem Ein oder Anderen und ihr könnt damit jetzt euren Bambu "Smart" machen.

      HINWEIS:
      Da ich einen X1C habe, kann ich nur für diesen sprechen.
      Ich kann keinerlei Garantie übernehmen, dass das bei einem P1P ebenfalls läuft.
      Theoretisch sollte es das. Ich kann es halt nur nicht testen.
      Ich gehe hier von der neuesten Firmware des Druckers aus (01.04.00.00 (20230207))
      Mit MQTT TLS Verschlüsselung usw.

      ansonsten muss die MQTT Node anders eingestellt werden (ohne Verschlüsselung).

      Bei mir kommt für das Dashboard Jarvis von @Zefau zum Einsatz.
      Die Datenpunkte dafür sind natürlich Teil dieses Flows.
      Wer das nicht braucht oder etwas Anderes nutzt, muss die Nodes (via Doppelklick) entsprechend anpassen.

      Und Übernahme (Deploy) nicht vergessen 😉

      Jetzt gehts los:

      Installation von Node-Red:


      Node-Red Instanz in ioBroker hinzufügen:

      bcaa382b-3cee-4478-8849-efa340eb6219-image.png

      e6270797-b9d9-4a5b-a402-915fbf47f5b4-image.png

      Haken bei Palletenmanager benutzen und bei Erstellung von Fremd-Objekten zulassen setzen und Speichern:

      28531052-444e-412b-87f4-581dc03ecdf3-image.png

      Darauf achten, dass die Instanz gestartet ist (grünes Symbol) und auf das Fenster Icon klicken:

      3a6a9bc7-6dac-444a-9990-6de0e2df31da-image.png


      Node-Red (die Oberfläche)

      Die Einführung könnt ihr euch gerne anschauen (m.M.n. sehr Sinnvoll) oder das Fenster schließen:

      9254918c-0bd6-4fe8-9922-3a44e67db493-image.png

      Importieren meines Flows:

      eeaf90fd-838d-4926-ad42-323facbd3044-image.png

      Hier der Flow zum Kopieren und Importieren

      [
          {
              "id": "6e802f1553b18149",
              "type": "subflow",
              "name": "JSON or Obj to IOBroker",
              "info": "# Creates an IOBroker tree\n\nThis node creates an IOBroker tree out of an Java-Object or JSON String.\n\nThe object tree will be created under 0_userdata.0\nIn addition to the JSON-String or Java Object as `msg.payload` it is necessary to specify a `msg.top` properity in addition to the msg-Object.\n\nThe object tree will be created under 0_userdata.0\n\nExisting `msg.topic` entries will be deleted.\nAn iobroker-out node has to be appended to this subflow node. It is not part of the subflow itself. No topic should be specified in the iobroker out node.\n\nIs `msg.top` property isn't defined, the `top` property of the subflow-node is used. \n\nIn the properties of the subflow node a new property `keepTopic` has been added. Default is _false_ to keep the current behaviour. If set to _true_ then the originial topic will be placed between the `top` property of the subflow node and the property of the analyzed JSON object.\n\n**Attention:**\nIf msg.top and top is empty, all msg.topics (msg.topic) will be directly prefixed with 0_userdata.0. . \n\n**Update 13.09.2022:**\nSpaces in topics of objects are no longer replaced with underscores in objects. No differences between all data types.\n\n# Erstellt einen Objektbaum im ioBroker\n\nDiese Node erstellt einen Objektbaum im ioBroker aus einem JAVA Objekt bzw. einem JSON String. \n\nDer Baum wird in jedem Fall unter 0_userdata.0 erstellt und zwar unter dem Topic der in` msg.top` mitgegeben wurde. In der `msg.payload` befindet sich dann der JSON String oder das entsprechende Objekt.\n\nExistierende `msg.topic `Einträge werden gelöscht.\nEin entsprechende iobroker-out Node muss an den Flow angehängt werden. Sie ist nicht Bestandteil des Subflows. In dieser iobroker-out Node darf kein Topic angegeben werden. \n\nFalls msg.top nicht definiert wurde, wird der `top`-Wert der Subflow-Node verwendet.\n\nIn den Eigenschaften der Subflow-Node wurde ein neuer Parameter `keepTopic` hinzugefügt. Standardwert ist _false_, um das bisherige Verhalten beizubehalten. Setzt man die Eigenschaft auf _true_, dann wird das originale Topic zwischen der `top` Eigenschaft der Subflow-Node und Eigenschaft des analysierten JSON Objektes eingefügt.\n\n**Achtung:**\nWenn top und msg.top leer ist, werden alle msg.topics (msg.topic) direkt unter dem Präfix 0_userdata.0., angelegt bzw. ausgegeben. \n\n**Update 13.09.2022:**\nLeerzeichen werden in Topics von Objekten nicht mehr durch Unterstriche ersetzt. Es gibt keine Unterschiede mehr zwischen den Datentypen.",
              "category": "",
              "in": [
                  {
                      "x": 60,
                      "y": 160,
                      "wires": [
                          {
                              "id": "554b8c663bcb46c2"
                          }
                      ]
                  }
              ],
              "out": [
                  {
                      "x": 2620,
                      "y": 280,
                      "wires": [
                          {
                              "id": "0962842ebd23e0d7",
                              "port": 0
                          }
                      ]
                  }
              ],
              "env": [
                  {
                      "name": "top",
                      "type": "str",
                      "value": "objRoot"
                  },
                  {
                      "name": "keepTopic",
                      "type": "bool",
                      "value": "false"
                  }
              ],
              "meta": {},
              "color": "#E2D96E",
              "icon": "node-red/batch.svg"
          },
          {
              "id": "3e11e8338f694832",
              "type": "split",
              "z": "6e802f1553b18149",
              "name": "split object",
              "splt": "\\n",
              "spltType": "str",
              "arraySplt": 1,
              "arraySpltType": "len",
              "stream": false,
              "addname": "key",
              "x": 1370,
              "y": 160,
              "wires": [
                  [
                      "0562a4249c8b856b"
                  ]
              ]
          },
          {
              "id": "0562a4249c8b856b",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "add key to topic",
              "rules": [
                  {
                      "t": "set",
                      "p": "stateName",
                      "pt": "msg",
                      "to": "key",
                      "tot": "msg"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "topic  & '.' & key",
                      "tot": "jsonata"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1560,
              "y": 160,
              "wires": [
                  [
                      "ddc90985bef0fafa"
                  ]
              ]
          },
          {
              "id": "ddc90985bef0fafa",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "is type?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "istype",
                      "v": "array",
                      "vt": "array"
                  },
                  {
                      "t": "istype",
                      "v": "object",
                      "vt": "object"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 3,
              "x": 1740,
              "y": 160,
              "wires": [
                  [
                      "bfce19b206660fbe"
                  ],
                  [
                      "3e11e8338f694832"
                  ],
                  [
                      "1a8c03d866b85b12"
                  ]
              ]
          },
          {
              "id": "bfce19b206660fbe",
              "type": "split",
              "z": "6e802f1553b18149",
              "name": "split array",
              "splt": "\\n",
              "spltType": "str",
              "arraySplt": 1,
              "arraySpltType": "len",
              "stream": false,
              "addname": "",
              "x": 780,
              "y": 280,
              "wires": [
                  [
                      "e89927810c6d75ec"
                  ]
              ]
          },
          {
              "id": "e89927810c6d75ec",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "add index to topic",
              "rules": [
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "topic  & '.' & parts.index",
                      "tot": "jsonata"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 970,
              "y": 280,
              "wires": [
                  [
                      "a4d1a5d04564dc77"
                  ]
              ]
          },
          {
              "id": "f5d52c6a57d08904",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "finalize msg.topic",
              "rules": [
                  {
                      "t": "set",
                      "p": "top",
                      "pt": "msg",
                      "to": "'0_userdata.0.' & top",
                      "tot": "jsonata"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "top & '.' & topic",
                      "tot": "jsonata"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 2170,
              "y": 240,
              "wires": [
                  [
                      "0962842ebd23e0d7"
                  ]
              ]
          },
          {
              "id": "1a8c03d866b85b12",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "is msg.top != null",
              "property": "top",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "nnull"
                  },
                  {
                      "t": "null"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 1950,
              "y": 280,
              "wires": [
                  [
                      "f5d52c6a57d08904"
                  ],
                  [
                      "74c895ce724750de"
                  ]
              ]
          },
          {
              "id": "e023fe88445ce43e",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "",
              "rules": [
                  {
                      "t": "delete",
                      "p": "topic",
                      "pt": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 350,
              "y": 200,
              "wires": [
                  [
                      "3649300b4c233b10"
                  ]
              ]
          },
          {
              "id": "3649300b4c233b10",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "is type?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "istype",
                      "v": "json",
                      "vt": "json"
                  },
                  {
                      "t": "istype",
                      "v": "array",
                      "vt": "array"
                  },
                  {
                      "t": "istype",
                      "v": "object",
                      "vt": "object"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 4,
              "x": 600,
              "y": 160,
              "wires": [
                  [
                      "fc7913a8524badb7"
                  ],
                  [
                      "bfce19b206660fbe"
                  ],
                  [
                      "3e11e8338f694832"
                  ],
                  [
                      "9ac3cc3681e8b6c6"
                  ]
              ]
          },
          {
              "id": "1b8480cd2df7ba3f",
              "type": "comment",
              "z": "6e802f1553b18149",
              "name": "Array",
              "info": "",
              "x": 600,
              "y": 280,
              "wires": []
          },
          {
              "id": "b3541807672be040",
              "type": "comment",
              "z": "6e802f1553b18149",
              "name": "object",
              "info": "",
              "x": 1340,
              "y": 100,
              "wires": []
          },
          {
              "id": "a4d1a5d04564dc77",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "is type?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "istype",
                      "v": "object",
                      "vt": "object"
                  },
                  {
                      "t": "istype",
                      "v": "array",
                      "vt": "array"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 3,
              "x": 1160,
              "y": 280,
              "wires": [
                  [
                      "3e11e8338f694832"
                  ],
                  [
                      "bfce19b206660fbe"
                  ],
                  [
                      "a096a93bb82b7a93"
                  ]
              ]
          },
          {
              "id": "74c895ce724750de",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "finalize msg.topic",
              "rules": [
                  {
                      "t": "set",
                      "p": "top",
                      "pt": "msg",
                      "to": "top",
                      "tot": "env"
                  },
                  {
                      "t": "set",
                      "p": "top",
                      "pt": "msg",
                      "to": "'0_userdata.0.' & top",
                      "tot": "jsonata"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "top & '.' & topic",
                      "tot": "jsonata"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 2170,
              "y": 320,
              "wires": [
                  [
                      "0962842ebd23e0d7"
                  ]
              ]
          },
          {
              "id": "554b8c663bcb46c2",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "",
              "property": "keepTopic",
              "propertyType": "env",
              "rules": [
                  {
                      "t": "true"
                  },
                  {
                      "t": "false"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 170,
              "y": 160,
              "wires": [
                  [
                      "e30ba9f0483285e4"
                  ],
                  [
                      "e023fe88445ce43e"
                  ]
              ]
          },
          {
              "id": "e30ba9f0483285e4",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "",
              "rules": [
                  {
                      "t": "change",
                      "p": "topic",
                      "pt": "msg",
                      "from": "/",
                      "fromt": "str",
                      "to": ".",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 350,
              "y": 120,
              "wires": [
                  [
                      "3649300b4c233b10"
                  ]
              ]
          },
          {
              "id": "0962842ebd23e0d7",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "translate invalid chars in topic",
              "rules": [
                  {
                      "t": "change",
                      "p": "topic",
                      "pt": "msg",
                      "from": "..",
                      "fromt": "str",
                      "to": ".",
                      "tot": "str"
                  },
                  {
                      "t": "change",
                      "p": "topic",
                      "pt": "msg",
                      "from": "€",
                      "fromt": "str",
                      "to": "EUR",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 2430,
              "y": 280,
              "wires": [
                  []
              ]
          },
          {
              "id": "9ac3cc3681e8b6c6",
              "type": "change",
              "z": "6e802f1553b18149",
              "name": "set topic, if empty",
              "rules": [
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "topic ? topic : $type(payload)\t",
                      "tot": "jsonata"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 950,
              "y": 200,
              "wires": [
                  [
                      "a096a93bb82b7a93"
                  ]
              ]
          },
          {
              "id": "fc7913a8524badb7",
              "type": "json",
              "z": "6e802f1553b18149",
              "name": "",
              "property": "payload",
              "action": "obj",
              "pretty": false,
              "x": 750,
              "y": 100,
              "wires": [
                  [
                      "d9e7bdd4c48a8aa1"
                  ]
              ]
          },
          {
              "id": "d9e7bdd4c48a8aa1",
              "type": "switch",
              "z": "6e802f1553b18149",
              "name": "is type?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "istype",
                      "v": "array",
                      "vt": "array"
                  },
                  {
                      "t": "istype",
                      "v": "object",
                      "vt": "object"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 3,
              "x": 900,
              "y": 100,
              "wires": [
                  [
                      "1520be42bcc2145e"
                  ],
                  [
                      "1520be42bcc2145e"
                  ],
                  [
                      "9ac3cc3681e8b6c6"
                  ]
              ]
          },
          {
              "id": "a096a93bb82b7a93",
              "type": "junction",
              "z": "6e802f1553b18149",
              "x": 1380,
              "y": 280,
              "wires": [
                  [
                      "1a8c03d866b85b12"
                  ]
              ]
          },
          {
              "id": "1520be42bcc2145e",
              "type": "junction",
              "z": "6e802f1553b18149",
              "x": 480,
              "y": 20,
              "wires": [
                  [
                      "3649300b4c233b10"
                  ]
              ]
          },
          {
              "id": "9582121ff81174a6",
              "type": "tab",
              "label": "Flow 15",
              "disabled": false,
              "info": "",
              "env": []
          },
          {
              "id": "c3f9f96853c3f09c",
              "type": "group",
              "z": "9582121ff81174a6",
              "name": "Steuerung Steckdose",
              "style": {
                  "label": true,
                  "fill": "#7fb7df",
                  "fill-opacity": "0.22",
                  "color": "#000000"
              },
              "nodes": [
                  "cd5f62e24a3e846f",
                  "964df5b70be104e6",
                  "ebace1619b2a4e15",
                  "3143caf661f13237",
                  "aeb883c176549af3",
                  "f683e53accbca89f",
                  "cff0b21c459cab43",
                  "64fa2ca669c5a78d",
                  "72cb87b2b06c4f05",
                  "4ce8104a4e434a82",
                  "e0079711246b60b0",
                  "1d943caf9a8bc0f6",
                  "ff01d8a59e17dc93",
                  "c8abbf4d53a09ffe",
                  "c5c06330d2e576f6",
                  "f97a028e21d51bfb",
                  "cac765606601d65c",
                  "ae46dbed7e5925ae",
                  "445ce2a0ad0a534a",
                  "79d8f512af50dd04",
                  "0c5048b46f072d52",
                  "5c0e9eddf913e64d"
              ],
              "x": 74,
              "y": 379,
              "w": 1352,
              "h": 482
          },
          {
              "id": "4380d7035264bead",
              "type": "group",
              "z": "9582121ff81174a6",
              "name": "Online/Offline Anzeige",
              "style": {
                  "label": true,
                  "color": "#000000",
                  "fill": "#addb7b",
                  "fill-opacity": "0.38"
              },
              "nodes": [
                  "d2a5ed4e2b8c8674",
                  "b5c862f5d50c56cb",
                  "2e71b198fe06ccdb",
                  "144c29803a38e2a4",
                  "3a131237a7bdec9d"
              ],
              "x": 1074,
              "y": 79,
              "w": 412,
              "h": 242
          },
          {
              "id": "19ede36faf38f69b",
              "type": "group",
              "z": "9582121ff81174a6",
              "name": "X1C Datenpunkt Umwandlung",
              "style": {
                  "fill": "#ffff00",
                  "label": true,
                  "fill-opacity": "0.36",
                  "color": "#000000"
              },
              "nodes": [
                  "e2852c3101736fc9",
                  "477ecaa1b9913815",
                  "9fadcc36a22ec38b",
                  "44d9370861f0a79a",
                  "33a162f31f850a9e",
                  "f6c8fbdf638c04e8",
                  "ce27f3362985a4d3",
                  "89074ea56277b288",
                  "01c35b9bb3921713",
                  "3eb26b7322587c6b",
                  "21081e6a23dc83a1"
              ],
              "x": 14,
              "y": 39,
              "w": 1032,
              "h": 322
          },
          {
              "id": "e2852c3101736fc9",
              "type": "subflow:6e802f1553b18149",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "",
              "env": [
                  {
                      "name": "top",
                      "value": "X1C",
                      "type": "str"
                  }
              ],
              "x": 170,
              "y": 160,
              "wires": [
                  [
                      "ce27f3362985a4d3"
                  ]
              ]
          },
          {
              "id": "477ecaa1b9913815",
              "type": "mqtt in",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "Bambu X1C Bambu_X1C",
              "topic": "device/DieSeriennummerDeinesDruckers/report",
              "qos": "2",
              "datatype": "auto-detect",
              "broker": "84f61d394ba2ab34",
              "nl": false,
              "rap": true,
              "rh": 0,
              "inputs": 0,
              "x": 150,
              "y": 100,
              "wires": [
                  [
                      "e2852c3101736fc9"
                  ]
              ]
          },
          {
              "id": "9fadcc36a22ec38b",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "schreibe Datenpunkte in ioBroker",
              "topic": "",
              "ack": "true",
              "autoCreate": "true",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 880,
              "y": 200,
              "wires": []
          },
          {
              "id": "44d9370861f0a79a",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "heatbreak_fan_speed",
              "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 560,
              "y": 120,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "33a162f31f850a9e",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "Stage Parser",
              "func": "\nfunction parseAction(actionId) {\n    if(actionId === undefined) {\n        return \"\";\n    }\n    switch (actionId) {\n        case -2:\n            return \"Offline\";\n        case -1:\n            return \"Idle\";\n        case 0:\n            return \"Printing\";  // idle or printing\n        case 1:\n            return \"Auto bed leveling\";\n        case 2:\n            return \"Heatbed preheating\";\n        case 3:\n            return \"Sweeping XY mech mode\";\n        case 4:\n            return \"Changing filament\";\n        case 5:\n            return \"M400 pause\";\n        case 6:\n            return \"Paused due to filament runout\";\n        case 7:\n            return \"Heating hotend\";\n        case 8:\n            return \"Calibrating extrusion\";\n        case 9:\n            return \"Scanning bed surface\";\n        case 10:\n            return \"Inspecting first layer\";\n        case 11:\n            return \"Identifying build plate type\";\n        case 12:\n            return \"Calibrating Micro Lidar\";\n        case 13:\n            return \"Homing toolhead\";\n        case 14:\n            return \"Cleaning nozzle tip\";\n        case 15:\n            return \"Checking extruder temperature\";\n        case 16:\n            return \"Printing was paused by the user\";\n        case 17:\n            return \"Pause of front cover falling\";\n        case 18:\n            return \"Calibrating the micro lidar\";\n        case 19:\n            return \"Calibrating extrusion flow\";\n        case 20:\n            return \"Paused due to nozzle temperature malfunction\";\n        case 21:\n            return \"Paused due to heat bed temperature malfunction\";\n        default:\n            return actionId.toString()\n    }\n}\n\n\n\n    \nvar current_action = parseAction(msg.payload);\n\n\n\n    msg.payload = current_action;\n\n\n\n    return [msg];\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 530,
              "y": 160,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "f6c8fbdf638c04e8",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "Translate X1C Speed Profile",
              "func": "function parseAction(SpeedProfile) {\n    if (SpeedProfile === undefined) {\n        return \"\";\n    }\n    switch (SpeedProfile) {\n        case 1:\n            return \"Silent\";\n           \n        case 2:\n            return \"Standard\";\n            \n        case 3:\n            return \"Sport\";\n           \n        case 4:\n            return \"Ludicrous\";\n           \n        default:\n            return \"Undefined\";\n          \n\n   \n    }\n\n}\n\n\n\n    var SpeedProfile = parseAction(msg.payload);\n    msg.payload = SpeedProfile;\n\n\n    return [msg];\n\n\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 580,
              "y": 200,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "ce27f3362985a4d3",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "Verteiler",
              "property": "topic",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.cooling_fan_speed",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.stg_cur",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.spd_lvl",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.big_fan1_speed",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.big_fan2_speed",
                      "vt": "str"
                  },
                  {
                      "t": "eq",
                      "v": "0_userdata.0.X1C.print.mc_remaining_time",
                      "vt": "str"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 8,
              "x": 360,
              "y": 140,
              "wires": [
                  [
                      "89074ea56277b288"
                  ],
                  [
                      "44d9370861f0a79a"
                  ],
                  [
                      "33a162f31f850a9e"
                  ],
                  [
                      "f6c8fbdf638c04e8"
                  ],
                  [
                      "3eb26b7322587c6b"
                  ],
                  [
                      "01c35b9bb3921713"
                  ],
                  [
                      "21081e6a23dc83a1"
                  ],
                  [
                      "9fadcc36a22ec38b"
                  ]
              ],
              "outputLabels": [
                  "Cooling Fan Speed",
                  "Heatbreak Fan Speed",
                  "Stage Parser",
                  "Speed Profile",
                  "AUX Fan Speed",
                  "Chamber Fan Speed",
                  "remaining_time",
                  ""
              ]
          },
          {
              "id": "89074ea56277b288",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "cooling_fan_speed",
              "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 550,
              "y": 80,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "01c35b9bb3921713",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "big_fan2_speed (Chamber)",
              "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 580,
              "y": 280,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "3eb26b7322587c6b",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "big_fan1_speed (AUX)",
              "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 560,
              "y": 240,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "21081e6a23dc83a1",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "19ede36faf38f69b",
              "name": "remaining_time",
              "func": "//var timeleft = 3727; //1h:2m:7s\n//Umrechnung in Stunden, Minuten, Sekunden\n\nvar hour = Math.floor((msg.payload % 3600) / 60);\nvar minute = Math.floor(msg.payload % 60);\n\n//Den String von Stunden, Minuten und Sekunden auf 2 Stellen ändern\nif (hour < 10) {\nhour = \"0\" + hour;\n}\n\nif (minute < 10) {\nminute = \"0\" + minute;\n}\n\n\nmsg.payload = hour + \":\" + minute;\n\n\n\n\nreturn msg;\n\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 540,
              "y": 320,
              "wires": [
                  [
                      "9fadcc36a22ec38b"
                  ]
              ]
          },
          {
              "id": "cd5f62e24a3e846f",
              "type": "function",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "erstelle Jarvis Benachrichtigung",
              "func": "var jarvisNotify = {};\n//Beispiele\njarvisNotify.title = \"Abschalten nicht möglich\";\njarvisNotify.caption = \"\"; // wird unter dem Titel angezeigt\njarvisNotify.message = '<b>Ich drucke gerade, die Steckdose abzuschalten wäre eine blöde Idee!</b>';\n// Alternative Möglichkeiten\n//jarvisNotify.message= '<img src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></img>'; //Klappt, wird komplett angezeigt\n//jarvisNotify.message= '<iFrame src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></iFrame>'; //Klappt nicht, nur Teil wird angezeigt\n//jarvisNotify.message= getState('0_userdata.0.jarvis.pollenflug.Html').val;\n//jarvisNotify.message= getState('0_userdata.0.Html.HTML').val;\n//jarvisNotify.state = \"unread\";          //Damit bleibt die Benachrichtigung auch nach POPUP ungelesen und wird oben angezeigt mit der Zahl\njarvisNotify.criticality = \"error\";      // error,warning,info,success\njarvisNotify.display = \"popup\";          //drawer,snackbar,popup, none für focusTab\njarvisNotify.timeout = 10000;  //10000ms -> 10 Sekunden\n//jarvisNotify.timeout = 15000;  //5000ms -> 5 Sekunden\n//jarvisNotify.spinner= false; // drehender dreiViertel Kreis\njarvisNotify.progress = true;\njarvisNotify.position = \"top-left\";\njarvisNotify.icon = \"ic:outline-error\"; //mdi Iconify battery-alert-variant-outline\njarvisNotify.iconColor = \"white\";\njarvisNotify.color = \"red\";\njarvisNotify.textColor = \"white\";\nmsg.payload = JSON.stringify(jarvisNotify);\nreturn msg;",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 710,
              "y": 540,
              "wires": [
                  [
                      "964df5b70be104e6"
                  ]
              ]
          },
          {
              "id": "964df5b70be104e6",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Datenpunkt Jarvis Benachrichtigung",
              "topic": "jarvis.0.addNotification",
              "ack": "false",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1030,
              "y": 540,
              "wires": []
          },
          {
              "id": "ebace1619b2a4e15",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "> oder < als 1",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "gt",
                      "v": "1",
                      "vt": "str"
                  },
                  {
                      "t": "lt",
                      "v": "1",
                      "vt": "str"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 440,
              "y": 540,
              "wires": [
                  [
                      "cd5f62e24a3e846f",
                      "72cb87b2b06c4f05"
                  ],
                  [
                      "aeb883c176549af3"
                  ]
              ],
              "outputLabels": [
                  "Druck aktiv",
                  "Druck nicht aktiv"
              ]
          },
          {
              "id": "3143caf661f13237",
              "type": "ioBroker get",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "heatbreak_fan_speed",
              "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
              "attrname": "payload",
              "payloadType": "value",
              "errOnInvalidState": "nothing",
              "x": 220,
              "y": 540,
              "wires": [
                  [
                      "ebace1619b2a4e15"
                  ]
              ]
          },
          {
              "id": "aeb883c176549af3",
              "type": "change",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "setze msg.payload auf false",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "false",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 700,
              "y": 580,
              "wires": [
                  [
                      "4ce8104a4e434a82"
                  ]
              ]
          },
          {
              "id": "f683e53accbca89f",
              "type": "ioBroker in",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Schalter in Dashboard (Steckdose Drucker)",
              "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
              "payloadType": "value",
              "onlyack": "",
              "func": "all",
              "gap": "",
              "fireOnStart": "false",
              "outFormat": "MQTT",
              "x": 280,
              "y": 460,
              "wires": [
                  [
                      "cff0b21c459cab43"
                  ]
              ]
          },
          {
              "id": "cff0b21c459cab43",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "TRUE oder FALSE?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "true"
                  },
                  {
                      "t": "false"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 220,
              "y": 500,
              "wires": [
                  [
                      "4ce8104a4e434a82"
                  ],
                  [
                      "3143caf661f13237"
                  ]
              ]
          },
          {
              "id": "64fa2ca669c5a78d",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Schalter in Dashboard (Steckdose Drucker)",
              "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
              "ack": "false",
              "autoCreate": "true",
              "stateName": "",
              "role": "",
              "payloadType": "boolean",
              "readonly": "false",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1090,
              "y": 480,
              "wires": []
          },
          {
              "id": "72cb87b2b06c4f05",
              "type": "change",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "setze msg.payload auf true",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "true",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 700,
              "y": 460,
              "wires": [
                  [
                      "64fa2ca669c5a78d"
                  ]
              ]
          },
          {
              "id": "b5c862f5d50c56cb",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "4380d7035264bead",
              "name": "FALSE oder nicht?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "false"
                  },
                  {
                      "t": "else"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 1230,
              "y": 160,
              "wires": [
                  [
                      "144c29803a38e2a4"
                  ],
                  [
                      "2e71b198fe06ccdb"
                  ]
              ]
          },
          {
              "id": "2e71b198fe06ccdb",
              "type": "change",
              "z": "9582121ff81174a6",
              "g": "4380d7035264bead",
              "name": "setze msg.payload auf online",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "online",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1260,
              "y": 240,
              "wires": [
                  [
                      "3a131237a7bdec9d"
                  ]
              ]
          },
          {
              "id": "144c29803a38e2a4",
              "type": "change",
              "z": "9582121ff81174a6",
              "g": "4380d7035264bead",
              "name": "setze msg.payload auf offline",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "offline",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1260,
              "y": 200,
              "wires": [
                  [
                      "3a131237a7bdec9d"
                  ]
              ]
          },
          {
              "id": "4ce8104a4e434a82",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Datenpunkt Steckdose Drucker An/AUS",
              "topic": "alias.0.Buero.3D-Drucker.SET",
              "ack": "false",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 740,
              "y": 500,
              "wires": []
          },
          {
              "id": "3a131237a7bdec9d",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "4380d7035264bead",
              "name": "Datenpunkt Verbindungsstatus des Druckers",
              "topic": "0_userdata.0.X1C.Verbindungsstatus",
              "ack": "false",
              "autoCreate": "true",
              "stateName": "",
              "role": "",
              "payloadType": "string",
              "readonly": "false",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1290,
              "y": 280,
              "wires": []
          },
          {
              "id": "e0079711246b60b0",
              "type": "comment",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Abschalten verhindern, wenn Heatbreak_Fan_Speed über 1 (Düse ist heiß)",
              "info": "",
              "x": 380,
              "y": 420,
              "wires": []
          },
          {
              "id": "1d943caf9a8bc0f6",
              "type": "ioBroker get",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
              "topic": "0_userdata.0.X1C.automatisch_abschalten",
              "attrname": "payload",
              "payloadType": "value",
              "errOnInvalidState": "nothing",
              "x": 340,
              "y": 720,
              "wires": [
                  [
                      "c8abbf4d53a09ffe"
                  ]
              ]
          },
          {
              "id": "ff01d8a59e17dc93",
              "type": "inject",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "alle 10 Min. TRUE senden",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "600",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "true",
              "payloadType": "bool",
              "x": 240,
              "y": 820,
              "wires": [
                  [
                      "1d943caf9a8bc0f6"
                  ]
              ]
          },
          {
              "id": "c8abbf4d53a09ffe",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "TRUE?",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "true"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 1,
              "x": 180,
              "y": 760,
              "wires": [
                  [
                      "c5c06330d2e576f6"
                  ]
              ]
          },
          {
              "id": "f97a028e21d51bfb",
              "type": "switch",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "> oder < als 1",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "gt",
                      "v": "1",
                      "vt": "str"
                  },
                  {
                      "t": "lt",
                      "v": "1",
                      "vt": "str"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 560,
              "y": 760,
              "wires": [
                  [],
                  [
                      "cac765606601d65c"
                  ]
              ],
              "outputLabels": [
                  "Druck aktiv",
                  "Druck nicht aktiv"
              ]
          },
          {
              "id": "c5c06330d2e576f6",
              "type": "ioBroker get",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "heatbreak_fan_speed",
              "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
              "attrname": "payload",
              "payloadType": "value",
              "errOnInvalidState": "nothing",
              "x": 360,
              "y": 760,
              "wires": [
                  [
                      "f97a028e21d51bfb"
                  ]
              ]
          },
          {
              "id": "cac765606601d65c",
              "type": "change",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "setze msg.payload auf false",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "false",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 780,
              "y": 760,
              "wires": [
                  [
                      "ae46dbed7e5925ae",
                      "445ce2a0ad0a534a",
                      "0c5048b46f072d52"
                  ]
              ]
          },
          {
              "id": "ae46dbed7e5925ae",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Datenpunkt Steckdose Drucker An/AUS",
              "topic": "alias.0.Buero.3D-Drucker.SET",
              "ack": "false",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1120,
              "y": 720,
              "wires": []
          },
          {
              "id": "445ce2a0ad0a534a",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
              "topic": "0_userdata.0.X1C.automatisch_abschalten",
              "ack": "false",
              "autoCreate": "true",
              "stateName": "",
              "role": "",
              "payloadType": "boolean",
              "readonly": "false",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1180,
              "y": 800,
              "wires": []
          },
          {
              "id": "79d8f512af50dd04",
              "type": "comment",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "automatisch Abschalten nach Druck",
              "info": "",
              "x": 260,
              "y": 680,
              "wires": []
          },
          {
              "id": "0c5048b46f072d52",
              "type": "ioBroker out",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "Schalter in Dashboard (Steckdose Drucker)",
              "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
              "ack": "false",
              "autoCreate": "true",
              "stateName": "",
              "role": "",
              "payloadType": "boolean",
              "readonly": "false",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1130,
              "y": 760,
              "wires": []
          },
          {
              "id": "5c0e9eddf913e64d",
              "type": "inject",
              "z": "9582121ff81174a6",
              "g": "c3f9f96853c3f09c",
              "name": "nur zum Testen",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "true",
              "payloadType": "bool",
              "x": 1180,
              "y": 420,
              "wires": [
                  [
                      "4ce8104a4e434a82"
                  ]
              ]
          },
          {
              "id": "d2a5ed4e2b8c8674",
              "type": "ping",
              "z": "9582121ff81174a6",
              "g": "4380d7035264bead",
              "protocol": "IPv4",
              "mode": "timed",
              "name": "Ping IP des Druckers",
              "host": "192.168.0.111",
              "timer": "60",
              "inputs": 0,
              "x": 1200,
              "y": 120,
              "wires": [
                  [
                      "b5c862f5d50c56cb"
                  ]
              ]
          },
          {
              "id": "84f61d394ba2ab34",
              "type": "mqtt-broker",
              "name": "Bambu X1C MQTT Bambu_X1C",
              "broker": "IP_Deines_Druckers",
              "port": "8883",
              "tls": "",
              "clientid": "",
              "autoConnect": true,
              "usetls": true,
              "protocolVersion": "4",
              "keepalive": "60",
              "cleansession": true,
              "birthTopic": "",
              "birthQos": "0",
              "birthPayload": "",
              "birthMsg": {},
              "closeTopic": "",
              "closeQos": "0",
              "closePayload": "",
              "closeMsg": {},
              "willTopic": "",
              "willQos": "0",
              "willPayload": "",
              "willMsg": {},
              "userProps": "",
              "sessionExpiry": ""
          }
      ]
      

      a6b8157c-4eab-4adb-8239-61b1a747c063-image.png

      Nun auf den Flow 15 klicken (der Name kann per Doppelklick jederzeit geändert werden:

      954dd30c-67d0-49e0-928d-d030f4446bb6-image.png

      Hier seht ihr nun den Flow in seiner vollen Pracht :-)
      Allerdings haben wir noch einen Fehler, da die Ping Node fehlt:

      3beacdea-ecbc-4327-ac98-8d5796ac8582-image.png

      Um das zu beheben klickt ihr wieder oben rechts auf das Burgermenü und auf Palette verwalten:

      16ebcde0-b624-4a38-b3a2-3c722efc9119-image.png

      Reiter Installation anklicken, Suchbegriff Ping eingeben und beim ersten Eintrag auf Installieren klicken:

      ed75d327-daab-457b-88f9-0758f27bf97f-image.png

      In der Meldung ebenfalls auf Installieren klicken:

      a15378d3-8eaa-49ce-a16b-1effa6761166-image.png

      Das Ganze übernehmen (oben rechts auf Deploy klicken):

      234c3c71-0040-454b-ab8a-17a58d63da07-image.png

      Einstellungen

      Doppelklick auf die MQTT Node um die Einstellungen zu gelangen:

      6c7be134-2bc1-4f41-aa61-ea07cb1a16a0-image.png

      Die Seriennummer deines Druckers eintragen und auf den Reiter Sicherheit klicken:

      f3bc9d1e-8a58-422a-a41e-b1a42c81b9ee-image.png

      Bitte auch https://forum.iobroker.net/post/943312 beachten.


      PS:

      Das soll kein Node-Red Zwang werden.
      Das Ganze klappt garantiert auch mit Blockly und/ oder anderen Scripten.
      Kann ich aber nicht und möchte ich auch nicht.
      Wer Bock auf Node-Red hat, kann diese Anleitung nutzen, wer keinen Bock darauf hat, lässt es halt sein 😉

      PPS:
      Der Fairness halber geht auch ein großer Dank an die Jungs (und Mädels?) aus dem Home Assistant Forum, da dort die initialen Funktionen zum Interprätieren der MQTT Daten des Bambus aufgedröselt wurden.


      https://community.home-assistant.io/t/bambu-lab-x1-x1c-mqtt/489510

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

      @djalexz da hast Du Dir aber viel Mühe gemacht. :+1: :+1: :+1: . Damit sollte eigentlich jeder zurecht kommen und wie gesagt für alle die das Objekt so auseinander nehmen wollen, ist es halt am Besten mal das Objekt hier in CodeTags zu posten - mit einer konkreten Fragestellung, wie sie den Wert x oder y extrahieren können.

      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
      1
      • D djalexz

        Hallo zusammen,

        da hier immer nur so ein paar Schnipsel von Node-Red drinstehen und es wohl noch einige gibt für die Node-Red ein Buch mit sieben Siegeln ist, hier eine kleine Anleitung zur Installation und Einbindung meines Flows.

        f7825076-70f0-494e-bd66-671c9c80ea88-image.png

        Damit werden alle relevanten Werte des Druckers umgewandelt, sodass diese genutzt werden können.

        Hier kommt der Subflow von @mickym zum Einsatz (nochmals vielen Dank dafür an dieser Stelle).

        Da ich für diese Anleitung eine extra Node-Red Instanz anlegen musste, steht dort natürlich node-red.1.
        Stört euch nicht daran. Bei euch steht node-red.0

        Ich hoffe es hilft dem Ein oder Anderen und ihr könnt damit jetzt euren Bambu "Smart" machen.

        HINWEIS:
        Da ich einen X1C habe, kann ich nur für diesen sprechen.
        Ich kann keinerlei Garantie übernehmen, dass das bei einem P1P ebenfalls läuft.
        Theoretisch sollte es das. Ich kann es halt nur nicht testen.
        Ich gehe hier von der neuesten Firmware des Druckers aus (01.04.00.00 (20230207))
        Mit MQTT TLS Verschlüsselung usw.

        ansonsten muss die MQTT Node anders eingestellt werden (ohne Verschlüsselung).

        Bei mir kommt für das Dashboard Jarvis von @Zefau zum Einsatz.
        Die Datenpunkte dafür sind natürlich Teil dieses Flows.
        Wer das nicht braucht oder etwas Anderes nutzt, muss die Nodes (via Doppelklick) entsprechend anpassen.

        Und Übernahme (Deploy) nicht vergessen 😉

        Jetzt gehts los:

        Installation von Node-Red:


        Node-Red Instanz in ioBroker hinzufügen:

        bcaa382b-3cee-4478-8849-efa340eb6219-image.png

        e6270797-b9d9-4a5b-a402-915fbf47f5b4-image.png

        Haken bei Palletenmanager benutzen und bei Erstellung von Fremd-Objekten zulassen setzen und Speichern:

        28531052-444e-412b-87f4-581dc03ecdf3-image.png

        Darauf achten, dass die Instanz gestartet ist (grünes Symbol) und auf das Fenster Icon klicken:

        3a6a9bc7-6dac-444a-9990-6de0e2df31da-image.png


        Node-Red (die Oberfläche)

        Die Einführung könnt ihr euch gerne anschauen (m.M.n. sehr Sinnvoll) oder das Fenster schließen:

        9254918c-0bd6-4fe8-9922-3a44e67db493-image.png

        Importieren meines Flows:

        eeaf90fd-838d-4926-ad42-323facbd3044-image.png

        Hier der Flow zum Kopieren und Importieren

        [
            {
                "id": "6e802f1553b18149",
                "type": "subflow",
                "name": "JSON or Obj to IOBroker",
                "info": "# Creates an IOBroker tree\n\nThis node creates an IOBroker tree out of an Java-Object or JSON String.\n\nThe object tree will be created under 0_userdata.0\nIn addition to the JSON-String or Java Object as `msg.payload` it is necessary to specify a `msg.top` properity in addition to the msg-Object.\n\nThe object tree will be created under 0_userdata.0\n\nExisting `msg.topic` entries will be deleted.\nAn iobroker-out node has to be appended to this subflow node. It is not part of the subflow itself. No topic should be specified in the iobroker out node.\n\nIs `msg.top` property isn't defined, the `top` property of the subflow-node is used. \n\nIn the properties of the subflow node a new property `keepTopic` has been added. Default is _false_ to keep the current behaviour. If set to _true_ then the originial topic will be placed between the `top` property of the subflow node and the property of the analyzed JSON object.\n\n**Attention:**\nIf msg.top and top is empty, all msg.topics (msg.topic) will be directly prefixed with 0_userdata.0. . \n\n**Update 13.09.2022:**\nSpaces in topics of objects are no longer replaced with underscores in objects. No differences between all data types.\n\n# Erstellt einen Objektbaum im ioBroker\n\nDiese Node erstellt einen Objektbaum im ioBroker aus einem JAVA Objekt bzw. einem JSON String. \n\nDer Baum wird in jedem Fall unter 0_userdata.0 erstellt und zwar unter dem Topic der in` msg.top` mitgegeben wurde. In der `msg.payload` befindet sich dann der JSON String oder das entsprechende Objekt.\n\nExistierende `msg.topic `Einträge werden gelöscht.\nEin entsprechende iobroker-out Node muss an den Flow angehängt werden. Sie ist nicht Bestandteil des Subflows. In dieser iobroker-out Node darf kein Topic angegeben werden. \n\nFalls msg.top nicht definiert wurde, wird der `top`-Wert der Subflow-Node verwendet.\n\nIn den Eigenschaften der Subflow-Node wurde ein neuer Parameter `keepTopic` hinzugefügt. Standardwert ist _false_, um das bisherige Verhalten beizubehalten. Setzt man die Eigenschaft auf _true_, dann wird das originale Topic zwischen der `top` Eigenschaft der Subflow-Node und Eigenschaft des analysierten JSON Objektes eingefügt.\n\n**Achtung:**\nWenn top und msg.top leer ist, werden alle msg.topics (msg.topic) direkt unter dem Präfix 0_userdata.0., angelegt bzw. ausgegeben. \n\n**Update 13.09.2022:**\nLeerzeichen werden in Topics von Objekten nicht mehr durch Unterstriche ersetzt. Es gibt keine Unterschiede mehr zwischen den Datentypen.",
                "category": "",
                "in": [
                    {
                        "x": 60,
                        "y": 160,
                        "wires": [
                            {
                                "id": "554b8c663bcb46c2"
                            }
                        ]
                    }
                ],
                "out": [
                    {
                        "x": 2620,
                        "y": 280,
                        "wires": [
                            {
                                "id": "0962842ebd23e0d7",
                                "port": 0
                            }
                        ]
                    }
                ],
                "env": [
                    {
                        "name": "top",
                        "type": "str",
                        "value": "objRoot"
                    },
                    {
                        "name": "keepTopic",
                        "type": "bool",
                        "value": "false"
                    }
                ],
                "meta": {},
                "color": "#E2D96E",
                "icon": "node-red/batch.svg"
            },
            {
                "id": "3e11e8338f694832",
                "type": "split",
                "z": "6e802f1553b18149",
                "name": "split object",
                "splt": "\\n",
                "spltType": "str",
                "arraySplt": 1,
                "arraySpltType": "len",
                "stream": false,
                "addname": "key",
                "x": 1370,
                "y": 160,
                "wires": [
                    [
                        "0562a4249c8b856b"
                    ]
                ]
            },
            {
                "id": "0562a4249c8b856b",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "add key to topic",
                "rules": [
                    {
                        "t": "set",
                        "p": "stateName",
                        "pt": "msg",
                        "to": "key",
                        "tot": "msg"
                    },
                    {
                        "t": "set",
                        "p": "topic",
                        "pt": "msg",
                        "to": "topic  & '.' & key",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 1560,
                "y": 160,
                "wires": [
                    [
                        "ddc90985bef0fafa"
                    ]
                ]
            },
            {
                "id": "ddc90985bef0fafa",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "is type?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "istype",
                        "v": "array",
                        "vt": "array"
                    },
                    {
                        "t": "istype",
                        "v": "object",
                        "vt": "object"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 3,
                "x": 1740,
                "y": 160,
                "wires": [
                    [
                        "bfce19b206660fbe"
                    ],
                    [
                        "3e11e8338f694832"
                    ],
                    [
                        "1a8c03d866b85b12"
                    ]
                ]
            },
            {
                "id": "bfce19b206660fbe",
                "type": "split",
                "z": "6e802f1553b18149",
                "name": "split array",
                "splt": "\\n",
                "spltType": "str",
                "arraySplt": 1,
                "arraySpltType": "len",
                "stream": false,
                "addname": "",
                "x": 780,
                "y": 280,
                "wires": [
                    [
                        "e89927810c6d75ec"
                    ]
                ]
            },
            {
                "id": "e89927810c6d75ec",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "add index to topic",
                "rules": [
                    {
                        "t": "set",
                        "p": "topic",
                        "pt": "msg",
                        "to": "topic  & '.' & parts.index",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 970,
                "y": 280,
                "wires": [
                    [
                        "a4d1a5d04564dc77"
                    ]
                ]
            },
            {
                "id": "f5d52c6a57d08904",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "finalize msg.topic",
                "rules": [
                    {
                        "t": "set",
                        "p": "top",
                        "pt": "msg",
                        "to": "'0_userdata.0.' & top",
                        "tot": "jsonata"
                    },
                    {
                        "t": "set",
                        "p": "topic",
                        "pt": "msg",
                        "to": "top & '.' & topic",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 2170,
                "y": 240,
                "wires": [
                    [
                        "0962842ebd23e0d7"
                    ]
                ]
            },
            {
                "id": "1a8c03d866b85b12",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "is msg.top != null",
                "property": "top",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "nnull"
                    },
                    {
                        "t": "null"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 1950,
                "y": 280,
                "wires": [
                    [
                        "f5d52c6a57d08904"
                    ],
                    [
                        "74c895ce724750de"
                    ]
                ]
            },
            {
                "id": "e023fe88445ce43e",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "",
                "rules": [
                    {
                        "t": "delete",
                        "p": "topic",
                        "pt": "msg"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 350,
                "y": 200,
                "wires": [
                    [
                        "3649300b4c233b10"
                    ]
                ]
            },
            {
                "id": "3649300b4c233b10",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "is type?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "istype",
                        "v": "json",
                        "vt": "json"
                    },
                    {
                        "t": "istype",
                        "v": "array",
                        "vt": "array"
                    },
                    {
                        "t": "istype",
                        "v": "object",
                        "vt": "object"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 4,
                "x": 600,
                "y": 160,
                "wires": [
                    [
                        "fc7913a8524badb7"
                    ],
                    [
                        "bfce19b206660fbe"
                    ],
                    [
                        "3e11e8338f694832"
                    ],
                    [
                        "9ac3cc3681e8b6c6"
                    ]
                ]
            },
            {
                "id": "1b8480cd2df7ba3f",
                "type": "comment",
                "z": "6e802f1553b18149",
                "name": "Array",
                "info": "",
                "x": 600,
                "y": 280,
                "wires": []
            },
            {
                "id": "b3541807672be040",
                "type": "comment",
                "z": "6e802f1553b18149",
                "name": "object",
                "info": "",
                "x": 1340,
                "y": 100,
                "wires": []
            },
            {
                "id": "a4d1a5d04564dc77",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "is type?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "istype",
                        "v": "object",
                        "vt": "object"
                    },
                    {
                        "t": "istype",
                        "v": "array",
                        "vt": "array"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 3,
                "x": 1160,
                "y": 280,
                "wires": [
                    [
                        "3e11e8338f694832"
                    ],
                    [
                        "bfce19b206660fbe"
                    ],
                    [
                        "a096a93bb82b7a93"
                    ]
                ]
            },
            {
                "id": "74c895ce724750de",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "finalize msg.topic",
                "rules": [
                    {
                        "t": "set",
                        "p": "top",
                        "pt": "msg",
                        "to": "top",
                        "tot": "env"
                    },
                    {
                        "t": "set",
                        "p": "top",
                        "pt": "msg",
                        "to": "'0_userdata.0.' & top",
                        "tot": "jsonata"
                    },
                    {
                        "t": "set",
                        "p": "topic",
                        "pt": "msg",
                        "to": "top & '.' & topic",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 2170,
                "y": 320,
                "wires": [
                    [
                        "0962842ebd23e0d7"
                    ]
                ]
            },
            {
                "id": "554b8c663bcb46c2",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "",
                "property": "keepTopic",
                "propertyType": "env",
                "rules": [
                    {
                        "t": "true"
                    },
                    {
                        "t": "false"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 170,
                "y": 160,
                "wires": [
                    [
                        "e30ba9f0483285e4"
                    ],
                    [
                        "e023fe88445ce43e"
                    ]
                ]
            },
            {
                "id": "e30ba9f0483285e4",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "",
                "rules": [
                    {
                        "t": "change",
                        "p": "topic",
                        "pt": "msg",
                        "from": "/",
                        "fromt": "str",
                        "to": ".",
                        "tot": "str"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 350,
                "y": 120,
                "wires": [
                    [
                        "3649300b4c233b10"
                    ]
                ]
            },
            {
                "id": "0962842ebd23e0d7",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "translate invalid chars in topic",
                "rules": [
                    {
                        "t": "change",
                        "p": "topic",
                        "pt": "msg",
                        "from": "..",
                        "fromt": "str",
                        "to": ".",
                        "tot": "str"
                    },
                    {
                        "t": "change",
                        "p": "topic",
                        "pt": "msg",
                        "from": "€",
                        "fromt": "str",
                        "to": "EUR",
                        "tot": "str"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 2430,
                "y": 280,
                "wires": [
                    []
                ]
            },
            {
                "id": "9ac3cc3681e8b6c6",
                "type": "change",
                "z": "6e802f1553b18149",
                "name": "set topic, if empty",
                "rules": [
                    {
                        "t": "set",
                        "p": "topic",
                        "pt": "msg",
                        "to": "topic ? topic : $type(payload)\t",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 950,
                "y": 200,
                "wires": [
                    [
                        "a096a93bb82b7a93"
                    ]
                ]
            },
            {
                "id": "fc7913a8524badb7",
                "type": "json",
                "z": "6e802f1553b18149",
                "name": "",
                "property": "payload",
                "action": "obj",
                "pretty": false,
                "x": 750,
                "y": 100,
                "wires": [
                    [
                        "d9e7bdd4c48a8aa1"
                    ]
                ]
            },
            {
                "id": "d9e7bdd4c48a8aa1",
                "type": "switch",
                "z": "6e802f1553b18149",
                "name": "is type?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "istype",
                        "v": "array",
                        "vt": "array"
                    },
                    {
                        "t": "istype",
                        "v": "object",
                        "vt": "object"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 3,
                "x": 900,
                "y": 100,
                "wires": [
                    [
                        "1520be42bcc2145e"
                    ],
                    [
                        "1520be42bcc2145e"
                    ],
                    [
                        "9ac3cc3681e8b6c6"
                    ]
                ]
            },
            {
                "id": "a096a93bb82b7a93",
                "type": "junction",
                "z": "6e802f1553b18149",
                "x": 1380,
                "y": 280,
                "wires": [
                    [
                        "1a8c03d866b85b12"
                    ]
                ]
            },
            {
                "id": "1520be42bcc2145e",
                "type": "junction",
                "z": "6e802f1553b18149",
                "x": 480,
                "y": 20,
                "wires": [
                    [
                        "3649300b4c233b10"
                    ]
                ]
            },
            {
                "id": "9582121ff81174a6",
                "type": "tab",
                "label": "Flow 15",
                "disabled": false,
                "info": "",
                "env": []
            },
            {
                "id": "c3f9f96853c3f09c",
                "type": "group",
                "z": "9582121ff81174a6",
                "name": "Steuerung Steckdose",
                "style": {
                    "label": true,
                    "fill": "#7fb7df",
                    "fill-opacity": "0.22",
                    "color": "#000000"
                },
                "nodes": [
                    "cd5f62e24a3e846f",
                    "964df5b70be104e6",
                    "ebace1619b2a4e15",
                    "3143caf661f13237",
                    "aeb883c176549af3",
                    "f683e53accbca89f",
                    "cff0b21c459cab43",
                    "64fa2ca669c5a78d",
                    "72cb87b2b06c4f05",
                    "4ce8104a4e434a82",
                    "e0079711246b60b0",
                    "1d943caf9a8bc0f6",
                    "ff01d8a59e17dc93",
                    "c8abbf4d53a09ffe",
                    "c5c06330d2e576f6",
                    "f97a028e21d51bfb",
                    "cac765606601d65c",
                    "ae46dbed7e5925ae",
                    "445ce2a0ad0a534a",
                    "79d8f512af50dd04",
                    "0c5048b46f072d52",
                    "5c0e9eddf913e64d"
                ],
                "x": 74,
                "y": 379,
                "w": 1352,
                "h": 482
            },
            {
                "id": "4380d7035264bead",
                "type": "group",
                "z": "9582121ff81174a6",
                "name": "Online/Offline Anzeige",
                "style": {
                    "label": true,
                    "color": "#000000",
                    "fill": "#addb7b",
                    "fill-opacity": "0.38"
                },
                "nodes": [
                    "d2a5ed4e2b8c8674",
                    "b5c862f5d50c56cb",
                    "2e71b198fe06ccdb",
                    "144c29803a38e2a4",
                    "3a131237a7bdec9d"
                ],
                "x": 1074,
                "y": 79,
                "w": 412,
                "h": 242
            },
            {
                "id": "19ede36faf38f69b",
                "type": "group",
                "z": "9582121ff81174a6",
                "name": "X1C Datenpunkt Umwandlung",
                "style": {
                    "fill": "#ffff00",
                    "label": true,
                    "fill-opacity": "0.36",
                    "color": "#000000"
                },
                "nodes": [
                    "e2852c3101736fc9",
                    "477ecaa1b9913815",
                    "9fadcc36a22ec38b",
                    "44d9370861f0a79a",
                    "33a162f31f850a9e",
                    "f6c8fbdf638c04e8",
                    "ce27f3362985a4d3",
                    "89074ea56277b288",
                    "01c35b9bb3921713",
                    "3eb26b7322587c6b",
                    "21081e6a23dc83a1"
                ],
                "x": 14,
                "y": 39,
                "w": 1032,
                "h": 322
            },
            {
                "id": "e2852c3101736fc9",
                "type": "subflow:6e802f1553b18149",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "",
                "env": [
                    {
                        "name": "top",
                        "value": "X1C",
                        "type": "str"
                    }
                ],
                "x": 170,
                "y": 160,
                "wires": [
                    [
                        "ce27f3362985a4d3"
                    ]
                ]
            },
            {
                "id": "477ecaa1b9913815",
                "type": "mqtt in",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "Bambu X1C Bambu_X1C",
                "topic": "device/DieSeriennummerDeinesDruckers/report",
                "qos": "2",
                "datatype": "auto-detect",
                "broker": "84f61d394ba2ab34",
                "nl": false,
                "rap": true,
                "rh": 0,
                "inputs": 0,
                "x": 150,
                "y": 100,
                "wires": [
                    [
                        "e2852c3101736fc9"
                    ]
                ]
            },
            {
                "id": "9fadcc36a22ec38b",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "schreibe Datenpunkte in ioBroker",
                "topic": "",
                "ack": "true",
                "autoCreate": "true",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 880,
                "y": 200,
                "wires": []
            },
            {
                "id": "44d9370861f0a79a",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "heatbreak_fan_speed",
                "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 560,
                "y": 120,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "33a162f31f850a9e",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "Stage Parser",
                "func": "\nfunction parseAction(actionId) {\n    if(actionId === undefined) {\n        return \"\";\n    }\n    switch (actionId) {\n        case -2:\n            return \"Offline\";\n        case -1:\n            return \"Idle\";\n        case 0:\n            return \"Printing\";  // idle or printing\n        case 1:\n            return \"Auto bed leveling\";\n        case 2:\n            return \"Heatbed preheating\";\n        case 3:\n            return \"Sweeping XY mech mode\";\n        case 4:\n            return \"Changing filament\";\n        case 5:\n            return \"M400 pause\";\n        case 6:\n            return \"Paused due to filament runout\";\n        case 7:\n            return \"Heating hotend\";\n        case 8:\n            return \"Calibrating extrusion\";\n        case 9:\n            return \"Scanning bed surface\";\n        case 10:\n            return \"Inspecting first layer\";\n        case 11:\n            return \"Identifying build plate type\";\n        case 12:\n            return \"Calibrating Micro Lidar\";\n        case 13:\n            return \"Homing toolhead\";\n        case 14:\n            return \"Cleaning nozzle tip\";\n        case 15:\n            return \"Checking extruder temperature\";\n        case 16:\n            return \"Printing was paused by the user\";\n        case 17:\n            return \"Pause of front cover falling\";\n        case 18:\n            return \"Calibrating the micro lidar\";\n        case 19:\n            return \"Calibrating extrusion flow\";\n        case 20:\n            return \"Paused due to nozzle temperature malfunction\";\n        case 21:\n            return \"Paused due to heat bed temperature malfunction\";\n        default:\n            return actionId.toString()\n    }\n}\n\n\n\n    \nvar current_action = parseAction(msg.payload);\n\n\n\n    msg.payload = current_action;\n\n\n\n    return [msg];\n",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 530,
                "y": 160,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "f6c8fbdf638c04e8",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "Translate X1C Speed Profile",
                "func": "function parseAction(SpeedProfile) {\n    if (SpeedProfile === undefined) {\n        return \"\";\n    }\n    switch (SpeedProfile) {\n        case 1:\n            return \"Silent\";\n           \n        case 2:\n            return \"Standard\";\n            \n        case 3:\n            return \"Sport\";\n           \n        case 4:\n            return \"Ludicrous\";\n           \n        default:\n            return \"Undefined\";\n          \n\n   \n    }\n\n}\n\n\n\n    var SpeedProfile = parseAction(msg.payload);\n    msg.payload = SpeedProfile;\n\n\n    return [msg];\n\n\n",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 580,
                "y": 200,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "ce27f3362985a4d3",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "Verteiler",
                "property": "topic",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.cooling_fan_speed",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.stg_cur",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.spd_lvl",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.big_fan1_speed",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.big_fan2_speed",
                        "vt": "str"
                    },
                    {
                        "t": "eq",
                        "v": "0_userdata.0.X1C.print.mc_remaining_time",
                        "vt": "str"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 8,
                "x": 360,
                "y": 140,
                "wires": [
                    [
                        "89074ea56277b288"
                    ],
                    [
                        "44d9370861f0a79a"
                    ],
                    [
                        "33a162f31f850a9e"
                    ],
                    [
                        "f6c8fbdf638c04e8"
                    ],
                    [
                        "3eb26b7322587c6b"
                    ],
                    [
                        "01c35b9bb3921713"
                    ],
                    [
                        "21081e6a23dc83a1"
                    ],
                    [
                        "9fadcc36a22ec38b"
                    ]
                ],
                "outputLabels": [
                    "Cooling Fan Speed",
                    "Heatbreak Fan Speed",
                    "Stage Parser",
                    "Speed Profile",
                    "AUX Fan Speed",
                    "Chamber Fan Speed",
                    "remaining_time",
                    ""
                ]
            },
            {
                "id": "89074ea56277b288",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "cooling_fan_speed",
                "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 550,
                "y": 80,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "01c35b9bb3921713",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "big_fan2_speed (Chamber)",
                "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 580,
                "y": 280,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "3eb26b7322587c6b",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "big_fan1_speed (AUX)",
                "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 560,
                "y": 240,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "21081e6a23dc83a1",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "19ede36faf38f69b",
                "name": "remaining_time",
                "func": "//var timeleft = 3727; //1h:2m:7s\n//Umrechnung in Stunden, Minuten, Sekunden\n\nvar hour = Math.floor((msg.payload % 3600) / 60);\nvar minute = Math.floor(msg.payload % 60);\n\n//Den String von Stunden, Minuten und Sekunden auf 2 Stellen ändern\nif (hour < 10) {\nhour = \"0\" + hour;\n}\n\nif (minute < 10) {\nminute = \"0\" + minute;\n}\n\n\nmsg.payload = hour + \":\" + minute;\n\n\n\n\nreturn msg;\n\n",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 540,
                "y": 320,
                "wires": [
                    [
                        "9fadcc36a22ec38b"
                    ]
                ]
            },
            {
                "id": "cd5f62e24a3e846f",
                "type": "function",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "erstelle Jarvis Benachrichtigung",
                "func": "var jarvisNotify = {};\n//Beispiele\njarvisNotify.title = \"Abschalten nicht möglich\";\njarvisNotify.caption = \"\"; // wird unter dem Titel angezeigt\njarvisNotify.message = '<b>Ich drucke gerade, die Steckdose abzuschalten wäre eine blöde Idee!</b>';\n// Alternative Möglichkeiten\n//jarvisNotify.message= '<img src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></img>'; //Klappt, wird komplett angezeigt\n//jarvisNotify.message= '<iFrame src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></iFrame>'; //Klappt nicht, nur Teil wird angezeigt\n//jarvisNotify.message= getState('0_userdata.0.jarvis.pollenflug.Html').val;\n//jarvisNotify.message= getState('0_userdata.0.Html.HTML').val;\n//jarvisNotify.state = \"unread\";          //Damit bleibt die Benachrichtigung auch nach POPUP ungelesen und wird oben angezeigt mit der Zahl\njarvisNotify.criticality = \"error\";      // error,warning,info,success\njarvisNotify.display = \"popup\";          //drawer,snackbar,popup, none für focusTab\njarvisNotify.timeout = 10000;  //10000ms -> 10 Sekunden\n//jarvisNotify.timeout = 15000;  //5000ms -> 5 Sekunden\n//jarvisNotify.spinner= false; // drehender dreiViertel Kreis\njarvisNotify.progress = true;\njarvisNotify.position = \"top-left\";\njarvisNotify.icon = \"ic:outline-error\"; //mdi Iconify battery-alert-variant-outline\njarvisNotify.iconColor = \"white\";\njarvisNotify.color = \"red\";\njarvisNotify.textColor = \"white\";\nmsg.payload = JSON.stringify(jarvisNotify);\nreturn msg;",
                "outputs": 1,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 710,
                "y": 540,
                "wires": [
                    [
                        "964df5b70be104e6"
                    ]
                ]
            },
            {
                "id": "964df5b70be104e6",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Datenpunkt Jarvis Benachrichtigung",
                "topic": "jarvis.0.addNotification",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1030,
                "y": 540,
                "wires": []
            },
            {
                "id": "ebace1619b2a4e15",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "> oder < als 1",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "gt",
                        "v": "1",
                        "vt": "str"
                    },
                    {
                        "t": "lt",
                        "v": "1",
                        "vt": "str"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 440,
                "y": 540,
                "wires": [
                    [
                        "cd5f62e24a3e846f",
                        "72cb87b2b06c4f05"
                    ],
                    [
                        "aeb883c176549af3"
                    ]
                ],
                "outputLabels": [
                    "Druck aktiv",
                    "Druck nicht aktiv"
                ]
            },
            {
                "id": "3143caf661f13237",
                "type": "ioBroker get",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "heatbreak_fan_speed",
                "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                "attrname": "payload",
                "payloadType": "value",
                "errOnInvalidState": "nothing",
                "x": 220,
                "y": 540,
                "wires": [
                    [
                        "ebace1619b2a4e15"
                    ]
                ]
            },
            {
                "id": "aeb883c176549af3",
                "type": "change",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "setze msg.payload auf false",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 700,
                "y": 580,
                "wires": [
                    [
                        "4ce8104a4e434a82"
                    ]
                ]
            },
            {
                "id": "f683e53accbca89f",
                "type": "ioBroker in",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Schalter in Dashboard (Steckdose Drucker)",
                "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                "payloadType": "value",
                "onlyack": "",
                "func": "all",
                "gap": "",
                "fireOnStart": "false",
                "outFormat": "MQTT",
                "x": 280,
                "y": 460,
                "wires": [
                    [
                        "cff0b21c459cab43"
                    ]
                ]
            },
            {
                "id": "cff0b21c459cab43",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "TRUE oder FALSE?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    },
                    {
                        "t": "false"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 220,
                "y": 500,
                "wires": [
                    [
                        "4ce8104a4e434a82"
                    ],
                    [
                        "3143caf661f13237"
                    ]
                ]
            },
            {
                "id": "64fa2ca669c5a78d",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Schalter in Dashboard (Steckdose Drucker)",
                "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                "ack": "false",
                "autoCreate": "true",
                "stateName": "",
                "role": "",
                "payloadType": "boolean",
                "readonly": "false",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1090,
                "y": 480,
                "wires": []
            },
            {
                "id": "72cb87b2b06c4f05",
                "type": "change",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "setze msg.payload auf true",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "true",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 700,
                "y": 460,
                "wires": [
                    [
                        "64fa2ca669c5a78d"
                    ]
                ]
            },
            {
                "id": "b5c862f5d50c56cb",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "4380d7035264bead",
                "name": "FALSE oder nicht?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "false"
                    },
                    {
                        "t": "else"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 1230,
                "y": 160,
                "wires": [
                    [
                        "144c29803a38e2a4"
                    ],
                    [
                        "2e71b198fe06ccdb"
                    ]
                ]
            },
            {
                "id": "2e71b198fe06ccdb",
                "type": "change",
                "z": "9582121ff81174a6",
                "g": "4380d7035264bead",
                "name": "setze msg.payload auf online",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "online",
                        "tot": "str"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 1260,
                "y": 240,
                "wires": [
                    [
                        "3a131237a7bdec9d"
                    ]
                ]
            },
            {
                "id": "144c29803a38e2a4",
                "type": "change",
                "z": "9582121ff81174a6",
                "g": "4380d7035264bead",
                "name": "setze msg.payload auf offline",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "offline",
                        "tot": "str"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 1260,
                "y": 200,
                "wires": [
                    [
                        "3a131237a7bdec9d"
                    ]
                ]
            },
            {
                "id": "4ce8104a4e434a82",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Datenpunkt Steckdose Drucker An/AUS",
                "topic": "alias.0.Buero.3D-Drucker.SET",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 740,
                "y": 500,
                "wires": []
            },
            {
                "id": "3a131237a7bdec9d",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "4380d7035264bead",
                "name": "Datenpunkt Verbindungsstatus des Druckers",
                "topic": "0_userdata.0.X1C.Verbindungsstatus",
                "ack": "false",
                "autoCreate": "true",
                "stateName": "",
                "role": "",
                "payloadType": "string",
                "readonly": "false",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1290,
                "y": 280,
                "wires": []
            },
            {
                "id": "e0079711246b60b0",
                "type": "comment",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Abschalten verhindern, wenn Heatbreak_Fan_Speed über 1 (Düse ist heiß)",
                "info": "",
                "x": 380,
                "y": 420,
                "wires": []
            },
            {
                "id": "1d943caf9a8bc0f6",
                "type": "ioBroker get",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
                "topic": "0_userdata.0.X1C.automatisch_abschalten",
                "attrname": "payload",
                "payloadType": "value",
                "errOnInvalidState": "nothing",
                "x": 340,
                "y": 720,
                "wires": [
                    [
                        "c8abbf4d53a09ffe"
                    ]
                ]
            },
            {
                "id": "ff01d8a59e17dc93",
                "type": "inject",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "alle 10 Min. TRUE senden",
                "props": [
                    {
                        "p": "payload"
                    }
                ],
                "repeat": "600",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "true",
                "payloadType": "bool",
                "x": 240,
                "y": 820,
                "wires": [
                    [
                        "1d943caf9a8bc0f6"
                    ]
                ]
            },
            {
                "id": "c8abbf4d53a09ffe",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "TRUE?",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 180,
                "y": 760,
                "wires": [
                    [
                        "c5c06330d2e576f6"
                    ]
                ]
            },
            {
                "id": "f97a028e21d51bfb",
                "type": "switch",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "> oder < als 1",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "gt",
                        "v": "1",
                        "vt": "str"
                    },
                    {
                        "t": "lt",
                        "v": "1",
                        "vt": "str"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 560,
                "y": 760,
                "wires": [
                    [],
                    [
                        "cac765606601d65c"
                    ]
                ],
                "outputLabels": [
                    "Druck aktiv",
                    "Druck nicht aktiv"
                ]
            },
            {
                "id": "c5c06330d2e576f6",
                "type": "ioBroker get",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "heatbreak_fan_speed",
                "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                "attrname": "payload",
                "payloadType": "value",
                "errOnInvalidState": "nothing",
                "x": 360,
                "y": 760,
                "wires": [
                    [
                        "f97a028e21d51bfb"
                    ]
                ]
            },
            {
                "id": "cac765606601d65c",
                "type": "change",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "setze msg.payload auf false",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 780,
                "y": 760,
                "wires": [
                    [
                        "ae46dbed7e5925ae",
                        "445ce2a0ad0a534a",
                        "0c5048b46f072d52"
                    ]
                ]
            },
            {
                "id": "ae46dbed7e5925ae",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Datenpunkt Steckdose Drucker An/AUS",
                "topic": "alias.0.Buero.3D-Drucker.SET",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1120,
                "y": 720,
                "wires": []
            },
            {
                "id": "445ce2a0ad0a534a",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
                "topic": "0_userdata.0.X1C.automatisch_abschalten",
                "ack": "false",
                "autoCreate": "true",
                "stateName": "",
                "role": "",
                "payloadType": "boolean",
                "readonly": "false",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1180,
                "y": 800,
                "wires": []
            },
            {
                "id": "79d8f512af50dd04",
                "type": "comment",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "automatisch Abschalten nach Druck",
                "info": "",
                "x": 260,
                "y": 680,
                "wires": []
            },
            {
                "id": "0c5048b46f072d52",
                "type": "ioBroker out",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "Schalter in Dashboard (Steckdose Drucker)",
                "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                "ack": "false",
                "autoCreate": "true",
                "stateName": "",
                "role": "",
                "payloadType": "boolean",
                "readonly": "false",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1130,
                "y": 760,
                "wires": []
            },
            {
                "id": "5c0e9eddf913e64d",
                "type": "inject",
                "z": "9582121ff81174a6",
                "g": "c3f9f96853c3f09c",
                "name": "nur zum Testen",
                "props": [
                    {
                        "p": "payload"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "true",
                "payloadType": "bool",
                "x": 1180,
                "y": 420,
                "wires": [
                    [
                        "4ce8104a4e434a82"
                    ]
                ]
            },
            {
                "id": "d2a5ed4e2b8c8674",
                "type": "ping",
                "z": "9582121ff81174a6",
                "g": "4380d7035264bead",
                "protocol": "IPv4",
                "mode": "timed",
                "name": "Ping IP des Druckers",
                "host": "192.168.0.111",
                "timer": "60",
                "inputs": 0,
                "x": 1200,
                "y": 120,
                "wires": [
                    [
                        "b5c862f5d50c56cb"
                    ]
                ]
            },
            {
                "id": "84f61d394ba2ab34",
                "type": "mqtt-broker",
                "name": "Bambu X1C MQTT Bambu_X1C",
                "broker": "IP_Deines_Druckers",
                "port": "8883",
                "tls": "",
                "clientid": "",
                "autoConnect": true,
                "usetls": true,
                "protocolVersion": "4",
                "keepalive": "60",
                "cleansession": true,
                "birthTopic": "",
                "birthQos": "0",
                "birthPayload": "",
                "birthMsg": {},
                "closeTopic": "",
                "closeQos": "0",
                "closePayload": "",
                "closeMsg": {},
                "willTopic": "",
                "willQos": "0",
                "willPayload": "",
                "willMsg": {},
                "userProps": "",
                "sessionExpiry": ""
            }
        ]
        

        a6b8157c-4eab-4adb-8239-61b1a747c063-image.png

        Nun auf den Flow 15 klicken (der Name kann per Doppelklick jederzeit geändert werden:

        954dd30c-67d0-49e0-928d-d030f4446bb6-image.png

        Hier seht ihr nun den Flow in seiner vollen Pracht :-)
        Allerdings haben wir noch einen Fehler, da die Ping Node fehlt:

        3beacdea-ecbc-4327-ac98-8d5796ac8582-image.png

        Um das zu beheben klickt ihr wieder oben rechts auf das Burgermenü und auf Palette verwalten:

        16ebcde0-b624-4a38-b3a2-3c722efc9119-image.png

        Reiter Installation anklicken, Suchbegriff Ping eingeben und beim ersten Eintrag auf Installieren klicken:

        ed75d327-daab-457b-88f9-0758f27bf97f-image.png

        In der Meldung ebenfalls auf Installieren klicken:

        a15378d3-8eaa-49ce-a16b-1effa6761166-image.png

        Das Ganze übernehmen (oben rechts auf Deploy klicken):

        234c3c71-0040-454b-ab8a-17a58d63da07-image.png

        Einstellungen

        Doppelklick auf die MQTT Node um die Einstellungen zu gelangen:

        6c7be134-2bc1-4f41-aa61-ea07cb1a16a0-image.png

        Die Seriennummer deines Druckers eintragen und auf den Reiter Sicherheit klicken:

        f3bc9d1e-8a58-422a-a41e-b1a42c81b9ee-image.png

        Bitte auch https://forum.iobroker.net/post/943312 beachten.


        PS:

        Das soll kein Node-Red Zwang werden.
        Das Ganze klappt garantiert auch mit Blockly und/ oder anderen Scripten.
        Kann ich aber nicht und möchte ich auch nicht.
        Wer Bock auf Node-Red hat, kann diese Anleitung nutzen, wer keinen Bock darauf hat, lässt es halt sein 😉

        PPS:
        Der Fairness halber geht auch ein großer Dank an die Jungs (und Mädels?) aus dem Home Assistant Forum, da dort die initialen Funktionen zum Interprätieren der MQTT Daten des Bambus aufgedröselt wurden.


        https://community.home-assistant.io/t/bambu-lab-x1-x1c-mqtt/489510

        D Offline
        D Offline
        dadonali
        schrieb am zuletzt editiert von
        #71

        @djalexz krass!

        Vielen vielen Dank 😍 das werde ich mir heute Abend mal in Ruhe ansehen. Und wenn es gewisse Sachen gibt die der p1p nicht hat machte es erstmal nix wenn ich es nach der Anleitung mache?

        D 1 Antwort Letzte Antwort
        0
        • D dadonali

          @djalexz krass!

          Vielen vielen Dank 😍 das werde ich mir heute Abend mal in Ruhe ansehen. Und wenn es gewisse Sachen gibt die der p1p nicht hat machte es erstmal nix wenn ich es nach der Anleitung mache?

          D Offline
          D Offline
          djalexz
          schrieb am zuletzt editiert von djalexz
          #72

          @dadonali Sehr gerne, wir Smarthomer müssen doch zusammenhalten 😁
          Nein, das macht nix. Dann werden einfach dafür keine Werte geschrieben.

          D 1 Antwort Letzte Antwort
          0
          • D djalexz

            Hallo zusammen,

            da hier immer nur so ein paar Schnipsel von Node-Red drinstehen und es wohl noch einige gibt für die Node-Red ein Buch mit sieben Siegeln ist, hier eine kleine Anleitung zur Installation und Einbindung meines Flows.

            f7825076-70f0-494e-bd66-671c9c80ea88-image.png

            Damit werden alle relevanten Werte des Druckers umgewandelt, sodass diese genutzt werden können.

            Hier kommt der Subflow von @mickym zum Einsatz (nochmals vielen Dank dafür an dieser Stelle).

            Da ich für diese Anleitung eine extra Node-Red Instanz anlegen musste, steht dort natürlich node-red.1.
            Stört euch nicht daran. Bei euch steht node-red.0

            Ich hoffe es hilft dem Ein oder Anderen und ihr könnt damit jetzt euren Bambu "Smart" machen.

            HINWEIS:
            Da ich einen X1C habe, kann ich nur für diesen sprechen.
            Ich kann keinerlei Garantie übernehmen, dass das bei einem P1P ebenfalls läuft.
            Theoretisch sollte es das. Ich kann es halt nur nicht testen.
            Ich gehe hier von der neuesten Firmware des Druckers aus (01.04.00.00 (20230207))
            Mit MQTT TLS Verschlüsselung usw.

            ansonsten muss die MQTT Node anders eingestellt werden (ohne Verschlüsselung).

            Bei mir kommt für das Dashboard Jarvis von @Zefau zum Einsatz.
            Die Datenpunkte dafür sind natürlich Teil dieses Flows.
            Wer das nicht braucht oder etwas Anderes nutzt, muss die Nodes (via Doppelklick) entsprechend anpassen.

            Und Übernahme (Deploy) nicht vergessen 😉

            Jetzt gehts los:

            Installation von Node-Red:


            Node-Red Instanz in ioBroker hinzufügen:

            bcaa382b-3cee-4478-8849-efa340eb6219-image.png

            e6270797-b9d9-4a5b-a402-915fbf47f5b4-image.png

            Haken bei Palletenmanager benutzen und bei Erstellung von Fremd-Objekten zulassen setzen und Speichern:

            28531052-444e-412b-87f4-581dc03ecdf3-image.png

            Darauf achten, dass die Instanz gestartet ist (grünes Symbol) und auf das Fenster Icon klicken:

            3a6a9bc7-6dac-444a-9990-6de0e2df31da-image.png


            Node-Red (die Oberfläche)

            Die Einführung könnt ihr euch gerne anschauen (m.M.n. sehr Sinnvoll) oder das Fenster schließen:

            9254918c-0bd6-4fe8-9922-3a44e67db493-image.png

            Importieren meines Flows:

            eeaf90fd-838d-4926-ad42-323facbd3044-image.png

            Hier der Flow zum Kopieren und Importieren

            [
                {
                    "id": "6e802f1553b18149",
                    "type": "subflow",
                    "name": "JSON or Obj to IOBroker",
                    "info": "# Creates an IOBroker tree\n\nThis node creates an IOBroker tree out of an Java-Object or JSON String.\n\nThe object tree will be created under 0_userdata.0\nIn addition to the JSON-String or Java Object as `msg.payload` it is necessary to specify a `msg.top` properity in addition to the msg-Object.\n\nThe object tree will be created under 0_userdata.0\n\nExisting `msg.topic` entries will be deleted.\nAn iobroker-out node has to be appended to this subflow node. It is not part of the subflow itself. No topic should be specified in the iobroker out node.\n\nIs `msg.top` property isn't defined, the `top` property of the subflow-node is used. \n\nIn the properties of the subflow node a new property `keepTopic` has been added. Default is _false_ to keep the current behaviour. If set to _true_ then the originial topic will be placed between the `top` property of the subflow node and the property of the analyzed JSON object.\n\n**Attention:**\nIf msg.top and top is empty, all msg.topics (msg.topic) will be directly prefixed with 0_userdata.0. . \n\n**Update 13.09.2022:**\nSpaces in topics of objects are no longer replaced with underscores in objects. No differences between all data types.\n\n# Erstellt einen Objektbaum im ioBroker\n\nDiese Node erstellt einen Objektbaum im ioBroker aus einem JAVA Objekt bzw. einem JSON String. \n\nDer Baum wird in jedem Fall unter 0_userdata.0 erstellt und zwar unter dem Topic der in` msg.top` mitgegeben wurde. In der `msg.payload` befindet sich dann der JSON String oder das entsprechende Objekt.\n\nExistierende `msg.topic `Einträge werden gelöscht.\nEin entsprechende iobroker-out Node muss an den Flow angehängt werden. Sie ist nicht Bestandteil des Subflows. In dieser iobroker-out Node darf kein Topic angegeben werden. \n\nFalls msg.top nicht definiert wurde, wird der `top`-Wert der Subflow-Node verwendet.\n\nIn den Eigenschaften der Subflow-Node wurde ein neuer Parameter `keepTopic` hinzugefügt. Standardwert ist _false_, um das bisherige Verhalten beizubehalten. Setzt man die Eigenschaft auf _true_, dann wird das originale Topic zwischen der `top` Eigenschaft der Subflow-Node und Eigenschaft des analysierten JSON Objektes eingefügt.\n\n**Achtung:**\nWenn top und msg.top leer ist, werden alle msg.topics (msg.topic) direkt unter dem Präfix 0_userdata.0., angelegt bzw. ausgegeben. \n\n**Update 13.09.2022:**\nLeerzeichen werden in Topics von Objekten nicht mehr durch Unterstriche ersetzt. Es gibt keine Unterschiede mehr zwischen den Datentypen.",
                    "category": "",
                    "in": [
                        {
                            "x": 60,
                            "y": 160,
                            "wires": [
                                {
                                    "id": "554b8c663bcb46c2"
                                }
                            ]
                        }
                    ],
                    "out": [
                        {
                            "x": 2620,
                            "y": 280,
                            "wires": [
                                {
                                    "id": "0962842ebd23e0d7",
                                    "port": 0
                                }
                            ]
                        }
                    ],
                    "env": [
                        {
                            "name": "top",
                            "type": "str",
                            "value": "objRoot"
                        },
                        {
                            "name": "keepTopic",
                            "type": "bool",
                            "value": "false"
                        }
                    ],
                    "meta": {},
                    "color": "#E2D96E",
                    "icon": "node-red/batch.svg"
                },
                {
                    "id": "3e11e8338f694832",
                    "type": "split",
                    "z": "6e802f1553b18149",
                    "name": "split object",
                    "splt": "\\n",
                    "spltType": "str",
                    "arraySplt": 1,
                    "arraySpltType": "len",
                    "stream": false,
                    "addname": "key",
                    "x": 1370,
                    "y": 160,
                    "wires": [
                        [
                            "0562a4249c8b856b"
                        ]
                    ]
                },
                {
                    "id": "0562a4249c8b856b",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "add key to topic",
                    "rules": [
                        {
                            "t": "set",
                            "p": "stateName",
                            "pt": "msg",
                            "to": "key",
                            "tot": "msg"
                        },
                        {
                            "t": "set",
                            "p": "topic",
                            "pt": "msg",
                            "to": "topic  & '.' & key",
                            "tot": "jsonata"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 1560,
                    "y": 160,
                    "wires": [
                        [
                            "ddc90985bef0fafa"
                        ]
                    ]
                },
                {
                    "id": "ddc90985bef0fafa",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "is type?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "istype",
                            "v": "array",
                            "vt": "array"
                        },
                        {
                            "t": "istype",
                            "v": "object",
                            "vt": "object"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 3,
                    "x": 1740,
                    "y": 160,
                    "wires": [
                        [
                            "bfce19b206660fbe"
                        ],
                        [
                            "3e11e8338f694832"
                        ],
                        [
                            "1a8c03d866b85b12"
                        ]
                    ]
                },
                {
                    "id": "bfce19b206660fbe",
                    "type": "split",
                    "z": "6e802f1553b18149",
                    "name": "split array",
                    "splt": "\\n",
                    "spltType": "str",
                    "arraySplt": 1,
                    "arraySpltType": "len",
                    "stream": false,
                    "addname": "",
                    "x": 780,
                    "y": 280,
                    "wires": [
                        [
                            "e89927810c6d75ec"
                        ]
                    ]
                },
                {
                    "id": "e89927810c6d75ec",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "add index to topic",
                    "rules": [
                        {
                            "t": "set",
                            "p": "topic",
                            "pt": "msg",
                            "to": "topic  & '.' & parts.index",
                            "tot": "jsonata"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 970,
                    "y": 280,
                    "wires": [
                        [
                            "a4d1a5d04564dc77"
                        ]
                    ]
                },
                {
                    "id": "f5d52c6a57d08904",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "finalize msg.topic",
                    "rules": [
                        {
                            "t": "set",
                            "p": "top",
                            "pt": "msg",
                            "to": "'0_userdata.0.' & top",
                            "tot": "jsonata"
                        },
                        {
                            "t": "set",
                            "p": "topic",
                            "pt": "msg",
                            "to": "top & '.' & topic",
                            "tot": "jsonata"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 2170,
                    "y": 240,
                    "wires": [
                        [
                            "0962842ebd23e0d7"
                        ]
                    ]
                },
                {
                    "id": "1a8c03d866b85b12",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "is msg.top != null",
                    "property": "top",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "nnull"
                        },
                        {
                            "t": "null"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 1950,
                    "y": 280,
                    "wires": [
                        [
                            "f5d52c6a57d08904"
                        ],
                        [
                            "74c895ce724750de"
                        ]
                    ]
                },
                {
                    "id": "e023fe88445ce43e",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "",
                    "rules": [
                        {
                            "t": "delete",
                            "p": "topic",
                            "pt": "msg"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 350,
                    "y": 200,
                    "wires": [
                        [
                            "3649300b4c233b10"
                        ]
                    ]
                },
                {
                    "id": "3649300b4c233b10",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "is type?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "istype",
                            "v": "json",
                            "vt": "json"
                        },
                        {
                            "t": "istype",
                            "v": "array",
                            "vt": "array"
                        },
                        {
                            "t": "istype",
                            "v": "object",
                            "vt": "object"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 4,
                    "x": 600,
                    "y": 160,
                    "wires": [
                        [
                            "fc7913a8524badb7"
                        ],
                        [
                            "bfce19b206660fbe"
                        ],
                        [
                            "3e11e8338f694832"
                        ],
                        [
                            "9ac3cc3681e8b6c6"
                        ]
                    ]
                },
                {
                    "id": "1b8480cd2df7ba3f",
                    "type": "comment",
                    "z": "6e802f1553b18149",
                    "name": "Array",
                    "info": "",
                    "x": 600,
                    "y": 280,
                    "wires": []
                },
                {
                    "id": "b3541807672be040",
                    "type": "comment",
                    "z": "6e802f1553b18149",
                    "name": "object",
                    "info": "",
                    "x": 1340,
                    "y": 100,
                    "wires": []
                },
                {
                    "id": "a4d1a5d04564dc77",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "is type?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "istype",
                            "v": "object",
                            "vt": "object"
                        },
                        {
                            "t": "istype",
                            "v": "array",
                            "vt": "array"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 3,
                    "x": 1160,
                    "y": 280,
                    "wires": [
                        [
                            "3e11e8338f694832"
                        ],
                        [
                            "bfce19b206660fbe"
                        ],
                        [
                            "a096a93bb82b7a93"
                        ]
                    ]
                },
                {
                    "id": "74c895ce724750de",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "finalize msg.topic",
                    "rules": [
                        {
                            "t": "set",
                            "p": "top",
                            "pt": "msg",
                            "to": "top",
                            "tot": "env"
                        },
                        {
                            "t": "set",
                            "p": "top",
                            "pt": "msg",
                            "to": "'0_userdata.0.' & top",
                            "tot": "jsonata"
                        },
                        {
                            "t": "set",
                            "p": "topic",
                            "pt": "msg",
                            "to": "top & '.' & topic",
                            "tot": "jsonata"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 2170,
                    "y": 320,
                    "wires": [
                        [
                            "0962842ebd23e0d7"
                        ]
                    ]
                },
                {
                    "id": "554b8c663bcb46c2",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "",
                    "property": "keepTopic",
                    "propertyType": "env",
                    "rules": [
                        {
                            "t": "true"
                        },
                        {
                            "t": "false"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 170,
                    "y": 160,
                    "wires": [
                        [
                            "e30ba9f0483285e4"
                        ],
                        [
                            "e023fe88445ce43e"
                        ]
                    ]
                },
                {
                    "id": "e30ba9f0483285e4",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "",
                    "rules": [
                        {
                            "t": "change",
                            "p": "topic",
                            "pt": "msg",
                            "from": "/",
                            "fromt": "str",
                            "to": ".",
                            "tot": "str"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 350,
                    "y": 120,
                    "wires": [
                        [
                            "3649300b4c233b10"
                        ]
                    ]
                },
                {
                    "id": "0962842ebd23e0d7",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "translate invalid chars in topic",
                    "rules": [
                        {
                            "t": "change",
                            "p": "topic",
                            "pt": "msg",
                            "from": "..",
                            "fromt": "str",
                            "to": ".",
                            "tot": "str"
                        },
                        {
                            "t": "change",
                            "p": "topic",
                            "pt": "msg",
                            "from": "€",
                            "fromt": "str",
                            "to": "EUR",
                            "tot": "str"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 2430,
                    "y": 280,
                    "wires": [
                        []
                    ]
                },
                {
                    "id": "9ac3cc3681e8b6c6",
                    "type": "change",
                    "z": "6e802f1553b18149",
                    "name": "set topic, if empty",
                    "rules": [
                        {
                            "t": "set",
                            "p": "topic",
                            "pt": "msg",
                            "to": "topic ? topic : $type(payload)\t",
                            "tot": "jsonata"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 950,
                    "y": 200,
                    "wires": [
                        [
                            "a096a93bb82b7a93"
                        ]
                    ]
                },
                {
                    "id": "fc7913a8524badb7",
                    "type": "json",
                    "z": "6e802f1553b18149",
                    "name": "",
                    "property": "payload",
                    "action": "obj",
                    "pretty": false,
                    "x": 750,
                    "y": 100,
                    "wires": [
                        [
                            "d9e7bdd4c48a8aa1"
                        ]
                    ]
                },
                {
                    "id": "d9e7bdd4c48a8aa1",
                    "type": "switch",
                    "z": "6e802f1553b18149",
                    "name": "is type?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "istype",
                            "v": "array",
                            "vt": "array"
                        },
                        {
                            "t": "istype",
                            "v": "object",
                            "vt": "object"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 3,
                    "x": 900,
                    "y": 100,
                    "wires": [
                        [
                            "1520be42bcc2145e"
                        ],
                        [
                            "1520be42bcc2145e"
                        ],
                        [
                            "9ac3cc3681e8b6c6"
                        ]
                    ]
                },
                {
                    "id": "a096a93bb82b7a93",
                    "type": "junction",
                    "z": "6e802f1553b18149",
                    "x": 1380,
                    "y": 280,
                    "wires": [
                        [
                            "1a8c03d866b85b12"
                        ]
                    ]
                },
                {
                    "id": "1520be42bcc2145e",
                    "type": "junction",
                    "z": "6e802f1553b18149",
                    "x": 480,
                    "y": 20,
                    "wires": [
                        [
                            "3649300b4c233b10"
                        ]
                    ]
                },
                {
                    "id": "9582121ff81174a6",
                    "type": "tab",
                    "label": "Flow 15",
                    "disabled": false,
                    "info": "",
                    "env": []
                },
                {
                    "id": "c3f9f96853c3f09c",
                    "type": "group",
                    "z": "9582121ff81174a6",
                    "name": "Steuerung Steckdose",
                    "style": {
                        "label": true,
                        "fill": "#7fb7df",
                        "fill-opacity": "0.22",
                        "color": "#000000"
                    },
                    "nodes": [
                        "cd5f62e24a3e846f",
                        "964df5b70be104e6",
                        "ebace1619b2a4e15",
                        "3143caf661f13237",
                        "aeb883c176549af3",
                        "f683e53accbca89f",
                        "cff0b21c459cab43",
                        "64fa2ca669c5a78d",
                        "72cb87b2b06c4f05",
                        "4ce8104a4e434a82",
                        "e0079711246b60b0",
                        "1d943caf9a8bc0f6",
                        "ff01d8a59e17dc93",
                        "c8abbf4d53a09ffe",
                        "c5c06330d2e576f6",
                        "f97a028e21d51bfb",
                        "cac765606601d65c",
                        "ae46dbed7e5925ae",
                        "445ce2a0ad0a534a",
                        "79d8f512af50dd04",
                        "0c5048b46f072d52",
                        "5c0e9eddf913e64d"
                    ],
                    "x": 74,
                    "y": 379,
                    "w": 1352,
                    "h": 482
                },
                {
                    "id": "4380d7035264bead",
                    "type": "group",
                    "z": "9582121ff81174a6",
                    "name": "Online/Offline Anzeige",
                    "style": {
                        "label": true,
                        "color": "#000000",
                        "fill": "#addb7b",
                        "fill-opacity": "0.38"
                    },
                    "nodes": [
                        "d2a5ed4e2b8c8674",
                        "b5c862f5d50c56cb",
                        "2e71b198fe06ccdb",
                        "144c29803a38e2a4",
                        "3a131237a7bdec9d"
                    ],
                    "x": 1074,
                    "y": 79,
                    "w": 412,
                    "h": 242
                },
                {
                    "id": "19ede36faf38f69b",
                    "type": "group",
                    "z": "9582121ff81174a6",
                    "name": "X1C Datenpunkt Umwandlung",
                    "style": {
                        "fill": "#ffff00",
                        "label": true,
                        "fill-opacity": "0.36",
                        "color": "#000000"
                    },
                    "nodes": [
                        "e2852c3101736fc9",
                        "477ecaa1b9913815",
                        "9fadcc36a22ec38b",
                        "44d9370861f0a79a",
                        "33a162f31f850a9e",
                        "f6c8fbdf638c04e8",
                        "ce27f3362985a4d3",
                        "89074ea56277b288",
                        "01c35b9bb3921713",
                        "3eb26b7322587c6b",
                        "21081e6a23dc83a1"
                    ],
                    "x": 14,
                    "y": 39,
                    "w": 1032,
                    "h": 322
                },
                {
                    "id": "e2852c3101736fc9",
                    "type": "subflow:6e802f1553b18149",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "",
                    "env": [
                        {
                            "name": "top",
                            "value": "X1C",
                            "type": "str"
                        }
                    ],
                    "x": 170,
                    "y": 160,
                    "wires": [
                        [
                            "ce27f3362985a4d3"
                        ]
                    ]
                },
                {
                    "id": "477ecaa1b9913815",
                    "type": "mqtt in",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "Bambu X1C Bambu_X1C",
                    "topic": "device/DieSeriennummerDeinesDruckers/report",
                    "qos": "2",
                    "datatype": "auto-detect",
                    "broker": "84f61d394ba2ab34",
                    "nl": false,
                    "rap": true,
                    "rh": 0,
                    "inputs": 0,
                    "x": 150,
                    "y": 100,
                    "wires": [
                        [
                            "e2852c3101736fc9"
                        ]
                    ]
                },
                {
                    "id": "9fadcc36a22ec38b",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "schreibe Datenpunkte in ioBroker",
                    "topic": "",
                    "ack": "true",
                    "autoCreate": "true",
                    "stateName": "",
                    "role": "",
                    "payloadType": "",
                    "readonly": "",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 880,
                    "y": 200,
                    "wires": []
                },
                {
                    "id": "44d9370861f0a79a",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "heatbreak_fan_speed",
                    "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 560,
                    "y": 120,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "33a162f31f850a9e",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "Stage Parser",
                    "func": "\nfunction parseAction(actionId) {\n    if(actionId === undefined) {\n        return \"\";\n    }\n    switch (actionId) {\n        case -2:\n            return \"Offline\";\n        case -1:\n            return \"Idle\";\n        case 0:\n            return \"Printing\";  // idle or printing\n        case 1:\n            return \"Auto bed leveling\";\n        case 2:\n            return \"Heatbed preheating\";\n        case 3:\n            return \"Sweeping XY mech mode\";\n        case 4:\n            return \"Changing filament\";\n        case 5:\n            return \"M400 pause\";\n        case 6:\n            return \"Paused due to filament runout\";\n        case 7:\n            return \"Heating hotend\";\n        case 8:\n            return \"Calibrating extrusion\";\n        case 9:\n            return \"Scanning bed surface\";\n        case 10:\n            return \"Inspecting first layer\";\n        case 11:\n            return \"Identifying build plate type\";\n        case 12:\n            return \"Calibrating Micro Lidar\";\n        case 13:\n            return \"Homing toolhead\";\n        case 14:\n            return \"Cleaning nozzle tip\";\n        case 15:\n            return \"Checking extruder temperature\";\n        case 16:\n            return \"Printing was paused by the user\";\n        case 17:\n            return \"Pause of front cover falling\";\n        case 18:\n            return \"Calibrating the micro lidar\";\n        case 19:\n            return \"Calibrating extrusion flow\";\n        case 20:\n            return \"Paused due to nozzle temperature malfunction\";\n        case 21:\n            return \"Paused due to heat bed temperature malfunction\";\n        default:\n            return actionId.toString()\n    }\n}\n\n\n\n    \nvar current_action = parseAction(msg.payload);\n\n\n\n    msg.payload = current_action;\n\n\n\n    return [msg];\n",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 530,
                    "y": 160,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "f6c8fbdf638c04e8",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "Translate X1C Speed Profile",
                    "func": "function parseAction(SpeedProfile) {\n    if (SpeedProfile === undefined) {\n        return \"\";\n    }\n    switch (SpeedProfile) {\n        case 1:\n            return \"Silent\";\n           \n        case 2:\n            return \"Standard\";\n            \n        case 3:\n            return \"Sport\";\n           \n        case 4:\n            return \"Ludicrous\";\n           \n        default:\n            return \"Undefined\";\n          \n\n   \n    }\n\n}\n\n\n\n    var SpeedProfile = parseAction(msg.payload);\n    msg.payload = SpeedProfile;\n\n\n    return [msg];\n\n\n",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 580,
                    "y": 200,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "ce27f3362985a4d3",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "Verteiler",
                    "property": "topic",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.cooling_fan_speed",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.stg_cur",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.spd_lvl",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.big_fan1_speed",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.big_fan2_speed",
                            "vt": "str"
                        },
                        {
                            "t": "eq",
                            "v": "0_userdata.0.X1C.print.mc_remaining_time",
                            "vt": "str"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 8,
                    "x": 360,
                    "y": 140,
                    "wires": [
                        [
                            "89074ea56277b288"
                        ],
                        [
                            "44d9370861f0a79a"
                        ],
                        [
                            "33a162f31f850a9e"
                        ],
                        [
                            "f6c8fbdf638c04e8"
                        ],
                        [
                            "3eb26b7322587c6b"
                        ],
                        [
                            "01c35b9bb3921713"
                        ],
                        [
                            "21081e6a23dc83a1"
                        ],
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ],
                    "outputLabels": [
                        "Cooling Fan Speed",
                        "Heatbreak Fan Speed",
                        "Stage Parser",
                        "Speed Profile",
                        "AUX Fan Speed",
                        "Chamber Fan Speed",
                        "remaining_time",
                        ""
                    ]
                },
                {
                    "id": "89074ea56277b288",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "cooling_fan_speed",
                    "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 550,
                    "y": 80,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "01c35b9bb3921713",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "big_fan2_speed (Chamber)",
                    "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 580,
                    "y": 280,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "3eb26b7322587c6b",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "big_fan1_speed (AUX)",
                    "func": "var percentages = {\n    \"0\": 0,\n    \"1\": 10,\n    \"2\": 20,\n    \"4\": 30,\n    \"5\": 40,\n    \"7\": 50,\n    \"9\": 60,\n    \"10\": 70,\n    \"12\": 80,\n    \"13\": 90,\n    \"15\": 100\n}\n\n    msg.payload = percentages[msg.payload]\n\n    return [msg];\n\n\n\n\n//msg.payload.print.big_fan1_speed_pct = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed_pct = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed_pct = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed_pct = percentages[msg.payload.print.cooling_fan_speed]\n\n// Overwrite\n//msg.payload.print.big_fan1_speed = percentages[msg.payload.print.big_fan1_speed]\n//msg.payload.print.big_fan2_speed = percentages[msg.payload.print.big_fan2_speed]\n//msg.payload.print.heatbreak_fan_speed = percentages[msg.payload.print.heatbreak_fan_speed]\n//msg.payload.print.cooling_fan_speed = percentages[msg.payload.print.cooling_fan_speed]\n\n\n//node.send(msg)",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 560,
                    "y": 240,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "21081e6a23dc83a1",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "19ede36faf38f69b",
                    "name": "remaining_time",
                    "func": "//var timeleft = 3727; //1h:2m:7s\n//Umrechnung in Stunden, Minuten, Sekunden\n\nvar hour = Math.floor((msg.payload % 3600) / 60);\nvar minute = Math.floor(msg.payload % 60);\n\n//Den String von Stunden, Minuten und Sekunden auf 2 Stellen ändern\nif (hour < 10) {\nhour = \"0\" + hour;\n}\n\nif (minute < 10) {\nminute = \"0\" + minute;\n}\n\n\nmsg.payload = hour + \":\" + minute;\n\n\n\n\nreturn msg;\n\n",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 540,
                    "y": 320,
                    "wires": [
                        [
                            "9fadcc36a22ec38b"
                        ]
                    ]
                },
                {
                    "id": "cd5f62e24a3e846f",
                    "type": "function",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "erstelle Jarvis Benachrichtigung",
                    "func": "var jarvisNotify = {};\n//Beispiele\njarvisNotify.title = \"Abschalten nicht möglich\";\njarvisNotify.caption = \"\"; // wird unter dem Titel angezeigt\njarvisNotify.message = '<b>Ich drucke gerade, die Steckdose abzuschalten wäre eine blöde Idee!</b>';\n// Alternative Möglichkeiten\n//jarvisNotify.message= '<img src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></img>'; //Klappt, wird komplett angezeigt\n//jarvisNotify.message= '<iFrame src=\"http://192.168.178.89/download/Weltkarte.jpg\" height=\"auto\" width=\"100%\"></iFrame>'; //Klappt nicht, nur Teil wird angezeigt\n//jarvisNotify.message= getState('0_userdata.0.jarvis.pollenflug.Html').val;\n//jarvisNotify.message= getState('0_userdata.0.Html.HTML').val;\n//jarvisNotify.state = \"unread\";          //Damit bleibt die Benachrichtigung auch nach POPUP ungelesen und wird oben angezeigt mit der Zahl\njarvisNotify.criticality = \"error\";      // error,warning,info,success\njarvisNotify.display = \"popup\";          //drawer,snackbar,popup, none für focusTab\njarvisNotify.timeout = 10000;  //10000ms -> 10 Sekunden\n//jarvisNotify.timeout = 15000;  //5000ms -> 5 Sekunden\n//jarvisNotify.spinner= false; // drehender dreiViertel Kreis\njarvisNotify.progress = true;\njarvisNotify.position = \"top-left\";\njarvisNotify.icon = \"ic:outline-error\"; //mdi Iconify battery-alert-variant-outline\njarvisNotify.iconColor = \"white\";\njarvisNotify.color = \"red\";\njarvisNotify.textColor = \"white\";\nmsg.payload = JSON.stringify(jarvisNotify);\nreturn msg;",
                    "outputs": 1,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 710,
                    "y": 540,
                    "wires": [
                        [
                            "964df5b70be104e6"
                        ]
                    ]
                },
                {
                    "id": "964df5b70be104e6",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Datenpunkt Jarvis Benachrichtigung",
                    "topic": "jarvis.0.addNotification",
                    "ack": "false",
                    "autoCreate": "false",
                    "stateName": "",
                    "role": "",
                    "payloadType": "",
                    "readonly": "",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1030,
                    "y": 540,
                    "wires": []
                },
                {
                    "id": "ebace1619b2a4e15",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "> oder < als 1",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "gt",
                            "v": "1",
                            "vt": "str"
                        },
                        {
                            "t": "lt",
                            "v": "1",
                            "vt": "str"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 440,
                    "y": 540,
                    "wires": [
                        [
                            "cd5f62e24a3e846f",
                            "72cb87b2b06c4f05"
                        ],
                        [
                            "aeb883c176549af3"
                        ]
                    ],
                    "outputLabels": [
                        "Druck aktiv",
                        "Druck nicht aktiv"
                    ]
                },
                {
                    "id": "3143caf661f13237",
                    "type": "ioBroker get",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "heatbreak_fan_speed",
                    "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                    "attrname": "payload",
                    "payloadType": "value",
                    "errOnInvalidState": "nothing",
                    "x": 220,
                    "y": 540,
                    "wires": [
                        [
                            "ebace1619b2a4e15"
                        ]
                    ]
                },
                {
                    "id": "aeb883c176549af3",
                    "type": "change",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "setze msg.payload auf false",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "false",
                            "tot": "bool"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 700,
                    "y": 580,
                    "wires": [
                        [
                            "4ce8104a4e434a82"
                        ]
                    ]
                },
                {
                    "id": "f683e53accbca89f",
                    "type": "ioBroker in",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Schalter in Dashboard (Steckdose Drucker)",
                    "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                    "payloadType": "value",
                    "onlyack": "",
                    "func": "all",
                    "gap": "",
                    "fireOnStart": "false",
                    "outFormat": "MQTT",
                    "x": 280,
                    "y": 460,
                    "wires": [
                        [
                            "cff0b21c459cab43"
                        ]
                    ]
                },
                {
                    "id": "cff0b21c459cab43",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "TRUE oder FALSE?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "true"
                        },
                        {
                            "t": "false"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 220,
                    "y": 500,
                    "wires": [
                        [
                            "4ce8104a4e434a82"
                        ],
                        [
                            "3143caf661f13237"
                        ]
                    ]
                },
                {
                    "id": "64fa2ca669c5a78d",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Schalter in Dashboard (Steckdose Drucker)",
                    "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                    "ack": "false",
                    "autoCreate": "true",
                    "stateName": "",
                    "role": "",
                    "payloadType": "boolean",
                    "readonly": "false",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1090,
                    "y": 480,
                    "wires": []
                },
                {
                    "id": "72cb87b2b06c4f05",
                    "type": "change",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "setze msg.payload auf true",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "true",
                            "tot": "bool"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 700,
                    "y": 460,
                    "wires": [
                        [
                            "64fa2ca669c5a78d"
                        ]
                    ]
                },
                {
                    "id": "b5c862f5d50c56cb",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "4380d7035264bead",
                    "name": "FALSE oder nicht?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "false"
                        },
                        {
                            "t": "else"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 1230,
                    "y": 160,
                    "wires": [
                        [
                            "144c29803a38e2a4"
                        ],
                        [
                            "2e71b198fe06ccdb"
                        ]
                    ]
                },
                {
                    "id": "2e71b198fe06ccdb",
                    "type": "change",
                    "z": "9582121ff81174a6",
                    "g": "4380d7035264bead",
                    "name": "setze msg.payload auf online",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "online",
                            "tot": "str"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 1260,
                    "y": 240,
                    "wires": [
                        [
                            "3a131237a7bdec9d"
                        ]
                    ]
                },
                {
                    "id": "144c29803a38e2a4",
                    "type": "change",
                    "z": "9582121ff81174a6",
                    "g": "4380d7035264bead",
                    "name": "setze msg.payload auf offline",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "offline",
                            "tot": "str"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 1260,
                    "y": 200,
                    "wires": [
                        [
                            "3a131237a7bdec9d"
                        ]
                    ]
                },
                {
                    "id": "4ce8104a4e434a82",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Datenpunkt Steckdose Drucker An/AUS",
                    "topic": "alias.0.Buero.3D-Drucker.SET",
                    "ack": "false",
                    "autoCreate": "false",
                    "stateName": "",
                    "role": "",
                    "payloadType": "",
                    "readonly": "",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 740,
                    "y": 500,
                    "wires": []
                },
                {
                    "id": "3a131237a7bdec9d",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "4380d7035264bead",
                    "name": "Datenpunkt Verbindungsstatus des Druckers",
                    "topic": "0_userdata.0.X1C.Verbindungsstatus",
                    "ack": "false",
                    "autoCreate": "true",
                    "stateName": "",
                    "role": "",
                    "payloadType": "string",
                    "readonly": "false",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1290,
                    "y": 280,
                    "wires": []
                },
                {
                    "id": "e0079711246b60b0",
                    "type": "comment",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Abschalten verhindern, wenn Heatbreak_Fan_Speed über 1 (Düse ist heiß)",
                    "info": "",
                    "x": 380,
                    "y": 420,
                    "wires": []
                },
                {
                    "id": "1d943caf9a8bc0f6",
                    "type": "ioBroker get",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
                    "topic": "0_userdata.0.X1C.automatisch_abschalten",
                    "attrname": "payload",
                    "payloadType": "value",
                    "errOnInvalidState": "nothing",
                    "x": 340,
                    "y": 720,
                    "wires": [
                        [
                            "c8abbf4d53a09ffe"
                        ]
                    ]
                },
                {
                    "id": "ff01d8a59e17dc93",
                    "type": "inject",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "alle 10 Min. TRUE senden",
                    "props": [
                        {
                            "p": "payload"
                        }
                    ],
                    "repeat": "600",
                    "crontab": "",
                    "once": false,
                    "onceDelay": 0.1,
                    "topic": "",
                    "payload": "true",
                    "payloadType": "bool",
                    "x": 240,
                    "y": 820,
                    "wires": [
                        [
                            "1d943caf9a8bc0f6"
                        ]
                    ]
                },
                {
                    "id": "c8abbf4d53a09ffe",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "TRUE?",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "true"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 1,
                    "x": 180,
                    "y": 760,
                    "wires": [
                        [
                            "c5c06330d2e576f6"
                        ]
                    ]
                },
                {
                    "id": "f97a028e21d51bfb",
                    "type": "switch",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "> oder < als 1",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "gt",
                            "v": "1",
                            "vt": "str"
                        },
                        {
                            "t": "lt",
                            "v": "1",
                            "vt": "str"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 560,
                    "y": 760,
                    "wires": [
                        [],
                        [
                            "cac765606601d65c"
                        ]
                    ],
                    "outputLabels": [
                        "Druck aktiv",
                        "Druck nicht aktiv"
                    ]
                },
                {
                    "id": "c5c06330d2e576f6",
                    "type": "ioBroker get",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "heatbreak_fan_speed",
                    "topic": "0_userdata.0.X1C.print.heatbreak_fan_speed",
                    "attrname": "payload",
                    "payloadType": "value",
                    "errOnInvalidState": "nothing",
                    "x": 360,
                    "y": 760,
                    "wires": [
                        [
                            "f97a028e21d51bfb"
                        ]
                    ]
                },
                {
                    "id": "cac765606601d65c",
                    "type": "change",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "setze msg.payload auf false",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "false",
                            "tot": "bool"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 780,
                    "y": 760,
                    "wires": [
                        [
                            "ae46dbed7e5925ae",
                            "445ce2a0ad0a534a",
                            "0c5048b46f072d52"
                        ]
                    ]
                },
                {
                    "id": "ae46dbed7e5925ae",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Datenpunkt Steckdose Drucker An/AUS",
                    "topic": "alias.0.Buero.3D-Drucker.SET",
                    "ack": "false",
                    "autoCreate": "false",
                    "stateName": "",
                    "role": "",
                    "payloadType": "",
                    "readonly": "",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1120,
                    "y": 720,
                    "wires": []
                },
                {
                    "id": "445ce2a0ad0a534a",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Schalter im Dashboard (Steckdose automatisch abschalten)",
                    "topic": "0_userdata.0.X1C.automatisch_abschalten",
                    "ack": "false",
                    "autoCreate": "true",
                    "stateName": "",
                    "role": "",
                    "payloadType": "boolean",
                    "readonly": "false",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1180,
                    "y": 800,
                    "wires": []
                },
                {
                    "id": "79d8f512af50dd04",
                    "type": "comment",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "automatisch Abschalten nach Druck",
                    "info": "",
                    "x": 260,
                    "y": 680,
                    "wires": []
                },
                {
                    "id": "0c5048b46f072d52",
                    "type": "ioBroker out",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "Schalter in Dashboard (Steckdose Drucker)",
                    "topic": "0_userdata.0.X1C.Steckdose-Steuerung",
                    "ack": "false",
                    "autoCreate": "true",
                    "stateName": "",
                    "role": "",
                    "payloadType": "boolean",
                    "readonly": "false",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 1130,
                    "y": 760,
                    "wires": []
                },
                {
                    "id": "5c0e9eddf913e64d",
                    "type": "inject",
                    "z": "9582121ff81174a6",
                    "g": "c3f9f96853c3f09c",
                    "name": "nur zum Testen",
                    "props": [
                        {
                            "p": "payload"
                        }
                    ],
                    "repeat": "",
                    "crontab": "",
                    "once": false,
                    "onceDelay": 0.1,
                    "topic": "",
                    "payload": "true",
                    "payloadType": "bool",
                    "x": 1180,
                    "y": 420,
                    "wires": [
                        [
                            "4ce8104a4e434a82"
                        ]
                    ]
                },
                {
                    "id": "d2a5ed4e2b8c8674",
                    "type": "ping",
                    "z": "9582121ff81174a6",
                    "g": "4380d7035264bead",
                    "protocol": "IPv4",
                    "mode": "timed",
                    "name": "Ping IP des Druckers",
                    "host": "192.168.0.111",
                    "timer": "60",
                    "inputs": 0,
                    "x": 1200,
                    "y": 120,
                    "wires": [
                        [
                            "b5c862f5d50c56cb"
                        ]
                    ]
                },
                {
                    "id": "84f61d394ba2ab34",
                    "type": "mqtt-broker",
                    "name": "Bambu X1C MQTT Bambu_X1C",
                    "broker": "IP_Deines_Druckers",
                    "port": "8883",
                    "tls": "",
                    "clientid": "",
                    "autoConnect": true,
                    "usetls": true,
                    "protocolVersion": "4",
                    "keepalive": "60",
                    "cleansession": true,
                    "birthTopic": "",
                    "birthQos": "0",
                    "birthPayload": "",
                    "birthMsg": {},
                    "closeTopic": "",
                    "closeQos": "0",
                    "closePayload": "",
                    "closeMsg": {},
                    "willTopic": "",
                    "willQos": "0",
                    "willPayload": "",
                    "willMsg": {},
                    "userProps": "",
                    "sessionExpiry": ""
                }
            ]
            

            a6b8157c-4eab-4adb-8239-61b1a747c063-image.png

            Nun auf den Flow 15 klicken (der Name kann per Doppelklick jederzeit geändert werden:

            954dd30c-67d0-49e0-928d-d030f4446bb6-image.png

            Hier seht ihr nun den Flow in seiner vollen Pracht :-)
            Allerdings haben wir noch einen Fehler, da die Ping Node fehlt:

            3beacdea-ecbc-4327-ac98-8d5796ac8582-image.png

            Um das zu beheben klickt ihr wieder oben rechts auf das Burgermenü und auf Palette verwalten:

            16ebcde0-b624-4a38-b3a2-3c722efc9119-image.png

            Reiter Installation anklicken, Suchbegriff Ping eingeben und beim ersten Eintrag auf Installieren klicken:

            ed75d327-daab-457b-88f9-0758f27bf97f-image.png

            In der Meldung ebenfalls auf Installieren klicken:

            a15378d3-8eaa-49ce-a16b-1effa6761166-image.png

            Das Ganze übernehmen (oben rechts auf Deploy klicken):

            234c3c71-0040-454b-ab8a-17a58d63da07-image.png

            Einstellungen

            Doppelklick auf die MQTT Node um die Einstellungen zu gelangen:

            6c7be134-2bc1-4f41-aa61-ea07cb1a16a0-image.png

            Die Seriennummer deines Druckers eintragen und auf den Reiter Sicherheit klicken:

            f3bc9d1e-8a58-422a-a41e-b1a42c81b9ee-image.png

            Bitte auch https://forum.iobroker.net/post/943312 beachten.


            PS:

            Das soll kein Node-Red Zwang werden.
            Das Ganze klappt garantiert auch mit Blockly und/ oder anderen Scripten.
            Kann ich aber nicht und möchte ich auch nicht.
            Wer Bock auf Node-Red hat, kann diese Anleitung nutzen, wer keinen Bock darauf hat, lässt es halt sein 😉

            PPS:
            Der Fairness halber geht auch ein großer Dank an die Jungs (und Mädels?) aus dem Home Assistant Forum, da dort die initialen Funktionen zum Interprätieren der MQTT Daten des Bambus aufgedröselt wurden.


            https://community.home-assistant.io/t/bambu-lab-x1-x1c-mqtt/489510

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

            @djalexz einen Fehler habe ich in deiner Anleitung gefunden. Im Node-Red Screenshot der Adapterkonfig muss noch die Option Erstellen von Fremdobjekten zulassen aktiviert sein.

            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.

            D mickymM 2 Antworten Letzte Antwort
            1
            • mickymM mickym

              @djalexz einen Fehler habe ich in deiner Anleitung gefunden. Im Node-Red Screenshot der Adapterkonfig muss noch die Option Erstellen von Fremdobjekten zulassen aktiviert sein.

              D Offline
              D Offline
              djalexz
              schrieb am zuletzt editiert von
              #74

              @mickym Oh ja vielen Dank. Habs korrigiert.

              1 Antwort Letzte Antwort
              0
              • mickymM mickym

                @djalexz einen Fehler habe ich in deiner Anleitung gefunden. Im Node-Red Screenshot der Adapterkonfig muss noch die Option Erstellen von Fremdobjekten zulassen aktiviert sein.

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

                @mickym immer wieder interessant für was man negative Bewertungen bekommt

                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.

                D 1 Antwort Letzte Antwort
                0
                • mickymM mickym

                  @mickym immer wieder interessant für was man negative Bewertungen bekommt

                  D Offline
                  D Offline
                  djalexz
                  schrieb am zuletzt editiert von djalexz
                  #76

                  @mickym Hab mich verklickt 😅 (sollte nicht nebeneinander sein)
                  Oder Memo an mich selbst: Einfach besser schauen :-D

                  1 Antwort Letzte Antwort
                  0
                  • D djalexz

                    @dadonali Sehr gerne, wir Smarthomer müssen doch zusammenhalten 😁
                    Nein, das macht nix. Dann werden einfach dafür keine Werte geschrieben.

                    D Offline
                    D Offline
                    dadonali
                    schrieb am zuletzt editiert von
                    #77

                    @djalexz ich werde dann mal berichten ob es für den p1p auch läuft 😎👍

                    1 Antwort Letzte Antwort
                    0
                    • D Offline
                      D Offline
                      dadonali
                      schrieb am zuletzt editiert von
                      #78

                      So, ich hab mir das Ganze mal angeschaut und so eingestellt wie von djalexz gepostet :)
                      Doch gar nicht so schwierig wie gedacht :D

                      Allerdings weiß ich jetzt nicht genau wie ich prüfen kann, ob er sauber die Verbindung hergestellt hat :joy: .

                      Unter ioBroker sehe ich unter den Datenpunkten irgendwie noch keine Einträge. Ich hab mal die Screens angehangen, vielleicht sieht ja einer von euch noch einen Fehler :D

                      Bildschirm­foto 2023-02-14 um 18.18.09.png Bildschirm­foto 2023-02-14 um 18.18.01.png Bildschirm­foto 2023-02-14 um 18.17.51.png Bildschirm­foto 2023-02-14 um 18.17.47.png Bildschirm­foto 2023-02-14 um 18.17.41.png Bildschirm­foto 2023-02-14 um 18.17.30.png

                      mickymM D 2 Antworten Letzte Antwort
                      0
                      • D dadonali

                        So, ich hab mir das Ganze mal angeschaut und so eingestellt wie von djalexz gepostet :)
                        Doch gar nicht so schwierig wie gedacht :D

                        Allerdings weiß ich jetzt nicht genau wie ich prüfen kann, ob er sauber die Verbindung hergestellt hat :joy: .

                        Unter ioBroker sehe ich unter den Datenpunkten irgendwie noch keine Einträge. Ich hab mal die Screens angehangen, vielleicht sieht ja einer von euch noch einen Fehler :D

                        Bildschirm­foto 2023-02-14 um 18.18.09.png Bildschirm­foto 2023-02-14 um 18.18.01.png Bildschirm­foto 2023-02-14 um 18.17.51.png Bildschirm­foto 2023-02-14 um 18.17.47.png Bildschirm­foto 2023-02-14 um 18.17.41.png Bildschirm­foto 2023-02-14 um 18.17.30.png

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

                        @dadonali Am Besten ist Du machst eine Debug Node hinter Deine mqtt-Node und schaust ob was rauskommt.

                        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
                        • D dadonali

                          So, ich hab mir das Ganze mal angeschaut und so eingestellt wie von djalexz gepostet :)
                          Doch gar nicht so schwierig wie gedacht :D

                          Allerdings weiß ich jetzt nicht genau wie ich prüfen kann, ob er sauber die Verbindung hergestellt hat :joy: .

                          Unter ioBroker sehe ich unter den Datenpunkten irgendwie noch keine Einträge. Ich hab mal die Screens angehangen, vielleicht sieht ja einer von euch noch einen Fehler :D

                          Bildschirm­foto 2023-02-14 um 18.18.09.png Bildschirm­foto 2023-02-14 um 18.18.01.png Bildschirm­foto 2023-02-14 um 18.17.51.png Bildschirm­foto 2023-02-14 um 18.17.47.png Bildschirm­foto 2023-02-14 um 18.17.41.png Bildschirm­foto 2023-02-14 um 18.17.30.png

                          D Offline
                          D Offline
                          djalexz
                          schrieb am zuletzt editiert von djalexz
                          #80

                          @dadonali setz mal eine Debug Node an die JSON or Obj to IOBroker Node.
                          Einfach in der linken Leiste den grünen Debiug Baustein per Drag & Drop auf das Feld unter der JSON or Obj to IOBroker Node ziehen und mittels Drag & Drop die beiden Nodes miteinander verbinden:

                          424fbb48-c7d9-4a80-978b-27a7ab1ab61c-image.png

                          Dann Deploy und schauen ob auf der rechten Seite Daten ankommen:

                          983e2161-c918-4479-ad1e-f78f31fec0ac-image.png
                          Darauf achten, dass der Knopf mit dem Käfer angeklickt ist.

                          Edit: Oh @mickym war schneller :-D

                          Ps: @dadonali es sieht bei deinem Screenshot so aus, als ob du nicht auf Deploy geklickt hättest. Kann das sein?
                          Sonst müssten unter den Nodes sowas wie Verbunden o.Ä. stehen.

                          mickymM D 2 Antworten Letzte Antwort
                          0
                          • D djalexz

                            @dadonali setz mal eine Debug Node an die JSON or Obj to IOBroker Node.
                            Einfach in der linken Leiste den grünen Debiug Baustein per Drag & Drop auf das Feld unter der JSON or Obj to IOBroker Node ziehen und mittels Drag & Drop die beiden Nodes miteinander verbinden:

                            424fbb48-c7d9-4a80-978b-27a7ab1ab61c-image.png

                            Dann Deploy und schauen ob auf der rechten Seite Daten ankommen:

                            983e2161-c918-4479-ad1e-f78f31fec0ac-image.png
                            Darauf achten, dass der Knopf mit dem Käfer angeklickt ist.

                            Edit: Oh @mickym war schneller :-D

                            Ps: @dadonali es sieht bei deinem Screenshot so aus, als ob du nicht auf Deploy geklickt hättest. Kann das sein?
                            Sonst müssten unter den Nodes sowas wie Verbunden o.Ä. stehen.

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

                            @djalexz sagte in Bambu lab 3d Drucker MQTT Integration:

                            Edit: Oh @mickym war schneller

                            Macht nichts - ich überlasse Dir gern den Support - da ich ja keinen Drucker habe. ;) - Ich kann ja nur allgemeine Tipps geben. ;)

                            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
                            • D djalexz

                              @dadonali setz mal eine Debug Node an die JSON or Obj to IOBroker Node.
                              Einfach in der linken Leiste den grünen Debiug Baustein per Drag & Drop auf das Feld unter der JSON or Obj to IOBroker Node ziehen und mittels Drag & Drop die beiden Nodes miteinander verbinden:

                              424fbb48-c7d9-4a80-978b-27a7ab1ab61c-image.png

                              Dann Deploy und schauen ob auf der rechten Seite Daten ankommen:

                              983e2161-c918-4479-ad1e-f78f31fec0ac-image.png
                              Darauf achten, dass der Knopf mit dem Käfer angeklickt ist.

                              Edit: Oh @mickym war schneller :-D

                              Ps: @dadonali es sieht bei deinem Screenshot so aus, als ob du nicht auf Deploy geklickt hättest. Kann das sein?
                              Sonst müssten unter den Nodes sowas wie Verbunden o.Ä. stehen.

                              D Offline
                              D Offline
                              dadonali
                              schrieb am zuletzt editiert von dadonali
                              #82

                              @djalexz Kommt leider nix an.

                              Ich hab aber solche Meldung im Protokoll von ioBroker, aber ich finde solch einen Eintrag nicht in den Adapter Einstellungen.

                              Bildschirm­foto 2023-02-14 um 18.34.03.png Bildschirm­foto 2023-02-14 um 18.33.58.png

                              EDIT: Jetzt kommt was durch :)

                              Bildschirm­foto 2023-02-14 um 18.37.47.png

                              D 2 Antworten Letzte Antwort
                              0
                              • D dadonali

                                @djalexz Kommt leider nix an.

                                Ich hab aber solche Meldung im Protokoll von ioBroker, aber ich finde solch einen Eintrag nicht in den Adapter Einstellungen.

                                Bildschirm­foto 2023-02-14 um 18.34.03.png Bildschirm­foto 2023-02-14 um 18.33.58.png

                                EDIT: Jetzt kommt was durch :)

                                Bildschirm­foto 2023-02-14 um 18.37.47.png

                                D Offline
                                D Offline
                                djalexz
                                schrieb am zuletzt editiert von djalexz
                                #83

                                @dadonali bitte lösche den Flow nochmal und importiere meinen Flow nochmal. Ich habe dort was geändert.
                                Doppelklick auf den Flow und oben auf löschen.

                                Ansonsten Doppelklick auf die Node, die er im Protokoll anmeckert und so einstellen:

                                cc24a86a-0fd1-4921-8fa4-c3dc8c2d309d-image.png

                                1 Antwort Letzte Antwort
                                0
                                • D dadonali

                                  @djalexz Kommt leider nix an.

                                  Ich hab aber solche Meldung im Protokoll von ioBroker, aber ich finde solch einen Eintrag nicht in den Adapter Einstellungen.

                                  Bildschirm­foto 2023-02-14 um 18.34.03.png Bildschirm­foto 2023-02-14 um 18.33.58.png

                                  EDIT: Jetzt kommt was durch :)

                                  Bildschirm­foto 2023-02-14 um 18.37.47.png

                                  D Offline
                                  D Offline
                                  djalexz
                                  schrieb am zuletzt editiert von
                                  #84

                                  @dadonali ah ok. Was hast du gemacht?

                                  D 1 Antwort Letzte Antwort
                                  0
                                  • D djalexz

                                    @dadonali ah ok. Was hast du gemacht?

                                    D Offline
                                    D Offline
                                    dadonali
                                    schrieb am zuletzt editiert von
                                    #85

                                    @djalexz

                                    Port auf 1883 lassen , TLS aus und keine Zugangsdaten nutzen. Da der P1P noch kein Firmware Update bekommen hat, gabs hier wohl noch keine Anpassung wie beim X1.

                                    Sollte ich dein Flow dennoch nochmal neu rein machen? Weil ich habe aktuell noch ein paar Logs welche mich verwirren. Bildschirm­foto 2023-02-14 um 18.41.50.png

                                    D mickymM 2 Antworten Letzte Antwort
                                    0
                                    • D dadonali

                                      @djalexz

                                      Port auf 1883 lassen , TLS aus und keine Zugangsdaten nutzen. Da der P1P noch kein Firmware Update bekommen hat, gabs hier wohl noch keine Anpassung wie beim X1.

                                      Sollte ich dein Flow dennoch nochmal neu rein machen? Weil ich habe aktuell noch ein paar Logs welche mich verwirren. Bildschirm­foto 2023-02-14 um 18.41.50.png

                                      D Offline
                                      D Offline
                                      djalexz
                                      schrieb am zuletzt editiert von djalexz
                                      #86

                                      @dadonali Ah ok. Guter Hinweis mit der Firmware. Ich bin jetzt von der neuesten Firmware ausgegangen.

                                      Du kannst auch die Datenpunkte, die er anmeckert im ioBroker manuell anlegen.
                                      Dann kommen die Meldungen nicht mehr.

                                      Und du solltest dann auch mal jede Node durchgehen (Doppelklicken) und die Namen bzw. Datenpunkte anpassen.
                                      Alles was X1C heißt in P1P umbenennen.

                                      Oder noch einfacher:

                                      Mein Flow Export komplett ins Notepad ++ schmeißen und alle X1C mit P1P ersetzen.

                                      Das geht schon beim Verteiler los, da die Datenpunkte ja wie gesagt für einen X1C angelegt werden.

                                      b8e31b7f-9b9f-497f-ae6f-09b4deda86c0-image.png

                                      1 Antwort Letzte Antwort
                                      0
                                      • D dadonali

                                        @djalexz

                                        Port auf 1883 lassen , TLS aus und keine Zugangsdaten nutzen. Da der P1P noch kein Firmware Update bekommen hat, gabs hier wohl noch keine Anpassung wie beim X1.

                                        Sollte ich dein Flow dennoch nochmal neu rein machen? Weil ich habe aktuell noch ein paar Logs welche mich verwirren. Bildschirm­foto 2023-02-14 um 18.41.50.png

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

                                        @dadonali Die Datenpunkte werde teileweise falsch gesetzt - wieso unter node-red.0 - alles muss unter userdata. Ich würde alle Datenpunkte löschen und nochmal neu anlegen lassen. Der Datentyp wird automatisch erstellt, je nach Datentyp der drin steht. Also keine Datentyp in der iobroker-Out node festlegen- Im Prinzip macht man die Datenpunkte auch auf ReadOnly und nicht writeable - und nimmt als Type value und nicht command.

                                        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.

                                        D 1 Antwort Letzte Antwort
                                        0
                                        • mickymM mickym

                                          @dadonali Die Datenpunkte werde teileweise falsch gesetzt - wieso unter node-red.0 - alles muss unter userdata. Ich würde alle Datenpunkte löschen und nochmal neu anlegen lassen. Der Datentyp wird automatisch erstellt, je nach Datentyp der drin steht. Also keine Datentyp in der iobroker-Out node festlegen- Im Prinzip macht man die Datenpunkte auch auf ReadOnly und nicht writeable - und nimmt als Type value und nicht command.

                                          D Offline
                                          D Offline
                                          dadonali
                                          schrieb am zuletzt editiert von
                                          #88

                                          @mickym den bezug auf node-red.0 habe ich eigentlich nirgendwo gesetzt.

                                          Er hat mir jetzt auch unter userdata einen Arsch voll Datenpunkte reingeknallt wie man sieht . Ich habe diese Punkte mit den Steckdose im Node mal rausgenommen, da ich die soweit nicht nutze aktuell.

                                          Sollte ich trotzdem nochmal alles löschen und neu generieren lassen? Viele Punkte kamen auch erst dazu nachdem ich einen Print gestartet hatte.

                                          Bildschirm­foto 2023-02-14 um 18.51.55.png Bildschirm­foto 2023-02-14 um 18.52.01.png Bildschirm­foto 2023-02-14 um 18.51.49.png

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


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          602

                                          Online

                                          32.4k

                                          Benutzer

                                          81.4k

                                          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