Help setting up EmonPi2

Hello please could someone advise me how to get the ‘use’ and ‘use_kwh’ feeds working? I have an Emonpi with one CT clip on the heatpump power and plugged into CT1 which seems to be the P1 feed. See photo…

Welcome, Helen, to the OEM forum.

The Feed is the place where your data is stored - it’s really a database. Your emonPi is really an “emon” energy measuring device attached to a Raspberry Pi. The ‘emon’ part sends data to a service running in the RPi called emonHub, this interprets the data and repackages it for emonCMS. It arrives on the Inputs page of emonCMS. (Look under Setup in the main emonCMS menu.)

It is on the Inputs page where you process the data. If you click on the spanner icon on the same line as P1 (Power - CT1), you’ll come to the “emonpi process list setup” page. It’s here that you can do all manner of things to the input - scale it, add or subtract constants or other data etc (too much to list here). Now I’m not sure how you come to have 3 Feeds already - normally you won’t have any and you’ll have to create each. What looks to be worse is you have an energy (20.54 kWh) as power P1, so somehow something has gone badly wrong here. Have you already tried to set something up and got into a mess?

The normal flow of process steps on the Inputs page for a power is like this:

I think we need to see what you have for the process steps on your P1.

You might find this page helpful emonCMS: Getting started emonPi/Base — OpenEnergyMonitor 0.0.1 documentation (emonBase and emonPi are the same thing as far as this is concerned).
When you get as far as ‘Local vs Remote logging’, jump down the page to ‘Logging data locally’.

Your ‘Use’ will probably be the power P1; usually and for people with PV, P1 will be the power in/out of the main supply, ‘use’ will be what the house consumes. ‘use_kWh’ is an energy, so you need to use the process step that does the accumulation over time to convert power in watts into energy in kWh – Power to kWh. You’ve also (possibly) got E1 which is the accumulated energy in watts straight from the ‘emon’ part of your emonPi. If you have it, it’s your choice whether to use it or not. The two energies should match (though they won’t start from the same place).

Come back whenever you need any more help, but by far the best way is to fiddle about, make mistakes and learn. You can always delete the feed and start again - best done sooner rather than later before you’ve acquired loads of valuable data. One particular warning - make sure the Feed interval is longer than the time between packets of data arriving. For your emonPi on its own, choose 10 s as the feed interval. You can’t change it later, you need to create new Feed.

Hi Robert Thank you so much for getting back to me with such detail! I have deleted all three feeds. The ‘use’ and ‘use_kwh’ are re-created when I initialise the Emonpi. See screen shot… I’ll try working through your instructions and see how I get on :slightly_smiling_face:

I think I have set the processes up as on your example, see screenshot. I didn’t find where to set the interval to 10s do I will have a read through the setup document :+1:


Click on “Select”


and…

I tried adding E1 as below. It all looks a bit weird though :thinking:. E1 has no units. I attempted to convert to kwh by multiplying by 0.0001. Both the kwhday numbers seem odd. Maybe I’ll delete it all and try again tomorrow. Where does the E1 data come from? I only have one CT clip and that’s intended to monitor what the heatpump is using. Octopus use data for the house included for reference.



They will be until it’s yesterday’s data! (i.e. I understand it’s not sensible until the full 24 hours have elapsed.)

Remember E1 (the units are Wh) started accumulating a few seconds after you first powered your emonPi - though it’s possible to reset it to zero via the Serial Config tool, emonCMS started only after you saved the process.

I think there are too many zeros there to convert Wh to kWh :face_with_hand_over_mouth:

1 Like

Thank you! I have changed the process on E1, but I’m guessing that won’t correct the data already logged? The feed still doesn’t show any units for E1 though.

In better news for the first time in 3 years I can see the energy being used by my heatpump! Now to find our how to set it up more efficiently.

Correct, unfortunately.

That should be in your emonhub.conf file (access it via emonCMS → Setup →Emonhub - Edit config ).

For Node 5 (the emonPi itself), I have this. Yours will be different because I don’t have the standard sketch running in the front end - you probably don’t have 2 pulse counts, you might not have the two energies even.
Those 4 lines specify the name of the quantity, how to decode it, how to scale it and finally the units, and they line up 1:1 (You can see I tweaked the calibration of my two powers :smile:)

[[5]]
    nodename = emonpi
    [[[rx]]]
        names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulse1count,pulse2count,E1,E2
        datacodes = h, h, h, h, h, h, h, h, h, h, L, L, l, l
        scales = 1.00264,0.9884,1, 0.01, 0.01,0.01,0.01,0.01,0.01,0.01, 1, 1, 1, 1
        units = W,W,W, V, C,C,C,C,C,C, p, p, Wh,Wh

If your “units = …” line doesn’t have the units for the energies, then you can add them, you should need to add E1, E2 to the ‘names =’, l, l (signed long × 2) to ‘datacodes =’ and 1, 1 to ‘scales =’ as well. If you’re in doubt, post this section of your emonhub.conf and a clip of the data coming in from Node 5 from the log. It should look like this (again, mine is non-standard, yours will be different)

2024-12-30 11:11:12,433 DEBUG    RFM2Pi     25817 NEW FRAME : OK 5 20 0 38 0 58 0 222 91 0 0 0 0 0 0 0 0 0 0 0 0 130 23 0 0 0 0 0 0 103 20 0 0 99 23 0 0 (-0)
2024-12-30 11:11:12,436 DEBUG    RFM2Pi     25817 Timestamp : 1735557072.433124
2024-12-30 11:11:12,437 DEBUG    RFM2Pi     25817 From Node : 5
2024-12-30 11:11:12,438 DEBUG    RFM2Pi     25817    Values : [20.052799999999998, 37.5592, 58, 235.18, 0, 0, 0, 0, 0, 0, 6018, 0, 5223, 5987]
2024-12-30 11:11:12,439 DEBUG    RFM2Pi     25817 Sent to channel(start)' : ToEmonCMS
2024-12-30 11:11:12,439 DEBUG    RFM2Pi     25817 Sent to channel(end)' : ToEmonCMS
2024-12-30 11:11:12,558 DEBUG    MQTT       Publishing: emon/emonpi/power1 20.052799999999998
2024-12-30 11:11:12,561 DEBUG    MQTT       Publishing: emon/emonpi/power2 37.5592
2024-12-30 11:11:12,563 DEBUG    MQTT       Publishing: emon/emonpi/power1pluspower2 58
2024-12-30 11:11:12,565 DEBUG    MQTT       Publishing: emon/emonpi/vrms 235.18
2024-12-30 11:11:12,567 DEBUG    MQTT       Publishing: emon/emonpi/t1 0
2024-12-30 11:11:12,569 DEBUG    MQTT       Publishing: emon/emonpi/t2 0
2024-12-30 11:11:12,571 DEBUG    MQTT       Publishing: emon/emonpi/t3 0
2024-12-30 11:11:12,572 DEBUG    MQTT       Publishing: emon/emonpi/t4 0
2024-12-30 11:11:12,574 DEBUG    MQTT       Publishing: emon/emonpi/t5 0
2024-12-30 11:11:12,576 DEBUG    MQTT       Publishing: emon/emonpi/t6 0
2024-12-30 11:11:12,578 DEBUG    MQTT       Publishing: emon/emonpi/pulse1count 6018
2024-12-30 11:11:12,580 DEBUG    MQTT       Publishing: emon/emonpi/pulse2count 0
2024-12-30 11:11:12,581 DEBUG    MQTT       Publishing: emon/emonpi/E1 5223
2024-12-30 11:11:12,583 DEBUG    MQTT       Publishing: emon/emonpi/E2 5987
2024-12-30 11:11:12,585 INFO     MQTT       Publishing 'node' formatted msg
2024-12-30 11:11:12,586 DEBUG    MQTT       Publishing: emonhub/rx/5/values 20.052799999999998,37.5592,58,235.18,0,0,0,0,0,0,6018,0,5223,5987

Now for the hard part…
There’s a wealth of information in the forum, so much so that it’s hard to keep track of let alone take it all in. Fortunately, and big thanks to them, we have very many brilliant contributors who are only too willing to help.

2 Likes

Thank you again! I will have a go at this, but chores and walking the dog are next on the list :slight_smile: