Ground source heat pump monitoring

Merry Christmas!

Having a bit of spare time this days I wanted to order a Heat pump monitor Mbus based Rasp Pi hat from Open energy shop for my Ground source open loop heat pump monitoring project.
I do have a MID approved heat meter installed some time ago but just realised it is not the MBUS protocol.

Instead there is a label rs485 Modbus on the 4 wires cable.
I also have a electric meter with the same Modbus protocol.
I have tried to get more info around here but I couldn’t find to much info on Modbus heatmeters.

My question,
Has someone successfully read this kind of heat meters?
Or, is there any Modbus interface that can be used on the Raspberry pi hat, so it can read the heatmeter and the electric meter the same way it reads data from MBUS hardware?

Thanks

Hello @luxprospector what is the model number of the heat meter that you have there?

emonhub has a modbus reader interfacer that should be flexible enough to read in the data: emonhub/EmonHubMinimalModbusInterfacer.py at master · openenergymonitor/emonhub · GitHub

You will need to specify or work out the relevant data registers to read from. Id be interested to hear how you get on.

Hi Tristan, my heat meter is a UF50 ultrasonic Heat Meter from Micronics UK.




I

Now I am reading with a Raspberry pi, flow and return temperatures and also control the heat pump with some relays on and off times .
I don’t have to much experience with electronic stuf or programming.
For this reason I was trying to buy a ready-made solution for my project. I have tried with a usb to rs485 adaptor to read some data but no success so far.
Could you explain what hardware and software would be needed?

Finally I made some progress reading the data from the heat meter to my windows pc with the usb modbus adapter,
!

The problem now is I don’t know how to make the changes in the Modbus interface in emonhub to be able to read the heat meter.
Is there any one that can guide me how can I achieve that ?
Thanks

No matter what I have tried still not able to connect the modbus meters I have to the raspi Emoncms.
I always get a not connected error.

Has anyone succeeded reading a modbus heat meter or different make of electric modbus meter (RI-D19-80-C. is the one I have)?

Hello @luxprospector

What have you tried so far for the modbus interfacer, the default for reading from an SDM120 electric meter is:

[[SDM120]]
    Type = EmonHubMinimalModbusInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        nodename = sdm120
        # prefix = sdm_
        registers = 0,6,12,18,30,70,72,74,76
        names = V,I,P,VA,PF,FR,EI,EE,RI
        precision = 2,3,1,1,3,3,3,3,3

It might be worth trying something like:

[[HeatMeter]]
    Type = EmonHubMinimalModbusInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        nodename = heatmeter
        registers = 0,1,2,3,4
        names = A,B,C,D
        precision = 1,1,1,1

That should go below the heading:

[interfacers]

in /etc/emonhub/emonhub.conf, which is also editable from within the local emoncms interface.

Hi Tristan,
Thank you for taking time to help!

I have tried already what you have suggested and also what you have sent in the last post .

After I modify the baud rate to 9600, I do get some response from the electric meter


It seems that is at least connected to the electric meter as some response commes back but search on the Google has not helped me to do much.

But from the Heat meter still no answer

Is there a way to modify the " parity= None " in the Heatmeter Interfacer , it seems the only way I could connect to it with the Modpoll software

The settings from Modpoll where I was able to collect some data from the HeatMeter was,
9600 baud
Parity None
Word length. 8
Stop bits. 1

Whereas on the Electric meter
9600 baud
Parity = odd
Word length 8
Stop bits. 1

Thanks in advance to anyone who may have an ideea how I can get further!

Hello @luxprospector the parity is set on this line https://github.com/openenergymonitor/emonhub/blob/master/src/interfacers/EmonHubMinimalModbusInterfacer.py#L63
you could try changing it to see if that makes any difference?

Thanks Tristan, I have tried to play with that code before but it is too much for me .
I did not managed to figure out how github works and what steps I needed to make in order to alter the code and use it.

I have instead some progress with the Heatmeter code

 [[HeatMeter]]
    Type = EmonHubMinimalModbusInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 9600
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        nodename = heatmeter
        registers = 0,1,2,3,4
        names = A,B,C,D
        precision = 1,1,1,1

It connects to the electric KW meter but no matter what registers I ask to read it always comes with error 0

The checksum error disappeared from the log when I have connected the 120R resistor.

On windows laptop the Kw meter is read with no problem or errors.


I assume the converter works well because of this .
Any hints what else I can try?
Thanks

[Formatted for presentation. Moderator - RW]

I think this interfacer is being worked on at the moment. See Reading from a SDM120 meter using EmonHub - #153 by TrystanLea

Hello @luxprospector

You shouldn’t need to interact with github at all, are you able to access the code directly on the RaspberryPi?

The location of the code is /opt/openenergymonitor/emonhub/src/interfacers/EmonHubMinimalModbusInterfacer.py

Thanks for your help Tristan!
Unfortunately a few sentences in your message takes me a couple of weeks of learning how to use that information.
In the last week I have managed to alter the code in the as per your guidance and as a result my modbus heat meter is showing some data ( still not able to have useful data).

I have succeeded to find the manual about the modbus protocol it uses.
Heat meter Modbus communication protocol - Micronics.pdf (749.9 KB)

It seems that I need to read float values from the "Holding registers ,function code 3 "whereas the on the SDM 120 your code read the “Input registers, function code 4” .
So I altered the code Minimal modbus , to read the function code 3 and this is the result !




No matter what precision numbers I use the rezult is always zero, if the field is blank then some values appear in the log but never on the input page .

If any suggestions please leave them here

Thanks,
Lucian