You have a weather station? Become part of the wetter.com weather network, a large community of weather stations in Germany, Europe and the world.
The wetter.com – weather network consists of many private weather stations, which regularly report current weather data, special weather events or other weather data.
- Your weather data are available at any time and access from anywhere
- You can access your weather data from anywhere
- Conveniently evaluate data and compare with neighboring weather stations
- Personalized weather charts of the last 24 hours
Example
Below you will find my weather station with the wetter.com network id 19782 at the location Lörzweiler.
https://netzwerk.wetter.com/wetterstation/19782/
Introduction and create account
The essential information on the service is described by wetter.com on the following website:
http://netzwerk.wetter.com/einfuehrung/
Node-RED Integration
Nodes
To send the weather data to wetter.com, it makes sense to define global variables, e.g. gv_mqtt_home_outdoor_weather_temperature for the current temperature in other flows.
In the actual wetter.com flow, these global variables are then used to compose and transmit the http string described in the API.
Inject-Node
- Start the flow with an Inject Node run not more than 5 Minutes
Moment-Node
It is of course also possible to define the correct format for the time using a custom function. The following node is helpful and much easier to use.
- Install node-red-contrib-moment (https://flows.nodered.org/node/node-red-contrib-moment)
- Set the Timezone and Output Format as followed:
Function-Node
The real magic occurs in the function node. Here the payload is generated according to the API description, which is transmitted to wetter.com in the next step. You have to change your personal ID and Password in the variables inside the code.
msg.id = "12345";
msg.pwd = "123456789";
msg.sid = "API50";
msg.time = msg.payload;
msg.temperature = Math.round((global.get("gv_mqtt_home_outdoor_weather_temperature")) * 10) / 10;
msg.humidity = Math.round(global.get("gv_mqtt_home_outdoor_weather_humidity"));
msg.dewpoint = Math.round((global.get("gv_mqtt_home_outdoor_weather_dewpoint")) * 10) / 10;
msg.pressure = Math.round((global.get("gv_mqtt_home_outdoor_weather_pressure")) * 10) / 10;
msg.payload = "?id="+msg.id+"&pwd="+msg.pwd+"&sid="+msg.sid+"&test=false&dtutc="+msg.time+"&te="+msg.temperature+"&hu="+msg.humidity+"&pr="+msg.pressure+"&ws=0&pa=0&wd=0";
return msg;
http request Node
The http request node establishes the connection to the wetter.com API and transmits the previously created payload. The method used here is PUT, the URL is http://interface.wetterarchiv.de/weather/{{{payload}}} and the return value should be a UTF-8 string.
If everything was done correctly, the node reports back the status SUCCESS. However, the charts on the wetter.com website are displayed with a time delay (> 30 minutes) – a little patience is required here.
Troubleshooting
- wetter.com only saves weather reports if you send at least five weather data. If you can only provide 4 weather data like me, send NULL values in the string anyway.