WeatherFlow weather station data to EmonCMS


Just wanted to share my NodeRED Flow that shares data from my WeatherFlow weather station to EmonCMS. The station in particular is shown here Smart Home Weather Stations_sh - WeatherFlow I have one of the earlier stations due to an indegogo campaign.

I was particularly interested in getting the solar radiation data into EmonCMS to compare my solar production to it.

The flow takes UDP data from the Wifi connected hub that is broadcast across my LAN and converts it into datapoint that can be sent to Emoncms.

Im very sure there is a more efficient way of achieving this function in NodeRed. Im more than happy to take feedback on this flow!

Enjoy! MikeC

Edit -File attached to post #5 in this thread.

1 Like

Hi Mike,

Thanks for sharing.

One thing though… Instead of posting the raw flow data, could you post it as a file attachment?
That’ll make it easy to get and eliminate copy/paste mistakes.


Hi Bill,
Im pretty green with NodeRed and working remotely (over a VPN) to the server so retrieving the file is a little complicated. Ill see if I can export it and move it over using some file sharing at a later date. Cheers.

Just copy, and paste it into a text editor then save as a txt file.


Weatherflow_emonCMS_nodered_flow.txt (10.9 KB)

1 Like

I have been playing with the node-red flow posted here (thanks for doing the hard part) and expanded it to allow to monitor 2 complete stations (if you need one, just kill the parts not needed, or if you want to monitor even more, just duplicate)

It listens on a local network to the udp packages and from there you send it to your emoncms locally or remotely.
Works like a charm but choose well the input and feed names.
Full UDP api details are here if you wonder what is what:

weatherflow-nodered-emoncms.txt (24.6 KB)

again thanks MikeC for doing the hard part :blush:

1 Like

For us EmonCMS noobs, what exactly does one do with this file? I have the Weatherflow station, and already capture the data from the UDP broadcast, but would love to capture temp data along with power usage.

First step would be to install Node-RED on your Pi (or EmonPi, though I don’t use one, so I’m not 100% sure it’s possible on one. I would imagine it is though). The instructions for that how to do that are somewhere in this forum, and probably in the main OEM guide too - but it’s fairly simple. Couple of NPM install instructions, from memory.
Then once Node-RED is installed, it’s just a case of visiting the IP address of your Pi on port 1880 (e.g. http://my.emonpi:1880/ or (substitute IP or hostname for your situation). You’ll see a ‘construction kit’ of sorts, but you’ll just use the menu to import the flow from the document that was uploaded here, and it’ll take care of it all, pretty much.
Then spend a bit of time getting your head around Node-RED and before you know it, you’ll be writing your own stuff and tweaking the stuff you find.

This ought to be a help, too: Running on Raspberry Pi : Node-RED

If you want some other flows that pull data from remote weatherstations other than your own, or a flow that pulls back oodles of historical data from the PWC history-bank, I’ve got a couple of flows that might be of use. Just holler if you want to see them.

1 Like

Is it something other than “import” from the Node-Red menu? because that wants JSON and doesn’t like the file linked above.

Open the text file, copy and paste the contents into the import dialog, into a new flow. That should work.

There’s a bunch of extraneous stuff in there that’s not JSON, and it barfs on it.

My bad… I don’t actually have the Weatherflow unit, so I hadn’t actually downloaded the flow myself and tested it. Doing so now, and yes, I can see the same bits of non-JSON stuff in it, and it won’t parse correctly in my text-editor’s JSON manager plugin, so yeah, you’re right - something is up with the file. Looks like both @MikeC and @bidouilleur 's versions have the same prefixed junk, so maybe it’s something to do with the forum engine itself?

Off now to check that the file I recently uploaded (in a different thread) hasn’t similarly been rendered useless by whatever process is going on here!

Sorry for making assumptions! Was just trying to help because nobody had answered.

If nobody else does, I’ll try and rescue the data if at all possible, and let you know. Currently working on a Node-RED project that someone else’s has given me to play with, and it’s rather occupied my time today! Need to get that working first, before I can be of much further help.

you’ll have to rework it as I have several devices from weatherflow.
You’ll have to clean out what is not needed and change the names and numbers to fit your system

code is to long to post here so try to download from here an exemple

Resurrecting an old thread here, since I’ve moved twice, but now that I’m re-establishing my tech lab, I’d still like to be able to query the emon TSDB from an outside device, whether that’s directly as a data source in Grafana (ideal) or duplicating it into Influx somehow.

This should get you going…

1 Like