Hi all, I wanted to share my recent success in integrating my personal weather station data into Home Assistant using Node-Red. I’ve been struggling with this for a while, but finally got it working smoothly!
My Setup:
I have a Pantech WH2900 weather station, which uses the Ecowitt protocol. The goal was to get all the weather data (temperature, humidity, wind speed, etc.) into Home Assistant sensors.
The Challenge:
Initially, I tried using Weewx and some drivers, but it was a constant battle with configuration. I decided to switch to Node-Red for a more flexible solution.
The Solution:
I set up a Node-Red flow that listens for incoming weather data via HTTP POST. The data comes in from the weather station using the Ecowitt protocol. From there, I perform some unit conversions (like Fahrenheit to Celsius and mph to km/h) and push the data into Home Assistant sensors.
Here’s a quick breakdown of the flow:
- HTTP In Node: Listens for incoming weather data on
/weatherendpoint. - Unit Converters: Handles temperature, wind speed, and rain rate conversions.
- HA Entity Nodes: Updates Home Assistant sensors with the converted data.
The Code:
If anyone is interested, here’s the Node-Red flow I used:
[{
“id”:“4a568252.a4270c”,
“type”:“http response”,
“z”:“c2802b40.2b07c8”,
“name”:“”,
“statusCode”:“”,
“headers”:{},
“x”:130,
“y”:260,
“wires”:
},
{
“id”:“188ceb1c.321dc5”,
“type”:“http in”,
“z”:“c2802b40.2b07c8”,
“name”:“Incoming Weather Data”,
“url”:“/weather”,
“method”:“post”,
“upload”:false,
“swaggerDoc”:“”,
“x”:180,
“y”:360,
“wires”:[[“4a568252.a4270c”,“e197a1a.a0dc56”,“df151c2c.c6ecc”,“f97d2572.9a97b8”,“137d29d3.4f6446”,“97e472bf.f372a”,“246154bc.fd06fc”,“65c3eecd.8cf2e”,“dbf42355.57edd”,“ccfd1178.f17dd”,“c00f531a.63299”]]
},
{
“id”:“e197a1a.a0dc56”,
“type”:“ha-entity”,
“z”:“c2802b40.2b07c8”,
“name”:“Wind Direction”,
“server”:“a23a4d01.eeb32”,
“version”:1,
“debugenabled”:false,
“outputs”:1,
“entityType”:“sensor”,
“config”:[
{“property”:“name”,“value”:“Wind Direction”},
{“property”:“device_class”,“value”:“”},
{“property”:“icon”,“value”:“mdi:compass”},
{“property”:“unit_of_measurement”,“value”:“°”}
],
“state”:“payload.winddir”,
“stateType”:“msg”,
“attributes”:,
“resend”:true,
“outputLocation”:“”,
“outputLocationType”:“none”,
“inputOverride”:“allow”,
“x”:440,
“y”:40,
“wires”:
}]
The Outcome:
Now, I have all my weather data neatly integrated into Home Assistant! It’s been a great learning experience, and I’m happy to share my setup with anyone who’s interested.
If you have any questions or suggestions for improving the flow, feel free to reach out! ![]()