Dashboard- how do I connect openweathermap with the dashboard-gauge?

1,407 views
Skip to first unread message

Daniel Precht

unread,
Aug 3, 2017, 9:02:40 AM8/3/17
to Node-RED
I want to display the current temperature from openweathermap with the dashboard-gauge. I'm new to node-red and have no idea. (Sorry for my bad englisch).

Zenofmud

unread,
Aug 3, 2017, 9:22:39 AM8/3/17
to node...@googlegroups.com
Install the openweather node and the dashboard node and signup for an open weather key to put in the node. Take an injection node and connect it to the openweather node and take that output and connect it to a gauge node and deploy it.

Give it a try and let us know if you run into a problem. The best way to learn is to start trying and you may surprise yourself and figure it out (GRIN).

Paul
On Aug 3, 2017, at 9:02 AM, Daniel Precht <danielp...@gmail.com> wrote:

I want to display the current temperature from openweathermap with the dashboard-gauge. I'm new to node-red and have no idea. (Sorry for my bad englisch).

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/d0255467-38d3-4bda-8991-e02097a10d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Precht

unread,
Aug 3, 2017, 9:48:35 AM8/3/17
to Node-RED
I installed openweather and the dashboard before and also connect them :) But the gauge display 0. What should I do next?

Julian Knight

unread,
Aug 3, 2017, 9:51:58 AM8/3/17
to Node-RED
Make sure you are getting something useful out first. Use a debug or a Dashboard text node. Assuming you are getting something useful, you can then work out what format the gauge wants. You might need to filter or otherwise change your output to match the gauge's requirements.

Simper

unread,
Aug 3, 2017, 9:54:46 AM8/3/17
to Node-RED
Hi,

Are you getting data from openweather?
Are you able to select temp only from openweather response?
Try to post here you flow

Daniel Precht

unread,
Aug 3, 2017, 10:28:38 AM8/3/17
to Node-RED
I have the openweathermap node which is connected to a msg.payload and the gauge. Who want to import it:


 [{"id":"bbb1c9ba.f0a038","type":"tab","label":"Home","disabled":false,"info":""},{"id":"4dca7ca6.044004","type":"ui_group","z":"","name":"Wetter","tab":"","disp":true,"width":"7"},{"id":"d4292587.223688","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}}},"site":{"name":"Home","hideToolbar":"false","allowSwipe":"false","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"b4a6a695.66bf68","type":"ui_group","z":"","name":"Wetter","tab":"","disp":true,"width":"6"},{"id":"4d00cff4.0a7d7","type":"ui_group","z":"","name":"Temperatur","tab":"cf4ab415.127e98","order":1,"disp":true,"width":"6"},{"id":"cf4ab415.127e98","type":"ui_tab","z":"","name":"Home","icon":"dashboard"},{"id":"60a3460c.41a868","type":"openweathermap in","z":"bbb1c9ba.f0a038","name":"","lon":"","lat":"","city":"Brockel","country":"Germany","language":"en","x":209,"y":187,"wires":[["b34deb5.9616a18","74566b02.a3cde4"]]},{"id":"b34deb5.9616a18","type":"debug","z":"bbb1c9ba.f0a038","name":"","active":true,"console":"false","complete":"payload","x":447,"y":246,"wires":[]},{"id":"74566b02.a3cde4","type":"ui_gauge","z":"bbb1c9ba.f0a038","name":"","group":"4d00cff4.0a7d7","order":0,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}°C","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":465,"y":144,"wires":[]}]. 


And these are the datas from openweathermap:
 weather: "Rain"
detail"shower rain"
tempk297.38
tempc24.1
temp_maxc24.9
temp_minc21.9
humidity64
maxtemp298.15
mintemp295.15
windspeed10.3
winddirection260
location"Brockel"
sunrise1501731814
sunset1501787483
clouds75
description"The weather in Brockel at coordinates: 53.1, 9.52 is Rain (shower rain)."

Simper

unread,
Aug 3, 2017, 10:40:58 AM8/3/17
to Node-RED
Instead of the entire openwathermap response, try to pass to Gauge node the tempc value only.

Daniel Precht

unread,
Aug 3, 2017, 11:07:14 AM8/3/17
to Node-RED
And how I do that?

Zenofmud

unread,
Aug 3, 2017, 11:20:36 AM8/3/17
to node...@googlegroups.com
If you look at the INFO for the OpenWeatherMap node, you will see that it returns

The current report sets the following properties of msg.payload:

  • description - a brief verbal description of the current weather for human reading.
  • weather - a short description of the current weather.
  • detail - a more detailed version of weather.
  • tempk - the current ground temperature at that location in Kelvin.
  • tempc - the current ground temperature at that location in Celsius.
  • humidity - the current humidity at the location in percent.
  • maxtemp - the current maximum temperature at the location in Kelvin.
  • mintemp - the current minimum temperature at the location in Kelvin.
  • windspeed - the current wind speed at the location in metres per second.
  • winddirection - the current wind direction at the location in meteorological degrees.
  • location - the name of the location from which the data was sourced.
  • sunrise - the time at which the sun rose in Unix UTC format.
  • sunset - the time at which the sun will set in Unix UTC format.
  • clouds - the current cloud coverage of the location in percent.
So what do you want to display? The info tab of the GUAGE node says:
The msg.payload is searched for a numeric value 

So you need to move which ever value you want to msg.payload. There are several ways to do it but try using a CHANGE node first.

Paul


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
Reply all
Reply to author
Forward
0 new messages