question

davefromnl avatar image
davefromnl asked

Read more data from an EM540

I am building a grid tied system with a MPII 5k. As a grid meter I am using an EM540. For now I have only set up the Cerbo GX, the grid meter and 2 Ruuvi sensors to play around en test some stuff.

Al works nice at this moment but I'd like to have more data from the grid meter. In NodeRed I can see al the default data but that is only about half the parameters the EM540 measures. For instance, it would be interesting to keep track of the actual Apparent Power and Power Factor With all the SMPS's around the house, an that number still growing, the PF will be worsening.

Same for the DMD (max power demand over the last 15 minutes). In Belgium this value is one of the variables that makes up your electricity bill.

These values are not in the drop-down menu for the grid meter but are clearly described in the protocol manual from Carlo Gavazzi.

How do I make these measurements visible in my system?

Node-REDrs485em540
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
matt1309 avatar image
matt1309 answered ·

Hi @DavefromNL


The code for getting the EM540 data into victron system is here:

https://github.com/victronenergy/dbus-cgwacs/

The way i understand it the data is loaded into dbus. However those measurements you mention don't have a service in dbus for the energy meters. You'd likely have to create your own dbus service to conform with conventions or ignore them and just try adding additional measurements to energy meter dbus (grid,PV, ACload).

So in short you'll get these measurements into the dbus by editing the above code. Recompiling it and installing on your gx deice.


DBUS info

dbus · victronenergy/venus Wiki (github.com)

dbus api · victronenergy/venus Wiki (github.com)


My c++ is limited at best but looks like the ac_sensor_update.cpp has the resgisters and where they're mapped to. However you'll also have to update how this is bridged into dbus and where.

Home · victronenergy/venus Wiki (github.com)



2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

davefromnl avatar image
davefromnl answered ·

Thanks for the direction to look. I will investigate and come back to tell whether I've been successful or not.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

davefromnl avatar image
davefromnl answered ·

Well. I have been looking in to this, and have decided it's not for me to change the code and recompile. I am fairly sufficient in C. But I am not looking forward to have to check if everything works after an update.

I do hope Victron will add these data to the dbus firmware in a future release of Venus OS.

Looking at the new Peak Shaving for ESS that just released with 3.30~10, the demand per time, that at least the EM540 calculates, can be used as an alternative method for Peak Shaving next to the hard current limit to protect the fuses.

As stated before, in Belgium the monthly network fee is based on a maximum peak over a 15 minute average. And with the electrical transport capacity around Europe not keeping up (for whatever reason that may be) to with the growing demand, utility companies will try to find financial incentives for users to keep peak loads to a minimum.

I would like to be able to control my peak loads. And I think in the future, more people will have this wish.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.