Emoncms for dummies

So I’ve been using emoncms.org to export live feeds from an emontx3 to my Home Assistant for years - but it’s never fed into the HA Energy dashboard - I can only assume because I have it only feeding live watt values.

It’s also been running very old firmware, so I’ve updated that - however that’s broken my live feeds, and I now have E1/E2/E3 and P1/P2/P3 - which I can only assume are Energy and Power.

BUT - I just can’t wrap my head around how to setup the feeds in emoncms.org to actually do anything with these. The original ct1/ct2/ct3 feeds were just ‘log to feed’ in watts.

Is there a proper simple setup guide? No amount of searching reveals anything.

CT1 is grid
CT2 is solar
CT3 is the Aircon circuit

Hi, in my emoncms I (1) log to feed (2) Power to kWh. Note the feed ID of (2). In home assistant EMONCMS integration in the configure option in the “choose feeds to include” select the feed ID for (2) and add the entity created to the energy dash board

1 Like

I know nothing about Home Assistant, but a video introduction to feeding heat pump data into emonCMS was published here recently: Vaillant eBUS hardware adapter (ebusd software) Thread - #413 by sparky77 Assuming you have data appearing as Inputs, the useful part for you (i.e. emonCMS itself) starts at 14’30".

Have you actually looked in the Docs section? It’s been expanded recently and there’s a lot about using emonCMS by itself. emonCMS user guide — OpenEnergyMonitor 0.0.1 documentation If you’re not sure about the component parts of emonCMS, the starting point is probably the 3rd ‘chapter’: Emoncms Core Concepts — OpenEnergyMonitor 0.0.1 documentation and then go back to the beginning and how to set it up.

I did send the following to another recent plea for very basic information, but there’s been no response


Collecting your data

This task is handled in the emonPi or emonBase by emonCMS, working hand-in-hand with emonHub.
Data arriving via the LAN is received directly by emonCMS and appears on the Inputs Page. Serial data received either by ISM band radio from an emonTx or emonTH, or by USB from an electricity or heat meter, inverter etc is received and reformatted by emonHub and then transferred to emonCMS, also appearing on the Inputs Page.
The Inputs page can process the data as it is received. Many operations can be performed, a few of the more common ones are scaling (calibrating) and adding other inputs, separating imported and exported power, accumulating powers to give energy totals. At any point, the value can be “logged to feed”. This is how the data is saved.
The Feeds page is the database in which your data is stored. There are two basic types: Fixed Interval Time Series and Variable Interval Time Series. The first is best suited to data that arrives at regular fixed intervals of time, like the voltage, power and energy from an emonTx, emonTH or the emonPi itself. The second should be used when the data arrives irregularly, say from a switch closing.
When the data has been saved in a Feed, it can be accessed and viewed as a Graph (the familiar sort), a Visualisation (also a ‘graph’ but various sorts, one is animated) or various graphs, numbers and dials can be assembled on a Dashboard. The specialised Apps (My Solar, My Heatpump, etc) can be thought of as pre-programmed dashboards.

Those are the basics of emonCMS. There is a lot more to it than this.

1 Like

Thanks, I’d done that with the previous firmware but it never seemed to feed into HA.
I just assumed it was something I’d done wrong, but couldn’t find any existing configs to work off or compare to.

Yeah, but just couldn’t wrap my head around the processing of inputs into feeds.

Will have another crack tomorrow with fresh eyes though - was probably a silly idea to mess about with it at the end of a long day!

:+1:
… and to try to take in too much in one session.

1 Like

Have you installed the EMONCMS integration, (this did away with the YAML config)

I think this was also my issue - my very old firmware only gave me Power feeds and I had to setup the Energy ones within emonCMS myself. New firmware provides both.

Yeah, have been using it since it was released - but only with the very old firmware on the EmonTX that outputted CT1/CT2/CT3 as Watts.

My issue is what is the best practice setup for EmonCMS itself to present the data to HA so it works nicely with the Energy stuff.

Now that I’ve got a few days of data, (and re-read the docs, thanks @Robert.Wall) it’s making a bit more sense - this is what comes out of the emonTX natively into emonCMS:
P1 - grid in watts - goes negative when exporting
P2 - solar production in watts - goes to 0 overnight
P3 - aircon circuit in watts

E1 - grid in cumulative watt-hours - goes negative when exporting
E2 - solar production in cumulative watt-hours
E3 - aircon circuit in cumulative watt-hours

I’ve just given HA access to the 6 sensors, with E1 as Grid, E2 as Solar (and E3 for aircon as a device) - will give it a few hours and see if that works.

I think I was getting confused thinking that HA needed the Power (watt) sensors not the Energy (watt-hour) for the Energy component - as I’d DIY’d a Power Wheel card back before the Energy component was a thing.

Think I’ll still keep the Power Wheel as it’s also feeding into an LED ring with red/green LEDs to visualise the current (no pun intended) grid usage/export - but can adjust that to use the P1/P2 sensor values instead of the old CT1/CT2.

Not sure if there’s a need to setup to create daily kWh data from cumulative Wh or kWh inputs if the E1-3 feeds will do the same job.

Thanks for all the input - just documenting this as I go along too in case someone else gets themselves as confused as I have.

1 Like

That’s a moot point: If you use the correct version of power to (k)Wh - which is

Wh Accumulator: Use with emontx, emonth or emonpi pulsecount or an emontx running firmware emonTxV3_4_continuous_kwhtotals sending cumulative watt hours.

This processor ensures that when the emontx is reset the watt hour count in emoncms does not reset…

(kWh Accumulator is the same)

then emonCMS does NOT lose the cumulative count when the front end (Node 5 in the emonPi or the external emonTx running older software) resets to zero after a power outage - but it will lose energy if the data fails to arrive.

If you use the accumulator in the emonTx (i.e. you use the ''E" value in newer software), then because the data is remembered in EEPROM but not every time it’s sent, you might lose a small amount when it loses its operating power and subsequently restarts. It still keeps track of the accumulating energy locally, it makes no difference if the data isn’t received by the emonPi, and the value stored in emonCMS will simply step to the latest value when it does get through.

So - choose either or both, it’s up to you. I’ve not heard of anyone implementing clever logic to decide which one is the ‘correct’ value to store - it sounds like a very tricky - if not impossible - problem.

1 Like