WeatherFlow weather station data to EmonCMS

Hi,

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.

Thanks!

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.

Sureā€¦

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:
https://weatherflow.github.io/SmartWeather/api/udp.html

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 http://192.168.0.44:1880 (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