Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Created March 4, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save IT-Berater/ca7d6ef930a131f1d447ef5d150bcd9d to your computer and use it in GitHub Desktop.
Save IT-Berater/ca7d6ef930a131f1d447ef5d150bcd9d to your computer and use it in GitHub Desktop.
Airplane Emergency Message With Twitter And Pushover

7700 - Luftnotfall (emergency; seven-seven - going to heaven / falling from heaven / pray to heaven)

7600 - Funkausfall (radio failure; seven-six - hear nix / radio nix / need a radio fix)

7500 – Flugzeugentführung (hijacking; seven-five - man with a knife)

See http://blog.wenzlaff.de/?p=9738

[
{
"id": "b1463674.fcf8e",
"type": "tab",
"label": "Flugnotfall",
"disabled": false,
"info": ""
},
{
"id": "f12f52b6.5691d",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "http://www.kleinhirn.eu",
"info": "",
"x": 1040,
"y": 460,
"wires": []
},
{
"id": "13c00892.15e197",
"type": "http request",
"z": "b1463674.fcf8e",
"name": "Server abfragen",
"method": "GET",
"ret": "obj",
"url": "http://10.0.7.32/dump1090/data/aircraft.json",
"tls": "",
"x": 220,
"y": 160,
"wires": [
[
"20a9c05c.e34b48"
]
]
},
{
"id": "7d9662e9.de4454",
"type": "inject",
"z": "b1463674.fcf8e",
"name": "Alle 10 Sekunden",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": "",
"x": 170,
"y": 100,
"wires": [
[
"13c00892.15e197"
]
]
},
{
"id": "20a9c05c.e34b48",
"type": "function",
"z": "b1463674.fcf8e",
"name": "Notfallmeldung ermitteln",
"func": "var m = [];\nfor (var i in msg.payload.aircraft) \n\n if (msg.payload.aircraft[i].squawk === \"7500\" || msg.payload.aircraft[i].squawk === \"7600\" || msg.payload.aircraft[i].squawk === \"7700\")\n \n{\n m.push({payload:msg.payload.aircraft[i]});\n}\nreturn [m];",
"outputs": "1",
"noerr": 0,
"x": 290,
"y": 220,
"wires": [
[
"305f869a.e3ede2"
]
]
},
{
"id": "305f869a.e3ede2",
"type": "function",
"z": "b1463674.fcf8e",
"name": "Notfallmeldung aufbereiten",
"func": "var newMsg = { payload: \"Luftnotfall SQUAWK \" + msg.payload.squawk + \" von Flug \" + msg.payload.flight + \" gemeldet! Siehe: https://www.flightradar24.com/\" + msg.payload.flight };\nreturn newMsg;",
"outputs": 1,
"noerr": 0,
"x": 300,
"y": 280,
"wires": [
[
"f7f42c47.27bd5"
]
]
},
{
"id": "3dfdeeba.fd18a2",
"type": "debug",
"z": "b1463674.fcf8e",
"name": "Debug Meldung",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 720,
"y": 460,
"wires": []
},
{
"id": "3d2fe651.34b1d2",
"type": "twitter out",
"z": "b1463674.fcf8e",
"twitter": "",
"name": "Tweet versenden",
"x": 730,
"y": 400,
"wires": []
},
{
"id": "20f4847c.24771c",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "Flugnotfall Benachrichtigung per Pushover und Twitter. Siehe http://www.wenzlaff.info",
"info": "",
"x": 360,
"y": 40,
"wires": []
},
{
"id": "f7f42c47.27bd5",
"type": "rbe",
"z": "b1463674.fcf8e",
"name": "Prüfen ob Meldung schon versendet",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload",
"x": 450,
"y": 340,
"wires": [
[
"3d2fe651.34b1d2",
"3dfdeeba.fd18a2",
"96d08eec.1c1fb"
]
]
},
{
"id": "96d08eec.1c1fb",
"type": "pushover",
"z": "b1463674.fcf8e",
"name": "Pushover System",
"device": "",
"title": "Flugnotfall",
"priority": 0,
"sound": "",
"url": "",
"url_title": "",
"x": 730,
"y": 340,
"wires": []
},
{
"id": "42e949b6.a7f4c",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "7500 – Flugzeugentführung (hijacking; seven-five - man with a knife)",
"info": "",
"x": 700,
"y": 140,
"wires": []
},
{
"id": "43074b25.b7b65c",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "7600 - Funkausfall (radio failure; seven-six - hear nix / radio nix / need a radio fix)",
"info": "",
"x": 740,
"y": 180,
"wires": []
},
{
"id": "a7972162.4ccd18",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "7700 - Luftnotfall (emergency; seven-seven - going to heaven / falling from heaven / pray to heaven)",
"info": "",
"x": 800,
"y": 220,
"wires": []
},
{
"id": "f3573ce4.17118",
"type": "comment",
"z": "b1463674.fcf8e",
"name": "https://github.com/IT-Berater/de.wenzlaff.dump1090",
"info": "",
"x": 950,
"y": 40,
"wires": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment