Skip to content

Instantly share code, notes, and snippets.

@infosmick
Created December 29, 2016 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infosmick/03980b9711bf5f47a6c50acca0014ab4 to your computer and use it in GitHub Desktop.
Save infosmick/03980b9711bf5f47a6c50acca0014ab4 to your computer and use it in GitHub Desktop.
Smick_01_console

Console example

[
{
"id": "99832b2a.e0b728",
"type": "tab",
"label": "console"
},
{
"id": "a2910eae.04af2",
"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": 240,
"wires": []
},
{
"id": "4f7d5f64.a982a",
"type": "mqtt in",
"z": "99832b2a.e0b728",
"name": "mqtt res/eve",
"topic": "borot/feeds/O3300460880",
"qos": "0",
"broker": "f1f7b732.115e58",
"x": 210,
"y": 300,
"wires": [
[
"a2910eae.04af2",
"9590af23.c8f73",
"ca2d688.4211598"
]
]
},
{
"id": "9590af23.c8f73",
"type": "debug",
"z": "99832b2a.e0b728",
"name": "response/event",
"active": true,
"console": "false",
"complete": "payload",
"x": 660,
"y": 300,
"wires": []
},
{
"id": "3c152fed.cb93f",
"type": "mqtt out",
"z": "99832b2a.e0b728",
"name": "smick cmd",
"topic": "borot/feeds/I3300460880",
"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",
"e4526f09.eb336"
],
"x": 200,
"y": 180,
"wires": [
[
"889e7272.f931"
]
]
},
{
"id": "ca2d688.4211598",
"type": "link out",
"z": "99832b2a.e0b728",
"name": "event",
"links": [
"1e4f5474.11f4cc",
"593d4ddb.8b7894",
"e8410a86.195ec8"
],
"x": 395,
"y": 380,
"wires": []
},
{
"id": "7ef139c9.2f1b68",
"type": "ui_group",
"z": "",
"name": "console",
"tab": "ab80aedb.3888e",
"order": 1,
"disp": true,
"width": "6"
},
{
"id": "f1f7b732.115e58",
"type": "mqtt-broker",
"z": "",
"broker": "io.adafruit.com",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "300",
"cleansession": true,
"willTopic": "",
"willQos": "0",
"willPayload": "",
"birthTopic": "",
"birthQos": "0",
"birthPayload": ""
},
{
"id": "ab80aedb.3888e",
"type": "ui_tab",
"z": "",
"name": "Console",
"icon": "dashboard",
"order": 1
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment