Smick - system 8

Smick: system 7 servo

[
    {
        "id": "99832b2a.e0b728",
        "type": "tab",
        "label": "console"
    },
    {
        "id": "31e0a7cd.fa3838",
        "type": "tab",
        "label": "status"
    },
    {
        "id": "c92818ac.b52cd8",
        "type": "tab",
        "label": "digital_output"
    },
    {
        "id": "8687af10.572f9",
        "type": "tab",
        "label": "analog_output"
    },
    {
        "id": "9a91c110.77f7c",
        "type": "tab",
        "label": "alarm"
    },
    {
        "id": "e82eefd6.a4c5e",
        "type": "tab",
        "label": "digital_input"
    },
    {
        "id": "3702931e.5e738c",
        "type": "tab",
        "label": "analog_input"
    },
    {
        "id": "275be6c8.9765ca",
        "type": "tab",
        "label": "RF_transmitter"
    },
    {
        "id": "f4607959.7d6668",
        "type": "tab",
        "label": "RF_receiver"
    },
    {
        "id": "da947ec3.ec3b6",
        "type": "tab",
        "label": "servo"
    },
    {
        "id": "f1f7b732.115e58",
        "type": "mqtt-broker",
        "z": "",
        "broker": "m20.cloudmqtt.com",
        "port": "14596",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "300",
        "cleansession": true,
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": ""
    },
    {
        "id": "aa68c8b.6122f38",
        "type": "ui_base",
        "z": "",
        "name": "Node-RED Dashboard",
        "theme": "theme-light"
    },
    {
        "id": "bae954d2.2d65b8",
        "type": "ui_group",
        "z": "",
        "name": "Group 1",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "c6de9562.f34328",
        "type": "ui_group",
        "z": "",
        "name": "Default",
        "tab": "",
        "disp": true,
        "width": "6"
    },
    {
        "id": "5d7872d5.99e1cc",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "27dc875b.c61da8",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "465e2982.371928",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "f4652c38.539e6",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "2fb4e76.9ec5c18",
        "type": "ui_group",
        "z": "",
        "name": "digital output",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "9b895ead.8e0b9",
        "type": "ui_group",
        "z": "",
        "name": "analogic output",
        "tab": "",
        "order": 2,
        "disp": true,
        "width": "6"
    },
    {
        "id": "d8e00c2d.d71ea",
        "type": "ui_group",
        "z": "",
        "name": "Soil Moisture",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "9488c7a0.65a508",
        "type": "ui_group",
        "z": "",
        "name": "Button",
        "tab": "",
        "order": 1,
        "disp": false,
        "width": "6"
    },
    {
        "id": "88009d74.33b17",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "ab80aedb.3888e",
        "type": "ui_tab",
        "z": "",
        "name": "Console",
        "icon": "dashboard",
        "order": 1
    },
    {
        "id": "7ef139c9.2f1b68",
        "type": "ui_group",
        "z": "",
        "name": "console",
        "tab": "ab80aedb.3888e",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "f142a68c.ec9b78",
        "type": "ui_tab",
        "z": "",
        "name": "Output",
        "icon": "dashboard",
        "order": 2
    },
    {
        "id": "e0cb4cdb.63ad1",
        "type": "ui_group",
        "z": "",
        "name": "digital",
        "tab": "f142a68c.ec9b78",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "8557c687.af1ee8",
        "type": "ui_group",
        "z": "",
        "name": "status",
        "tab": "ab80aedb.3888e",
        "order": 2,
        "disp": true,
        "width": "6"
    },
    {
        "id": "9afd09b1.9a0ca8",
        "type": "ui_group",
        "z": "",
        "name": "analog",
        "tab": "f142a68c.ec9b78",
        "order": 2,
        "disp": true,
        "width": "6"
    },
    {
        "id": "22823145.22de6e",
        "type": "ui_tab",
        "z": "",
        "name": "Digital Input",
        "icon": "dashboard",
        "order": 4
    },
    {
        "id": "65a1418e.b6f28",
        "type": "ui_group",
        "z": "",
        "name": "digital",
        "tab": "22823145.22de6e",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "86ea6b6a.d47108",
        "type": "ui_group",
        "z": "",
        "name": "analog",
        "tab": "7322b823.63cff8",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "923532ba.bbecd",
        "type": "ui_group",
        "name": "Group 1",
        "tab": "",
        "order": 1,
        "disp": true,
        "width": 6
    },
    {
        "id": "72b0e336.ccb27c",
        "type": "ui_group",
        "name": "Group 2",
        "tab": "",
        "order": 2,
        "disp": true,
        "width": 6
    },
    {
        "id": "7322b823.63cff8",
        "type": "ui_tab",
        "z": "",
        "name": "Analog Input",
        "icon": "dashboard",
        "order": 5
    },
    {
        "id": "27378c0c.6e2e24",
        "type": "ui_tab",
        "z": "",
        "name": "RF transmitter",
        "icon": "dashboard",
        "order": 6
    },
    {
        "id": "42bc99ae.399958",
        "type": "ui_group",
        "z": "",
        "name": "remote control",
        "tab": "27378c0c.6e2e24",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "aa924b55.c86d28",
        "type": "ui_group",
        "z": "",
        "name": "appliances",
        "tab": "27378c0c.6e2e24",
        "order": 2,
        "disp": true,
        "width": "6"
    },
    {
        "id": "325b8f2a.81b9c",
        "type": "ui_tab",
        "z": "",
        "name": "RF receiver",
        "icon": "dashboard",
        "order": 7
    },
    {
        "id": "16021f01.431691",
        "type": "ui_group",
        "z": "",
        "name": "remote control sniffer",
        "tab": "325b8f2a.81b9c",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "2451cd5c.4c3ca2",
        "type": "ui_group",
        "z": "",
        "name": "last 2 codes sniffed",
        "tab": "325b8f2a.81b9c",
        "order": 2,
        "disp": true,
        "width": "6"
    },
    {
        "id": "cc55b72f.70a438",
        "type": "ui_group",
        "z": "",
        "name": "send code",
        "tab": "27378c0c.6e2e24",
        "order": 3,
        "disp": true,
        "width": "6"
    },
    {
        "id": "ad6ccfa1.8a66",
        "type": "mqtt-broker",
        "z": "",
        "broker": "ffacraspberry.ddns.net",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "60",
        "cleansession": true,
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": ""
    },
    {
        "id": "863c500e.7b0ed",
        "type": "ui_tab",
        "z": "",
        "name": "Alarm",
        "icon": "dashboard",
        "order": 3
    },
    {
        "id": "ac2c3bbd.d56b88",
        "type": "ui_group",
        "z": "",
        "name": "disable/enable",
        "tab": "863c500e.7b0ed",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "388b7d32.3cb0b2",
        "type": "ui_tab",
        "z": "",
        "name": "Servo",
        "icon": "dashboard",
        "order": 8
    },
    {
        "id": "3c95e254.db1e3e",
        "type": "ui_group",
        "z": "",
        "name": "servo",
        "tab": "388b7d32.3cb0b2",
        "order": 1,
        "disp": false,
        "width": "6"
    },
    {
        "id": "91906fbb.9ae2c",
        "type": "ui_button",
        "z": "c92818ac.b52cd8",
        "name": "",
        "group": "e0cb4cdb.63ad1",
        "order": 1,
        "width": "3",
        "height": "1",
        "label": "LED Off",
        "color": "",
        "icon": "",
        "payload": "LED=0",
        "payloadType": "str",
        "topic": "",
        "x": 240,
        "y": 180,
        "wires": [
            [
                "762ef096.45083"
            ]
        ]
    },
    {
        "id": "d0804f0d.40e38",
        "type": "ui_button",
        "z": "c92818ac.b52cd8",
        "name": "",
        "group": "e0cb4cdb.63ad1",
        "order": 2,
        "width": "3",
        "height": "1",
        "label": "LED On",
        "color": "",
        "icon": "",
        "payload": "LED=1",
        "payloadType": "str",
        "topic": "",
        "x": 240,
        "y": 260,
        "wires": [
            [
                "762ef096.45083"
            ]
        ]
    },
    {
        "id": "762ef096.45083",
        "type": "link out",
        "z": "c92818ac.b52cd8",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 465,
        "y": 260,
        "wires": []
    },
    {
        "id": "590dc6a1.d29938",
        "type": "ui_switch",
        "z": "c92818ac.b52cd8",
        "name": "",
        "label": "D2 Off/On",
        "group": "e0cb4cdb.63ad1",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "D2=1",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "D2=0",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 250,
        "y": 340,
        "wires": [
            [
                "762ef096.45083"
            ]
        ]
    },
    {
        "id": "59f636e9.386df8",
        "type": "comment",
        "z": "c92818ac.b52cd8",
        "name": "Description",
        "info": "Smick_03_digital_output\n____________________________________________________________________\nPackage : Smick v.1\nModule  : digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    None\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 140,
        "y": 80,
        "wires": []
    },
    {
        "id": "3c152fed.cb93f",
        "type": "mqtt out",
        "z": "99832b2a.e0b728",
        "name": "smick cmd",
        "topic": "smick/feeds/I3523215361",
        "qos": "0",
        "retain": "true",
        "broker": "f1f7b732.115e58",
        "x": 850,
        "y": 180,
        "wires": []
    },
    {
        "id": "c22255.a359dda8",
        "type": "debug",
        "z": "99832b2a.e0b728",
        "name": "command",
        "active": true,
        "console": "false",
        "complete": "payload",
        "x": 660,
        "y": 120,
        "wires": []
    },
    {
        "id": "889e7272.f931",
        "type": "ui_text_input",
        "z": "99832b2a.e0b728",
        "name": "",
        "label": "command",
        "group": "7ef139c9.2f1b68",
        "order": 1,
        "width": "0",
        "height": "0",
        "passthru": true,
        "mode": "text",
        "delay": "0",
        "topic": "",
        "x": 440,
        "y": 180,
        "wires": [
            [
                "3c152fed.cb93f",
                "c22255.a359dda8"
            ]
        ]
    },
    {
        "id": "c18e937d.7756c",
        "type": "comment",
        "z": "99832b2a.e0b728",
        "name": "Description",
        "info": "Smick_01_console\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : console\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\nQuesto flusso costruisce un cruscotto console per interagire con smick tramite feed mqtt.\nSi possono inviare comandi sul feed di input di smick e ricevere risposte o eventi dal feed di output di smick.\nContiene inoltre un nodo link di input per consentire ad altri flussi l'invio di comandi e un nodo link di output per smistare risposte/eventi ricevuti ad altri flussi.\nInfine i messaggi inviati e le risposte / eventi ricevuti sono elencati su debug tab mediante nodi debug.\nIl pulsante RESET invia un comando REESET a Smick.\n\nThis flow builds a dashboard console to interact with Smick through MQTT feed.\nYou can send commands on Smick input feed and receive answers or events from Smick output feed.\nIt also contains an input node link to allow other flows sending commands and an output node link to direct responses / events received to other flows.\nFinally sent messages and replies / received events are listed on debug tab using debug nodes.\nThe button RESET send RESET command to Smick.\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    None\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 120,
        "y": 60,
        "wires": []
    },
    {
        "id": "1096456f.bfc93b",
        "type": "link in",
        "z": "99832b2a.e0b728",
        "name": "command",
        "links": [
            "2b8ff9bd.7a7ec6",
            "762ef096.45083",
            "881b41f1.88da6",
            "98549741.e92a08",
            "adef054f.686cc8",
            "e015f8cc.f9dd68",
            "e4526f09.eb336",
            "b3748c72.61874"
        ],
        "x": 200,
        "y": 180,
        "wires": [
            [
                "889e7272.f931"
            ]
        ]
    },
    {
        "id": "429b7532.4537cc",
        "type": "ui_text",
        "z": "31e0a7cd.fa3838",
        "group": "8557c687.af1ee8",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "x": 730,
        "y": 200,
        "wires": []
    },
    {
        "id": "6a993042.d9618",
        "type": "switch",
        "z": "31e0a7cd.fa3838",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "DISC",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "outputs": 2,
        "x": 350,
        "y": 180,
        "wires": [
            [
                "f02fa603.561938",
                "48210721.75ecf8"
            ],
            [
                "d85aa277.4e1b6"
            ]
        ]
    },
    {
        "id": "f02fa603.561938",
        "type": "change",
        "z": "31e0a7cd.fa3838",
        "name": "PING",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "PING",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 530,
        "y": 120,
        "wires": [
            [
                "881b41f1.88da6"
            ]
        ]
    },
    {
        "id": "593d4ddb.8b7894",
        "type": "link in",
        "z": "31e0a7cd.fa3838",
        "name": "event",
        "links": [
            "6d1e6792.b4da98"
        ],
        "x": 195,
        "y": 180,
        "wires": [
            [
                "6a993042.d9618"
            ]
        ]
    },
    {
        "id": "881b41f1.88da6",
        "type": "link out",
        "z": "31e0a7cd.fa3838",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 915,
        "y": 120,
        "wires": []
    },
    {
        "id": "48210721.75ecf8",
        "type": "change",
        "z": "31e0a7cd.fa3838",
        "name": "disconnected",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "disconnected",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 180,
        "wires": [
            [
                "429b7532.4537cc"
            ]
        ]
    },
    {
        "id": "d85aa277.4e1b6",
        "type": "change",
        "z": "31e0a7cd.fa3838",
        "name": "connected",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "connected",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 240,
        "wires": [
            [
                "429b7532.4537cc"
            ]
        ]
    },
    {
        "id": "f5d2f0c4.a111f",
        "type": "comment",
        "z": "31e0a7cd.fa3838",
        "name": "Description",
        "info": "Smick_02_status\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : status\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    console\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 140,
        "y": 60,
        "wires": []
    },
    {
        "id": "772a2c1a.7cc8a4",
        "type": "ui_button",
        "z": "31e0a7cd.fa3838",
        "name": "",
        "group": "8557c687.af1ee8",
        "order": 3,
        "width": 0,
        "height": 0,
        "label": "reset",
        "color": "",
        "icon": "",
        "payload": "RESET",
        "payloadType": "str",
        "topic": "",
        "x": 730,
        "y": 340,
        "wires": [
            [
                "881b41f1.88da6"
            ]
        ]
    },
    {
        "id": "490bf569.5df81c",
        "type": "ui_slider",
        "z": "8687af10.572f9",
        "name": "",
        "label": "D2 PWM",
        "group": "9afd09b1.9a0ca8",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "min": "0",
        "max": "100",
        "step": "1",
        "x": 220,
        "y": 340,
        "wires": [
            [
                "39c62157.e0b85e"
            ]
        ]
    },
    {
        "id": "2b8ff9bd.7a7ec6",
        "type": "link out",
        "z": "8687af10.572f9",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 735,
        "y": 340,
        "wires": []
    },
    {
        "id": "39c62157.e0b85e",
        "type": "range",
        "z": "8687af10.572f9",
        "minin": "0",
        "maxin": "100",
        "minout": "0",
        "maxout": "1023",
        "action": "scale",
        "round": true,
        "name": "0..1023",
        "x": 420,
        "y": 340,
        "wires": [
            [
                "b0ef9cd5.defbb"
            ]
        ]
    },
    {
        "id": "d0a2ad0b.1ec3b",
        "type": "comment",
        "z": "8687af10.572f9",
        "name": "analogic output (PWM)",
        "info": "",
        "x": 260,
        "y": 240,
        "wires": []
    },
    {
        "id": "8e3013c5.d98f3",
        "type": "comment",
        "z": "8687af10.572f9",
        "name": "Description",
        "info": "Smick_04_analog_output\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : console\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.17  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\nQuesto flusso costruisce un cruscotto contenente un nodo slider per regolare la luminosità del LED.\nI comandi generati sono inviati a smick tramite il flusso \"dasboard console\".\n\nThis flow builds a dashboard that contains a slider node to regulate the LED brightness.\nThe generated commands are sent to Smick through \"dasboard console\" flow\".\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n    1 LED connected to smick \n\nHW Connections:\n\n    Device  pin     Smick pin\n    LED     +       D2\n    LED     -       GND\n\nFlow Connections:\n\n    console\n\nAccount:\n\n    Wi-Fi credentials\n    MQTT broker\n    FRED\n",
        "x": 220,
        "y": 140,
        "wires": []
    },
    {
        "id": "9a0095c7.dde578",
        "type": "trigger",
        "z": "e82eefd6.a4c5e",
        "op1": "LED=1",
        "op2": "LED=0",
        "op1type": "str",
        "op2type": "str",
        "duration": "5",
        "extend": false,
        "units": "s",
        "reset": "",
        "name": "led on 5sec",
        "x": 570,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "6f854012.79d",
        "type": "ui_gauge",
        "z": "e82eefd6.a4c5e",
        "name": "Button",
        "group": "65a1418e.b6f28",
        "order": 2,
        "width": "3",
        "height": "3",
        "gtype": "donut",
        "title": "click event",
        "label": "click",
        "format": "{{value}}",
        "min": 0,
        "max": "1",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "x": 790,
        "y": 380,
        "wires": []
    },
    {
        "id": "7606ed9f.9465e4",
        "type": "ui_chart",
        "z": "e82eefd6.a4c5e",
        "name": "click",
        "group": "65a1418e.b6f28",
        "order": 3,
        "width": "0",
        "height": "0",
        "label": "click history",
        "chartType": "line",
        "legend": "false",
        "xformat": "%H:%M:%S",
        "interpolate": "step-after",
        "nodata": "push switch",
        "ymin": "0",
        "ymax": "1",
        "removeOlder": "60",
        "removeOlderUnit": "60",
        "x": 790,
        "y": 440,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "e90e5c40.f2d55",
        "type": "trigger",
        "z": "e82eefd6.a4c5e",
        "op1": "1",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "1",
        "extend": true,
        "units": "s",
        "reset": "",
        "name": "",
        "x": 560,
        "y": 400,
        "wires": [
            [
                "6f854012.79d",
                "7606ed9f.9465e4"
            ]
        ]
    },
    {
        "id": "ae183781.d756f8",
        "type": "comment",
        "z": "e82eefd6.a4c5e",
        "name": "actions on actuators",
        "info": "",
        "x": 590,
        "y": 220,
        "wires": []
    },
    {
        "id": "b21099e2.9a96e8",
        "type": "comment",
        "z": "e82eefd6.a4c5e",
        "name": "actions on dashboard",
        "info": "",
        "x": 600,
        "y": 340,
        "wires": []
    },
    {
        "id": "725a97ae.623098",
        "type": "comment",
        "z": "e82eefd6.a4c5e",
        "name": "actions on social (alarm)",
        "info": "",
        "x": 610,
        "y": 480,
        "wires": []
    },
    {
        "id": "4ce92a8b.692514",
        "type": "comment",
        "z": "e82eefd6.a4c5e",
        "name": "enable/disable",
        "info": "",
        "x": 580,
        "y": 60,
        "wires": []
    },
    {
        "id": "eb233c89.538f4",
        "type": "ui_switch",
        "z": "e82eefd6.a4c5e",
        "name": "",
        "label": "D3 button disable/enable",
        "group": "65a1418e.b6f28",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "click==d3=0",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "click==null",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 850,
        "y": 160,
        "wires": [
            [
                "e4526f09.eb336"
            ]
        ]
    },
    {
        "id": "b87d5235.0fe9",
        "type": "switch",
        "z": "e82eefd6.a4c5e",
        "name": "parse",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "CONN",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "CLICK",
                "vt": "str"
            }
        ],
        "checkall": "false",
        "outputs": 2,
        "x": 270,
        "y": 400,
        "wires": [
            [
                "9733586c.818348"
            ],
            [
                "9a0095c7.dde578",
                "e90e5c40.f2d55",
                "1166fb27.3795a5"
            ]
        ]
    },
    {
        "id": "e8410a86.195ec8",
        "type": "link in",
        "z": "e82eefd6.a4c5e",
        "name": "event",
        "links": [
            "6d1e6792.b4da98"
        ],
        "x": 155,
        "y": 400,
        "wires": [
            [
                "b87d5235.0fe9"
            ]
        ]
    },
    {
        "id": "e4526f09.eb336",
        "type": "link out",
        "z": "e82eefd6.a4c5e",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 1015,
        "y": 120,
        "wires": []
    },
    {
        "id": "9733586c.818348",
        "type": "change",
        "z": "e82eefd6.a4c5e",
        "name": "setup",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "click==d3=0",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 120,
        "wires": [
            [
                "e4526f09.eb336"
            ]
        ]
    },
    {
        "id": "738599c0.741078",
        "type": "comment",
        "z": "e82eefd6.a4c5e",
        "name": "Description",
        "info": "Smick_06_digital_input\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : console\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.17  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n    1 Button connected to smick \n\nHW Connections:\n\n    Device  pin     Smick pin\n    Button  1       D3\n    Button  2       GND\n\nFlow Connections:\n\n    console\n\nAccount:\n\n    Wi-Fi credentials\n    MQTT broker\n    FRED\n",
        "x": 180,
        "y": 60,
        "wires": []
    },
    {
        "id": "98549741.e92a08",
        "type": "link out",
        "z": "3702931e.5e738c",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 875,
        "y": 360,
        "wires": []
    },
    {
        "id": "5cd4b0bc.61ec4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "event",
        "info": "",
        "x": 210,
        "y": 600,
        "wires": []
    },
    {
        "id": "4a4dc18.d303b4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "Description",
        "info": "Smick_07_analog_input\n\nQuesto flusso mostra l'uso di sensori analogici (Potentiometer, LDR,...).\nSi apprenderà come configurare smick per generare:\n- sequenze di misure lette dal sensore;\n- l'evento LOW quando le misure scendono al di sotto di una soglia data;\n- l'evento HIGH quando le misure superano una soglia data.\nLa dashboard associata consente di:\n- abilitare/disabilitare i suddetti eventi;\n- di visualizzare in tempo reale le misure ricevute su un indicatore (gauge);\n- di visualizzare l'ultimo allarme LOW/HIGH rilevato ed inviato su e-mail e twitter.\n\n\nThis flow shows the use of analog sensors (potentiometer, LDR, ...).\nYou will learn how to configure Smick to generate:\n- Measurement sequences read from the sensor;\n- The LOW event when measurements fall below a certain threshold;\n- The High event when measurements exceed a certain threshold.\nThe associated dashboard allows you to:\n- Enable / disable these events;\n- Measurements of real-time display on a received indicator (gauge);\n- Displays the last LOW / HIGH detected and sent to e-mail alarm and Twitter.",
        "x": 130,
        "y": 80,
        "wires": []
    },
    {
        "id": "f67a6c9.bbf979",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "Licence & History",
        "info": "Package : Smick v.1\nModule  : LED - digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.17  Curci   genesis",
        "x": 300,
        "y": 80,
        "wires": []
    },
    {
        "id": "b321816d.e6643",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "BOM",
        "info": "Bill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n    1 Pot | LDR + 10kohm resistor\n\nHW Connections:\n\n    Device  pin     Smick pin\n    Pot     left    GND\n    Pot     center  A0\n    Pot     right   3.3V\n    \n    or \n    \n    Device  pin     Smick pin    \n    LDR     1       GND\n    LDR     2       A0\n    R 10k   1       A0\n    R 10k   2       GND\n\nFlow Connections:\n\n    Smick_001_console\n\nAccount:\n\n    Wi-Fi credentials\n    MQTT broker\n    FRED\n    E-mail\n    Twitter\n",
        "x": 450,
        "y": 80,
        "wires": []
    },
    {
        "id": "e34ada82.ce1898",
        "type": "ui_gauge",
        "z": "3702931e.5e738c",
        "name": "analog sensor",
        "group": "86ea6b6a.d47108",
        "order": 2,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "sensor",
        "label": "",
        "format": "{{value}}",
        "min": 0,
        "max": "1023",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "x": 760,
        "y": 660,
        "wires": []
    },
    {
        "id": "55489c49.1210f4",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "enable/disable",
        "info": "",
        "x": 580,
        "y": 300,
        "wires": []
    },
    {
        "id": "265dc9e1.2f9e86",
        "type": "ui_dropdown",
        "z": "3702931e.5e738c",
        "name": "",
        "label": "mode",
        "group": "86ea6b6a.d47108",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "options": [
            {
                "label": "disable",
                "value": "[email protected],A0==NULL",
                "type": "str"
            },
            {
                "label": "enable",
                "value": "[email protected]",
                "type": "str"
            },
            {
                "label": "set LOW alarm",
                "value": "LOW==A0<200",
                "type": "str"
            },
            {
                "label": "set HIGH alarm",
                "value": "HIGH==A0>800",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "",
        "x": 730,
        "y": 360,
        "wires": [
            [
                "98549741.e92a08"
            ]
        ]
    },
    {
        "id": "1e4f5474.11f4cc",
        "type": "link in",
        "z": "3702931e.5e738c",
        "name": "event",
        "links": [
            "6d1e6792.b4da98"
        ],
        "x": 215,
        "y": 640,
        "wires": [
            [
                "719ce64b.0350e8"
            ]
        ]
    },
    {
        "id": "719ce64b.0350e8",
        "type": "switch",
        "z": "3702931e.5e738c",
        "name": "parse",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "CONN",
                "vt": "str"
            },
            {
                "t": "regex",
                "v": "HIGH|LOW",
                "vt": "str",
                "case": false
            },
            {
                "t": "btwn",
                "v": "0",
                "vt": "num",
                "v2": "1023",
                "v2t": "num"
            }
        ],
        "checkall": "false",
        "outputs": 3,
        "x": 330,
        "y": 640,
        "wires": [
            [
                "d0f542c0.413dd"
            ],
            [
                "b9fd2ce1.0ec86"
            ],
            [
                "e34ada82.ce1898"
            ]
        ]
    },
    {
        "id": "482e9040.a9f8d",
        "type": "comment",
        "z": "9a91c110.77f7c",
        "name": "actions on social: connect here -->   ",
        "info": "",
        "x": 620,
        "y": 480,
        "wires": []
    },
    {
        "id": "7cad7d96.3a8054",
        "type": "function",
        "z": "9a91c110.77f7c",
        "name": "alarm msg",
        "func": "function timeDate(tz) {\n    var d = new Date(Date.now()+tz*3600000);\n\n    return  d.getUTCHours() + \":\" +\n            format00(d.getUTCMinutes()) + \":\" +\n            format00(d.getUTCSeconds()) + \" \" +\n            d.getUTCDate()\t+\"/\" +\n            (d.getUTCMonth()+1) + \"/\" +\n            d.getUTCFullYear();\n}\n\nfunction format00(n) {return n<10?\"0\"+n:n;}\n\nmsg.payload+=\" alarm at \" + timeDate(1);\nmsg.topic=\"\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 324,
        "y": 200,
        "wires": [
            [
                "14723a39.e0ae46",
                "7793d4f7.5a1d0c",
                "9c8d1981.a26848",
                "fc65738e.f26ef"
            ]
        ]
    },
    {
        "id": "14723a39.e0ae46",
        "type": "debug",
        "z": "9a91c110.77f7c",
        "name": "alarm",
        "active": true,
        "console": "false",
        "complete": "payload",
        "x": 710,
        "y": 200,
        "wires": []
    },
    {
        "id": "61ffee35.3803f",
        "type": "e-mail",
        "z": "9a91c110.77f7c",
        "server": "smtp.gmail.com",
        "port": "465",
        "name": "[email protected]",
        "dname": "mail",
        "x": 710,
        "y": 360,
        "wires": []
    },
    {
        "id": "b0ffd0cb.8b316",
        "type": "twitter out",
        "z": "9a91c110.77f7c",
        "twitter": "",
        "name": "tweet",
        "x": 710,
        "y": 420,
        "wires": []
    },
    {
        "id": "f9dd7f46.64f3",
        "type": "comment",
        "z": "9a91c110.77f7c",
        "name": "Description",
        "info": "Smick_05_alarm\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : alarm\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    console\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 160,
        "y": 60,
        "wires": []
    },
    {
        "id": "5487d125.734a9",
        "type": "link in",
        "z": "9a91c110.77f7c",
        "name": "alarm",
        "links": [
            "1166fb27.3795a5",
            "b9fd2ce1.0ec86"
        ],
        "x": 149,
        "y": 200,
        "wires": [
            [
                "7cad7d96.3a8054"
            ]
        ]
    },
    {
        "id": "f0f35773.02c258",
        "type": "ui_toast",
        "z": "9a91c110.77f7c",
        "position": "top right",
        "displayTime": "3",
        "name": "",
        "x": 740,
        "y": 300,
        "wires": []
    },
    {
        "id": "1166fb27.3795a5",
        "type": "link out",
        "z": "e82eefd6.a4c5e",
        "name": "alarm",
        "links": [
            "5487d125.734a9"
        ],
        "x": 515,
        "y": 540,
        "wires": []
    },
    {
        "id": "b9fd2ce1.0ec86",
        "type": "link out",
        "z": "3702931e.5e738c",
        "name": "alarm",
        "links": [
            "5487d125.734a9"
        ],
        "x": 515,
        "y": 500,
        "wires": []
    },
    {
        "id": "d0f542c0.413dd",
        "type": "change",
        "z": "3702931e.5e738c",
        "name": "setup",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "HIGH==A0>800",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 360,
        "wires": [
            [
                "265dc9e1.2f9e86"
            ]
        ]
    },
    {
        "id": "2f437e43.95e222",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "actions on dashboard",
        "info": "",
        "x": 600,
        "y": 580,
        "wires": []
    },
    {
        "id": "d937e7d3.0a4af8",
        "type": "comment",
        "z": "3702931e.5e738c",
        "name": "actions on social (alarm)",
        "info": "",
        "x": 610,
        "y": 440,
        "wires": []
    },
    {
        "id": "adef054f.686cc8",
        "type": "link out",
        "z": "275be6c8.9765ca",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 795,
        "y": 380,
        "wires": []
    },
    {
        "id": "915a1708.ded2b8",
        "type": "comment",
        "z": "275be6c8.9765ca",
        "name": "Description",
        "info": "Smick_03_digital_output\n____________________________________________________________________\nPackage : Smick v.1\nModule  : digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    None\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 160,
        "y": 80,
        "wires": []
    },
    {
        "id": "64b2430f.5d517c",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "LED off/on",
        "group": "aa924b55.c86d28",
        "order": 1,
        "width": "3",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RF1=1000010000",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RF0=1000010000",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 310,
        "y": 260,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "c5fa727b.6ea9e",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "Light off/on",
        "group": "aa924b55.c86d28",
        "order": 2,
        "width": "3",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RF1=1000001000",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RF0=1000001000",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 310,
        "y": 320,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "3d9a845b.9bf70c",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "Printer off/on",
        "group": "aa924b55.c86d28",
        "order": 3,
        "width": "3",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RF1=1000000100",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RF0=1000000100",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 310,
        "y": 380,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "1befd5bc.ef783a",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "Speaker off/on",
        "group": "aa924b55.c86d28",
        "order": 4,
        "width": "3",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RF1=1000000010",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RF0=1000000010",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 320,
        "y": 440,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "38bcadd4.879262",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "D7 disable/enable",
        "group": "42bc99ae.399958",
        "order": 1,
        "width": "6",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RFT::D7",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RFT::NULL",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 330,
        "y": 200,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "23086c65.a55844",
        "type": "ui_switch",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "All off/on",
        "group": "aa924b55.c86d28",
        "order": 4,
        "width": "6",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RF1=1000010000,RF1=1000001000,RF1=1000000100,RF1=1000000010",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RF0=1000010000,RF0=1000001000,RF0=1000000100,RF0=1000000010",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 300,
        "y": 500,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "e015f8cc.f9dd68",
        "type": "link out",
        "z": "f4607959.7d6668",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 1295,
        "y": 120,
        "wires": []
    },
    {
        "id": "2373e092.125a3",
        "type": "comment",
        "z": "f4607959.7d6668",
        "name": "Description",
        "info": "Smick_09_RF_transmitter_10\n______________________________________________________________\nPackage : Smick v.1\nModule  : digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    None\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 160,
        "y": 100,
        "wires": []
    },
    {
        "id": "10a3bb8.3f10745",
        "type": "ui_switch",
        "z": "f4607959.7d6668",
        "name": "",
        "label": "D6 disable/enable",
        "group": "16021f01.431691",
        "order": 1,
        "width": "6",
        "height": "1",
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "RFR::D6",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "RFR::NULL",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 1110,
        "y": 120,
        "wires": [
            [
                "e015f8cc.f9dd68"
            ]
        ]
    },
    {
        "id": "6dbc5ada.1624e4",
        "type": "link in",
        "z": "f4607959.7d6668",
        "name": "event",
        "links": [
            "6d1e6792.b4da98"
        ],
        "x": 155,
        "y": 380,
        "wires": [
            [
                "37083a2c.5cca96"
            ]
        ]
    },
    {
        "id": "29d97c07.24b3d4",
        "type": "ui_text",
        "z": "f4607959.7d6668",
        "group": "16021f01.431691",
        "order": 3,
        "width": "6",
        "height": "1",
        "name": "",
        "label": "RF code received",
        "format": "{{msg.payload.RF}}",
        "layout": "row-spread",
        "x": 1110,
        "y": 220,
        "wires": []
    },
    {
        "id": "ff659a14.8bc868",
        "type": "switch",
        "z": "f4607959.7d6668",
        "name": "parse RF",
        "property": "payload.RF",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "false",
        "outputs": 2,
        "x": 720,
        "y": 360,
        "wires": [
            [
                "666a27d6.1c9aa8",
                "29d97c07.24b3d4"
            ],
            []
        ]
    },
    {
        "id": "b114c83c.fd7928",
        "type": "json",
        "z": "f4607959.7d6668",
        "name": "",
        "x": 570,
        "y": 360,
        "wires": [
            [
                "ff659a14.8bc868"
            ]
        ]
    },
    {
        "id": "ff407e25.7cb1",
        "type": "change",
        "z": "f4607959.7d6668",
        "name": "' -> \"",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "'",
                "fromt": "str",
                "to": "\"",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 430,
        "y": 360,
        "wires": [
            [
                "b114c83c.fd7928"
            ]
        ]
    },
    {
        "id": "37083a2c.5cca96",
        "type": "switch",
        "z": "f4607959.7d6668",
        "name": "json {",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "regex",
                "v": "^{",
                "vt": "str",
                "case": true
            },
            {
                "t": "else"
            }
        ],
        "checkall": "false",
        "outputs": 2,
        "x": 290,
        "y": 380,
        "wires": [
            [
                "ff407e25.7cb1"
            ],
            []
        ]
    },
    {
        "id": "666a27d6.1c9aa8",
        "type": "function",
        "z": "f4607959.7d6668",
        "name": "mem",
        "func": "var c1 = context.global.c1;\nvar c2 = context.global.c2;\n\nvar c=msg.payload.RF;\n\nif (c) {\n    if (c!=c1 && c!=c2) {\n        c2=c1;c1=c;\n        context.global.c1=c1;\n        context.global.c2=c2;\n    }\n} \nvar msg1={payload:c1};\nvar msg2={payload:c2};\nreturn [msg1,msg2];\n\n",
        "outputs": "2",
        "noerr": 0,
        "x": 890,
        "y": 360,
        "wires": [
            [
                "f500eb4f.e99c78"
            ],
            [
                "f695a2ef.f71b4"
            ]
        ]
    },
    {
        "id": "205c0c57.5525b4",
        "type": "ui_text",
        "z": "99832b2a.e0b728",
        "group": "7ef139c9.2f1b68",
        "order": 2,
        "width": "0",
        "height": "0",
        "name": "",
        "label": "response/event",
        "format": "{{msg.payload}}",
        "layout": "col-center",
        "x": 460,
        "y": 320,
        "wires": []
    },
    {
        "id": "45f5d3e0.08f85c",
        "type": "mqtt in",
        "z": "99832b2a.e0b728",
        "name": "mqtt res/eve",
        "topic": "smick/feeds/O3523215361",
        "qos": "0",
        "broker": "f1f7b732.115e58",
        "x": 210,
        "y": 380,
        "wires": [
            [
                "205c0c57.5525b4",
                "69a7e083.af2d4",
                "6d1e6792.b4da98"
            ]
        ]
    },
    {
        "id": "69a7e083.af2d4",
        "type": "debug",
        "z": "99832b2a.e0b728",
        "name": "response/event",
        "active": true,
        "console": "false",
        "complete": "payload",
        "x": 660,
        "y": 380,
        "wires": []
    },
    {
        "id": "6d1e6792.b4da98",
        "type": "link out",
        "z": "99832b2a.e0b728",
        "name": "event",
        "links": [
            "1e4f5474.11f4cc",
            "593d4ddb.8b7894",
            "e8410a86.195ec8",
            "6dbc5ada.1624e4"
        ],
        "x": 395,
        "y": 460,
        "wires": []
    },
    {
        "id": "89fae756.adc068",
        "type": "ui_button",
        "z": "31e0a7cd.fa3838",
        "name": "",
        "group": "8557c687.af1ee8",
        "order": 2,
        "width": 0,
        "height": 0,
        "label": "restart",
        "color": "",
        "icon": "",
        "payload": "RESTART",
        "payloadType": "str",
        "topic": "",
        "x": 730,
        "y": 300,
        "wires": [
            [
                "881b41f1.88da6"
            ]
        ]
    },
    {
        "id": "f500eb4f.e99c78",
        "type": "ui_text",
        "z": "f4607959.7d6668",
        "group": "2451cd5c.4c3ca2",
        "order": 1,
        "width": "4",
        "height": "1",
        "name": "",
        "label": "RF code",
        "format": "{{msg.payload}}",
        "layout": "row-left",
        "x": 1060,
        "y": 300,
        "wires": []
    },
    {
        "id": "f695a2ef.f71b4",
        "type": "ui_text",
        "z": "f4607959.7d6668",
        "group": "2451cd5c.4c3ca2",
        "order": 3,
        "width": "4",
        "height": "1",
        "name": "",
        "label": "RF code",
        "format": "{{msg.payload}}",
        "layout": "row-left",
        "x": 1060,
        "y": 380,
        "wires": []
    },
    {
        "id": "406c80b.30b518",
        "type": "ui_button",
        "z": "f4607959.7d6668",
        "name": "",
        "group": "2451cd5c.4c3ca2",
        "order": 4,
        "width": "2",
        "height": "1",
        "label": "send",
        "color": "",
        "icon": "",
        "payload": "c1",
        "payloadType": "global",
        "topic": "",
        "x": 1210,
        "y": 300,
        "wires": [
            [
                "956ac70b.ab9768"
            ]
        ]
    },
    {
        "id": "8c475b9e.c48788",
        "type": "ui_text_input",
        "z": "275be6c8.9765ca",
        "name": "",
        "label": "RF code",
        "group": "cc55b72f.70a438",
        "order": 1,
        "width": "4",
        "height": "1",
        "passthru": true,
        "mode": "text",
        "delay": "0",
        "topic": "",
        "x": 300,
        "y": 620,
        "wires": [
            [
                "c69dfefc.271ec"
            ]
        ]
    },
    {
        "id": "f0175f39.1e657",
        "type": "ui_switch",
        "z": "9a91c110.77f7c",
        "name": "",
        "label": "notification",
        "group": "ac2c3bbd.d56b88",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "x": 330,
        "y": 300,
        "wires": [
            [
                "7793d4f7.5a1d0c"
            ]
        ]
    },
    {
        "id": "7793d4f7.5a1d0c",
        "type": "function",
        "z": "9a91c110.77f7c",
        "name": "off/on notif",
        "func": "var alnotif=context.get('alnotif')||false;\n\n\nvar c=msg.payload;\n\nif (c===true || c===false) {context.set('alnotif',c); return null;}\nif (alnotif===false) return null;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 540,
        "y": 300,
        "wires": [
            [
                "f0f35773.02c258"
            ]
        ]
    },
    {
        "id": "24a8ecff.451444",
        "type": "ui_switch",
        "z": "9a91c110.77f7c",
        "name": "",
        "label": "mail",
        "group": "ac2c3bbd.d56b88",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "x": 310,
        "y": 360,
        "wires": [
            [
                "9c8d1981.a26848"
            ]
        ]
    },
    {
        "id": "9c8d1981.a26848",
        "type": "function",
        "z": "9a91c110.77f7c",
        "name": "off/on mail",
        "func": "var almail=context.get('almail')||false;\n\n\nvar c=msg.payload;\n\nif (c===true || c===false) {context.set('almail',c); return null;}\nif (almail===false) return null;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 540,
        "y": 360,
        "wires": [
            [
                "61ffee35.3803f"
            ]
        ]
    },
    {
        "id": "d3a665c7.519718",
        "type": "ui_switch",
        "z": "9a91c110.77f7c",
        "name": "",
        "label": "tweet",
        "group": "ac2c3bbd.d56b88",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "x": 310,
        "y": 420,
        "wires": [
            [
                "fc65738e.f26ef"
            ]
        ]
    },
    {
        "id": "fc65738e.f26ef",
        "type": "function",
        "z": "9a91c110.77f7c",
        "name": "off/on tweet",
        "func": "var altweet=context.get('altweet')||false;\n\n\nvar c=msg.payload;\n\nif (c===true || c===false) {context.set('altweet',c); return null;}\nif (altweet===false) return null;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 550,
        "y": 420,
        "wires": [
            [
                "b0ffd0cb.8b316"
            ]
        ]
    },
    {
        "id": "8827c5f4.d9fa08",
        "type": "link in",
        "z": "275be6c8.9765ca",
        "name": "rftx",
        "links": [
            "956ac70b.ab9768"
        ],
        "x": 120,
        "y": 640,
        "wires": [
            [
                "8c475b9e.c48788"
            ]
        ]
    },
    {
        "id": "956ac70b.ab9768",
        "type": "link out",
        "z": "f4607959.7d6668",
        "name": "rftx",
        "links": [
            "8827c5f4.d9fa08",
            "cbbc467a.9df8c8"
        ],
        "x": 1395,
        "y": 300,
        "wires": []
    },
    {
        "id": "f7e20ebb.4b4d1",
        "type": "ui_button",
        "z": "f4607959.7d6668",
        "name": "",
        "group": "2451cd5c.4c3ca2",
        "order": 4,
        "width": "2",
        "height": "1",
        "label": "send",
        "color": "",
        "icon": "",
        "payload": "c2",
        "payloadType": "global",
        "topic": "",
        "x": 1210,
        "y": 380,
        "wires": [
            [
                "956ac70b.ab9768"
            ]
        ]
    },
    {
        "id": "c69dfefc.271ec",
        "type": "template",
        "z": "275be6c8.9765ca",
        "name": "RF=n",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "RFT::D7,RF={{payload}},RFT::NULL",
        "x": 450,
        "y": 620,
        "wires": [
            [
                "adef054f.686cc8"
            ]
        ]
    },
    {
        "id": "b0ef9cd5.defbb",
        "type": "template",
        "z": "8687af10.572f9",
        "name": "D2=n",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "D2={{payload}}",
        "x": 610,
        "y": 340,
        "wires": [
            [
                "2b8ff9bd.7a7ec6"
            ]
        ]
    },
    {
        "id": "b3748c72.61874",
        "type": "link out",
        "z": "da947ec3.ec3b6",
        "name": "command",
        "links": [
            "1096456f.bfc93b"
        ],
        "x": 775,
        "y": 380,
        "wires": []
    },
    {
        "id": "40533e1d.4abaa",
        "type": "comment",
        "z": "da947ec3.ec3b6",
        "name": "Description",
        "info": "Smick_03_digital_output\n____________________________________________________________________\nPackage : Smick v.1\nModule  : digital output\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.26  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n\nHW Connections:\n\n    None.\n\nFlow Connections:\n\n    None\n\nAccount:\n\n    Wi-Fi router\n    MQTT broker\n    FRED\n",
        "x": 140,
        "y": 80,
        "wires": []
    },
    {
        "id": "613f0daf.9dc234",
        "type": "template",
        "z": "da947ec3.ec3b6",
        "name": "SERVO=n",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "SERVO::D1,SERVO={{payload}},SERVO::NULL",
        "x": 640,
        "y": 380,
        "wires": [
            [
                "b3748c72.61874"
            ]
        ]
    },
    {
        "id": "4b0440a.81e1dc",
        "type": "ui_slider",
        "z": "da947ec3.ec3b6",
        "name": "",
        "label": "angle",
        "group": "3c95e254.db1e3e",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "",
        "min": 0,
        "max": "180",
        "step": "1",
        "x": 290,
        "y": 380,
        "wires": [
            [
                "613f0daf.9dc234",
                "5809e771.c48838"
            ]
        ]
    },
    {
        "id": "5809e771.c48838",
        "type": "ui_gauge",
        "z": "da947ec3.ec3b6",
        "name": "",
        "group": "3c95e254.db1e3e",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "servo",
        "label": "degrees",
        "format": "{{value}}",
        "min": 0,
        "max": "180",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "x": 460,
        "y": 280,
        "wires": []
    }
]
infosmick

Flow Info

created 7 months, 2 weeks ago

Node Types

Core
  • change (x6)
  • comment (x22)
  • debug (x3)
  • e-mail (x1)
  • function (x5)
  • json (x1)
  • mqtt in (x1)
  • mqtt out (x1)
  • mqtt-broker (x2)
  • range (x1)
  • switch (x5)
  • template (x3)
  • trigger (x2)
  • twitter out (x1)
Other
  • link in (x7)
  • link out (x12)
  • tab (x10)
  • ui_base (x1)
  • ui_button (x6)
  • ui_chart (x1)
  • ui_dropdown (x1)
  • ui_gauge (x3)
  • ui_group (x26)
  • ui_slider (x2)
  • ui_switch (x12)
  • ui_tab (x8)
  • ui_text (x5)
  • ui_text_input (x2)
  • ui_toast (x1)

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option