Skip to content

Instantly share code, notes, and snippets.

@dexterlabora
Created October 4, 2018 12:45
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 dexterlabora/12b65ca6a0fff61d077a8004285b2897 to your computer and use it in GitHub Desktop.
Save dexterlabora/12b65ca6a0fff61d077a8004285b2897 to your computer and use it in GitHub Desktop.
[
{
"id": "fc8601c3.25e5b",
"type": "tab",
"label": "MV MQTT",
"disabled": false,
"info": ""
},
{
"id": "8a8e0f9e.ea00c",
"type": "mqtt in",
"z": "fc8601c3.25e5b",
"name": "/merakimv/Q2GV-AAAA-AAAA/#",
"topic": "/merakimv/Q2GV-AAAA-AAAA/#",
"qos": "0",
"broker": "37636477.51b7ac",
"x": 170,
"y": 80,
"wires": [
[
"eb606754.66b788"
]
]
},
{
"id": "604c4c16.e1feb4",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "mv12-0f:f0",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 630,
"y": 80,
"wires": []
},
{
"id": "d185b608.625128",
"type": "mqtt out",
"z": "fc8601c3.25e5b",
"name": "",
"topic": "test",
"qos": "",
"retain": "",
"broker": "37636477.51b7ac",
"x": 330,
"y": 660,
"wires": []
},
{
"id": "88568444.1c62c8",
"type": "inject",
"z": "fc8601c3.25e5b",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 660,
"wires": [
[
"d185b608.625128"
]
]
},
{
"id": "eb606754.66b788",
"type": "json",
"z": "fc8601c3.25e5b",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 390,
"y": 80,
"wires": [
[
"604c4c16.e1feb4",
"75acfd95.4c07e4"
]
]
},
{
"id": "75acfd95.4c07e4",
"type": "rbe",
"z": "fc8601c3.25e5b",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload.objects",
"x": 390,
"y": 120,
"wires": [
[
"6529d652.4110f8",
"17001206.6a5f7e"
]
]
},
{
"id": "6529d652.4110f8",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "rbe - mv12-0f:f0",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 680,
"y": 120,
"wires": []
},
{
"id": "ecd8f01e.f0134",
"type": "mqtt in",
"z": "fc8601c3.25e5b",
"name": "#",
"topic": "#",
"qos": "0",
"broker": "37636477.51b7ac",
"x": 90,
"y": 320,
"wires": [
[
"79fc6999.4b63d8"
]
]
},
{
"id": "a97e6246.68b71",
"type": "mqtt in",
"z": "fc8601c3.25e5b",
"name": "/merakimv/Q2GV-BBBB-BBBB/#",
"topic": "/merakimv/Q2GV-BBBB-BBBB/#",
"qos": "0",
"broker": "37636477.51b7ac",
"x": 170,
"y": 180,
"wires": [
[
"e93d754a.66d828"
]
]
},
{
"id": "bca23dfc.8180f",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "MV12w-desk-06",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 640,
"y": 180,
"wires": []
},
{
"id": "e93d754a.66d828",
"type": "json",
"z": "fc8601c3.25e5b",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 390,
"y": 180,
"wires": [
[
"bca23dfc.8180f",
"62aba78a.346d88"
]
]
},
{
"id": "62aba78a.346d88",
"type": "rbe",
"z": "fc8601c3.25e5b",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload.objects",
"x": 390,
"y": 220,
"wires": [
[
"f9fa5b02.cfec08",
"fd0648fc.587678"
]
]
},
{
"id": "f9fa5b02.cfec08",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "rbe - MV12w-desk-06",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 700,
"y": 220,
"wires": []
},
{
"id": "c09123ac.d662a",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "ALL #",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 610,
"y": 320,
"wires": []
},
{
"id": "79fc6999.4b63d8",
"type": "json",
"z": "fc8601c3.25e5b",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 390,
"y": 320,
"wires": [
[
"c09123ac.d662a",
"de856bbe.e01078"
]
]
},
{
"id": "de856bbe.e01078",
"type": "rbe",
"z": "fc8601c3.25e5b",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload.objects",
"x": 390,
"y": 360,
"wires": [
[
"e4a5bcf9.b1d4c",
"5893046c.c1585c"
]
]
},
{
"id": "e4a5bcf9.b1d4c",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "rbe - all",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 660,
"y": 360,
"wires": []
},
{
"id": "30330019.0bdba",
"type": "http request",
"z": "fc8601c3.25e5b",
"name": "Photon2",
"method": "POST",
"ret": "obj",
"url": "",
"tls": "",
"x": 400,
"y": 560,
"wires": [
[
"480c914a.263b5"
]
]
},
{
"id": "a6ac1383.e5a89",
"type": "inject",
"z": "fc8601c3.25e5b",
"name": "On",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 540,
"wires": [
[
"fdbd8815.7401d8"
]
]
},
{
"id": "5015e2ab.5c7bac",
"type": "inject",
"z": "fc8601c3.25e5b",
"name": "Off",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 580,
"wires": [
[
"c87f5775.31c268"
]
]
},
{
"id": "480c914a.263b5",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "photon response",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 570,
"y": 560,
"wires": []
},
{
"id": "fdbd8815.7401d8",
"type": "function",
"z": "fc8601c3.25e5b",
"name": "on",
"func": "msg.payload = {\"arg\":\"on\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 540,
"wires": [
[
"30330019.0bdba"
]
]
},
{
"id": "c87f5775.31c268",
"type": "function",
"z": "fc8601c3.25e5b",
"name": "off",
"func": "msg.payload = {\"arg\":\"off\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 580,
"wires": [
[
"30330019.0bdba"
]
]
},
{
"id": "32a21405.3b76ac",
"type": "link in",
"z": "fc8601c3.25e5b",
"name": "Photon",
"links": [
"fd0648fc.587678",
"17001206.6a5f7e",
"5893046c.c1585c"
],
"x": 95,
"y": 460,
"wires": [
[
"e57b1279.4422"
]
]
},
{
"id": "9bc3e69f.c7ff88",
"type": "comment",
"z": "fc8601c3.25e5b",
"name": "IoT Alarm - Particle Photon with LED and Buzzer",
"info": "",
"x": 220,
"y": 420,
"wires": []
},
{
"id": "81ee6a4f.31aa88",
"type": "inject",
"z": "fc8601c3.25e5b",
"name": "Trigger",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 500,
"wires": [
[
"998cac95.9a19f"
]
]
},
{
"id": "998cac95.9a19f",
"type": "function",
"z": "fc8601c3.25e5b",
"name": "trigger",
"func": "msg.payload = {\"arg\":\"trigger\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 500,
"wires": [
[
"30330019.0bdba"
]
]
},
{
"id": "17001206.6a5f7e",
"type": "link out",
"z": "fc8601c3.25e5b",
"name": "MV12 2gfx",
"links": [
"32a21405.3b76ac"
],
"x": 495,
"y": 140,
"wires": []
},
{
"id": "fd0648fc.587678",
"type": "link out",
"z": "fc8601c3.25e5b",
"name": "Alerts - MV12 XUKP",
"links": [
"32a21405.3b76ac"
],
"x": 495,
"y": 240,
"wires": []
},
{
"id": "da1c6412.44af78",
"type": "debug",
"z": "fc8601c3.25e5b",
"name": "photon trigger event",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 780,
"y": 460,
"wires": []
},
{
"id": "e57b1279.4422",
"type": "switch",
"z": "fc8601c3.25e5b",
"name": "payload.objects.length >= 1",
"property": "payload.objects.length",
"propertyType": "msg",
"rules": [
{
"t": "gte",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 320,
"y": 460,
"wires": [
[
"da1c6412.44af78",
"998cac95.9a19f"
]
]
},
{
"id": "85f948fe.45ce18",
"type": "delay",
"z": "fc8601c3.25e5b",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 580,
"y": 480,
"wires": [
[]
]
},
{
"id": "5893046c.c1585c",
"type": "link out",
"z": "fc8601c3.25e5b",
"name": "MV #",
"links": [
"32a21405.3b76ac"
],
"x": 495,
"y": 380,
"wires": []
},
{
"id": "37636477.51b7ac",
"type": "mqtt-broker",
"z": "",
"name": "dietpi",
"broker": "192.168.0.20",
"port": "1883",
"clientid": "thinkpad",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment