Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Created May 28, 2017 11:31
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 IT-Berater/f7634b808303cb6220e6598007e676c4 to your computer and use it in GitHub Desktop.
Save IT-Berater/f7634b808303cb6220e6598007e676c4 to your computer and use it in GitHub Desktop.
Send Petrol Price To Thinkspeak
[
{
"id": "3841143c.a8e13c",
"type": "http request",
"z": "8bbc7a94.ee94e8",
"name": "Superpreise für Langenhagen abfragen",
"method": "GET",
"ret": "obj",
"url": "https://www.benzinpreis-aktuell.de/api2/fetch.php?key=KEY-EINFUEGEN",
"tls": "",
"x": 220,
"y": 200,
"wires": [
[
"a5e77532.4ed78",
"b12e99ed.63bad8"
]
]
},
{
"id": "b64bcec9.890e2",
"type": "debug",
"z": "8bbc7a94.ee94e8",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 650,
"y": 340,
"wires": []
},
{
"id": "a5e77532.4ed78",
"type": "contrib-json",
"z": "8bbc7a94.ee94e8",
"engine": "JSONPath",
"command": "jq",
"expr": "$.stations.0.price_super",
"complete": "property",
"prop": "payload",
"name": "Shell Bothfelder Str. 15",
"x": 210,
"y": 280,
"wires": [
[
"b64bcec9.890e2",
"ed76c1e.0a7794",
"9fc64464.bbdcb"
]
]
},
{
"id": "b12e99ed.63bad8",
"type": "contrib-json",
"z": "8bbc7a94.ee94e8",
"engine": "JSONPath",
"command": "jq",
"expr": "$.stations.1.price_super",
"complete": "property",
"prop": "payload",
"name": "Hoyer Am Kreisel bei Mc Donalds",
"x": 240,
"y": 420,
"wires": [
[
"b64bcec9.890e2",
"cd27d62d.41ef48",
"fc2bb2d.e4e8fd"
]
]
},
{
"id": "ed76c1e.0a7794",
"type": "ThingspeakSendSimple",
"z": "8bbc7a94.ee94e8",
"name": "An Thingspeak Kanal 1 senden",
"writekey": "SCHREIB-KEY",
"fieldid": "1",
"x": 310,
"y": 340,
"wires": []
},
{
"id": "ab52c557.c4ba8",
"type": "comment",
"z": "8bbc7a94.ee94e8",
"name": "www.wenzlaff.info",
"info": "",
"x": 790,
"y": 80,
"wires": []
},
{
"id": "737c9c4a.56450c",
"type": "comment",
"z": "8bbc7a94.ee94e8",
"name": "Ermittelt die Super-Benzin Preise in Langenhagen und sendet sie an Thingspeak",
"info": "https://www.benzinpreis-aktuell.de/benzinpreise-langenhagen-heute",
"x": 320,
"y": 80,
"wires": []
},
{
"id": "d71c9200.4ecc",
"type": "inject",
"z": "8bbc7a94.ee94e8",
"name": "Jede Stunde",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "3600",
"crontab": "",
"once": false,
"x": 140,
"y": 120,
"wires": [
[
"3841143c.a8e13c"
]
]
},
{
"id": "cd27d62d.41ef48",
"type": "delay",
"z": "8bbc7a94.ee94e8",
"name": "Warte 2 Minute",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 200,
"y": 480,
"wires": [
[
"cf4b7c99.f23e"
]
]
},
{
"id": "cf4b7c99.f23e",
"type": "ThingspeakSendSimple",
"z": "8bbc7a94.ee94e8",
"name": "An Thingspeak Kanal 2 senden",
"writekey": "SCHREIB-KEY",
"fieldid": "2",
"x": 310,
"y": 560,
"wires": []
},
{
"id": "8946d715.3895d",
"type": "ui_button",
"z": "8bbc7a94.ee94e8",
"name": "",
"group": "c18727d3.1b7608",
"order": 7,
"width": 0,
"height": 0,
"label": "Tankstellen Preise Abfrage",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "",
"x": 400,
"y": 120,
"wires": [
[
"3841143c.a8e13c"
]
]
},
{
"id": "9fc64464.bbdcb",
"type": "template",
"z": "8bbc7a94.ee94e8",
"name": "Format",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Shell Bothfeld: {{payload}} Euro\n",
"x": 640,
"y": 280,
"wires": [
[
"e1934597.0af95"
]
]
},
{
"id": "e1934597.0af95",
"type": "ui_toast",
"z": "8bbc7a94.ee94e8",
"position": "top right",
"displayTime": "10",
"outputs": 0,
"ok": "OK",
"cancel": "",
"topic": "",
"name": "Ergebnis Dialog",
"x": 800,
"y": 280,
"wires": []
},
{
"id": "d53e5bcb.204348",
"type": "template",
"z": "8bbc7a94.ee94e8",
"name": "Format",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Hoyer Am Kreisel: {{payload}} Euro\n",
"x": 640,
"y": 480,
"wires": [
[
"7280a9f4.7b75a"
]
]
},
{
"id": "7280a9f4.7b75a",
"type": "ui_toast",
"z": "8bbc7a94.ee94e8",
"position": "top right",
"displayTime": "30",
"outputs": 0,
"ok": "OK",
"cancel": "",
"topic": "",
"name": "Ergebnis Dialog",
"x": 800,
"y": 480,
"wires": []
},
{
"id": "fc2bb2d.e4e8fd",
"type": "delay",
"z": "8bbc7a94.ee94e8",
"name": "Warte 10 Sekunden",
"pauseType": "delay",
"timeout": "10",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 470,
"y": 480,
"wires": [
[
"d53e5bcb.204348"
]
]
},
{
"id": "c18727d3.1b7608",
"type": "ui_group",
"z": "",
"name": "wenzlaff.info",
"tab": "a9e39ea1.b18f3",
"disp": false,
"width": "6"
},
{
"id": "a9e39ea1.b18f3",
"type": "ui_tab",
"z": "",
"name": "wenzlaff.info",
"icon": "dashboard"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment