Skip to content

Instantly share code, notes, and snippets.

@vongomben
Created May 8, 2024 10:24
Show Gist options
  • Save vongomben/6626b8b1bfbf5ab815f5f4466628e0a3 to your computer and use it in GitHub Desktop.
Save vongomben/6626b8b1bfbf5ab815f5f4466628e0a3 to your computer and use it in GitHub Desktop.
[
{
"id": "b06c2c803aef9c2c",
"type": "mqtt in",
"z": "49c296de4b08b5cd",
"name": "",
"topic": "/notification-001",
"qos": "2",
"datatype": "json",
"broker": "020f27e0b0deb2a5",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 220,
"y": 700,
"wires": [
[
"36a70112b0cadd68"
]
]
},
{
"id": "39a14bb11ee7afcc",
"type": "debug",
"z": "49c296de4b08b5cd",
"name": "telegram sender",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 740,
"y": 700,
"wires": []
},
{
"id": "36a70112b0cadd68",
"type": "switch",
"z": "49c296de4b08b5cd",
"name": "maggiore di 5?",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gte",
"v": "5",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 360,
"y": 760,
"wires": [
[
"da43154ea904ce09"
]
]
},
{
"id": "da43154ea904ce09",
"type": "change",
"z": "49c296de4b08b5cd",
"name": "scrivi attenzione",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"chatId\":8004944,\"type\":\"message\",\"content\":\"attenzione!\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 700,
"wires": [
[
"fe9e6816189725b9"
]
]
},
{
"id": "6be707163a1e8522",
"type": "inject",
"z": "49c296de4b08b5cd",
"name": "true",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 270,
"y": 840,
"wires": [
[
"56912cae7b225663"
]
]
},
{
"id": "fdd4747142718a06",
"type": "inject",
"z": "49c296de4b08b5cd",
"name": "false",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 270,
"y": 880,
"wires": [
[
"56912cae7b225663"
]
]
},
{
"id": "56912cae7b225663",
"type": "change",
"z": "49c296de4b08b5cd",
"name": "",
"rules": [
{
"t": "set",
"p": "active",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 860,
"wires": [
[
"9480be391680d17e"
]
]
},
{
"id": "9480be391680d17e",
"type": "debug",
"z": "49c296de4b08b5cd",
"name": "debug 41",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 860,
"wires": []
},
{
"id": "fe9e6816189725b9",
"type": "switch",
"z": "49c296de4b08b5cd",
"name": "flow.active é true?",
"property": "active",
"propertyType": "flow",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 610,
"y": 760,
"wires": [
[
"39a14bb11ee7afcc"
]
]
},
{
"id": "020f27e0b0deb2a5",
"type": "mqtt-broker",
"name": "",
"broker": "broker.emqx.io",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment