OpenWeather on Pixelit #425
MasterChief1335
started this conversation in
Node-RED Flows
Replies: 3 comments
-
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is my (part) flow for weather [
{
"id": "309d0194.fc35fe",
"type": "inject",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "Every 5m",
"props": [
{
"p": "duration",
"v": "5",
"vt": "num"
}
],
"repeat": "300",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"x": 130,
"y": 2980,
"wires": [
[
"dd76e98d.4a057",
"b1dc292b.e0ce2",
"654c9d7f.ce11cc",
"f59359bc.3147c8",
"c849230.ed4726",
"6ea3d605.92fb38",
"3e96be7c.9f4202",
"5e3d0a2f.355274",
"fbe2bb1c.ce042",
"0a28b852e80c02aa",
"a8f85d199cc6d719",
"a638d3fdefbf0298",
"683a192a9c72f068",
"53f83326dcdacf58",
"4b3bae54.310428",
"a6f41f332d9080c4",
"003e0bc4743dc0b8",
"06977bcf5d4d7252"
]
]
},
{
"id": "3e96be7c.9f4202",
"type": "openweathermap",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "",
"wtype": "current",
"lon": "7.6667",
"lat": "50.4333",
"city": "",
"country": "",
"language": "de",
"x": 370,
"y": 2680,
"wires": [
[
"3f6adaca.f8f4b6"
]
]
},
{
"id": "3f6adaca.f8f4b6",
"type": "function",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "",
"func": "var temp = msg.payload.tempc;\nvar icon = 550;\nvar ticks = 100;\nswitch(msg.payload.icon) {\n // Days\n\tcase \"01d\":\n\t\ticon = 551; 349\n\t\tticks = 400;\n\t\tbreak;\n\tcase \"02d\":\n\t\ticon = 552; // OpenWeather 02d\n\t\tticks = 1000;\n\t\tbreak;\n\tcase \"03d\":\n\t\ticon = 553; // OpenWeather 03d\n\t\tticks = 500;\n\t\tbreak;\n\tcase \"04d\":\n\t\ticon = 554; // OpenWeather 04d\n\t\tticks = 500;\n\t\tbreak;\n\tcase \"09d\":\n\t\ticon = 555 // OpenWeather 09d\n\t\tticks = 250\n\t\tbreak;\n\tcase \"10d\":\n\t\ticon = 556 // OpenWeather 10d\n\t\tticks = 250\n\t\tbreak;\n\tcase \"11d\":\n\t\ticon = 557 // OpenWeather 11d\n\t\tticks = 720\n\t\tbreak;\n\tcase \"13d\":\n\t\ticon = 558 // OpenWeather 13d\n\t\tticks = 400\n\t\tbreak;\n\tcase \"50d\":\n\t\ticon = 559 // OpenWeather 50d\n\t\tticks = 320\n\t\tbreak;\n\t// Night\n\tcase \"01n\":\n\t\ticon = 560 // OpenWeather 01n\n\t\tticks = 180\n\t\tbreak;\n\tcase \"02n\":\n\t\ticon = 561 // OpenWeather 02n\n\t\tticks = 800\n\t\tbreak;\n\tcase \"03n\":\n\t\ticon = 562 // OpenWeather 03n\n\t\tticks = 500\n\t\tbreak;\n\tcase \"04n\": \n\t\ticon = 563 // OpenWeather 04n\n\t\tticks = 500\n\t\tbreak;\n\tcase \"09n\":\n\t\ticon = 564 // OpenWeather 09n\n\t\tticks = 250\n\t\tbreak;\n\tcase \"10n\": \n\t\ticon = 565 // OpenWeather 10n\n\t\tticks = 250\n\t\tbreak;\n\tcase \"11n\":\n\t\ticon = 566 // OpenWeather 11n\n\t\tticks = 720\n\t\tbreak;\n\tcase \"13n\":\n\t\ticon = 567 // OpenWeather 13n\n\t\tticks = 320\n\t\tbreak;\n\tcase \"50n\":\n\t\ticon = 568 // OpenWeather 50n\n\t\tticks = 320\n\t\tbreak;\n}\n\n\nnode.status({ fill: \"green\", shape: \"ring\", text: \"Temp: \" + temp + \" | Icon: \" + msg.payload.icon + \" send!\"});\n\nmsg.bitmapAnimation = {\n \"data\": \"\"+icon, \n \"animationDelay\": \"\"+ticks\n }\nmsg.payload = temp + \"°\"\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 640,
"y": 2680,
"wires": [
[
"4944cfa9.1b0ef"
]
]
},
{
"id": "4944cfa9.1b0ef",
"type": "Screen Init",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "weather",
"inscreenName": "weather",
"induration": "5",
"x": 880,
"y": 2680,
"wires": [
[
"7d1bceea.15435"
]
]
},
{
"id": "7d1bceea.15435",
"type": "Text",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "Text",
"intextString": "{{payload}}",
"inbigFont": "false",
"inscrollText": "false",
"inscrollTextDelay": "0",
"incenterText": "true",
"inposX": "10",
"inposY": "1",
"incolorHex": "",
"incolorR": "255",
"incolorG": "255",
"incolorB": "255",
"x": 1090,
"y": 2680,
"wires": [
[
"29862d9e.4c1a3a"
]
]
},
{
"id": "29862d9e.4c1a3a",
"type": "link out",
"z": "49b20b50.18837c",
"g": "d8bab8436a81da08",
"name": "Screen Data Update",
"links": [
"c0366c22.d40cc8"
],
"x": 1375,
"y": 2680,
"wires": []
},
{
"id": "ec87939bc9cd1843",
"type": "global-config",
"env": [],
"modules": {
"node-red-node-openweathermap": "1.0.1",
"node-red-contrib-pixelit": "0.4.0"
}
}
] |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Can someone explain to me how to use OpenWeather so that data actually reaches Pixelit?
thx
Beta Was this translation helpful? Give feedback.
All reactions