ABB 3 phase Modbus electricity meter - SOLVED

I have an ABB B23 3-phase power meter and now trying to migrate it to OH. I’m using this meter to measure electricity consumption for charging up my PHEV car. I have been using it under Homeseer via Modbus RTU and VB scripting.

Let’s take e.g. active import as an example. According to the ABB mapping table active import (as kWh) is in MB regs. 5000 (Hex) and size is 4. A Modbus register is 16 bits long.

Hex address 5000 corresponds to 20480. When reading regs 20480-20483 e.g. with Modbus Master software the content of these regs are:
20483: 15871

Corresponding imported energy is 2*2^16+15871=146943 which has to be divided by 100 so we get 1469.43kWh which is correct. So far so good. I’m changing the Moxa Nport (Modbus RTU gateway) to Moxa Mgate TCP gateway. I know how to add this Modbus TCP slave but I am wondering how to poll and read regs 20480-20483 in OH. I guess I just need to setup a poller which starts at 20480 with size 4. Now the question is that do I need to read regs 20480-20483 separately i.e. do I need to create 4 separate Modbus data Things. If this is the scenario do I need to create a rule which does the maths in a similar way as above?

Do you mean your data is a 32-bit integer (or maybe 64 bit)? That’s one data Thing.

I don’t know whether it is 32 or 64 bit integer. ABB manual says that MB reg for imported energy starts at 5000 (Hex) with length 4. Could this mean that if I create a data Thing with reg 20480 and read type 64 bit integer it could work?

I noticed that read type 64 bit has several options. I guess I need to make some testing tomorrow. I think I’ll stick with Modbus RTU until I get OH working with this energy meter and only after that change to Modbus TCP. I want to keep Homeseer running in parallel because I don’t know yet how to export data e.g. to influxDB in OH. Modbus TCP integration in Homeseer has very limited capabilities so I may need to create 4 separate items, one for each register. Modbus devices seem to be rather complex to be integrated with OH. Lot of manual work in configurating them.

Sounds right.

From reading the ABB manual, “Active import kWh” is 4-registers i.e. 64-bit; it’s unsigned; and it’s most significant byte is in lowest address register.
That makes it a type int64

It needs a divide-by-100 factor to get the decimal place right. You can do that with modbus:gainOffset profile.
modbus:gainOffset profile.

Mobus devices are rather dimwitted, which means lots of fiddly precise manual configuring.

This did the trick. The poller had to be configured to read 4 regs, though. Other parameters are now easy to setup. I have another ABB meter with same mapping table so it will be easy to integrate it to OH.

Homeseer TCP integration doesn’t seem to work with this ABB meter so I had to reconnect my old Moxa RTU box back to to the meter. I think it doesn’t understand reg 20480 or it can’t read the 64 bit value. It seems that I can have both RTU and TCP Modbus gateways connected to the meter.

Many thanks again for your great help. It saved lot of my time.

I still have one more Modbus device, Steca inverter, to be tinkered.

Yes,of course.

You do realize you can have one poller Thing read a block of fifty contiguous registers, and then divide its payload amongst many data Things?

I would not count on that working reliably. you’re only supposed o have one Master on a serial bus.

Yes, this is what I did when polling active total power and current.

I agree that it might not be very stable to have two Modbus gateways so I will need to keep eye on this. I will have similar situation when I will add my other ABB electricity meter to OH. I will need to contact the guy who made the MB TCP integration for Homeseer because I can’t even change the slave ID from 1 to something else and specify what is the read value type.

One thing which I have noticed when trying to add a new modbus serial slave. It takes really long time before I can start editing the page because all the input fields are “flashing”. Is this normal?

I don’t really know what you are describing, you talk of many other systems than openHAB. One of those occasions when a screenshot might help.
But if that is MainUI GUI editing of Things, can’t help, I do it by file.

Sorry, I should have more specific. I meant MainUI and adding a new modbus serial slave Thing. Below is a screen shot when I try to add a new slave:

It takes ~4mins before I get the following page:

Somewhat annoying because I would need to setup a Modbus serial slave in order to test my Steca inverter.

That is not normal for sure.

What version of openHAB?

I’m running openHAB 3.2.0.

I have had this problem more or less right after I installed OH a month ago. I’m using modbus serial slave only for testing purposes and I’m right now moving from Modbus RTU to Modbus TCP but haven’t replaced all of my Moxa Nport gateways yet.

If you can reproduce the issue with clean install of openHAB, I suggest you file a bug in github. Could be a problem with MainUI…

What you are using to view might be significant - browser, app?

Just submitted a bug report (#1300). I installed OH on another computer (fresh installation) and same problem with this PC.

Just checked with my Android phone and it seems to have same issue. I have used different web browsers (FF, Opera, Edge) so I don’t think it’s browser dependent. Something with the MainUI, I guess.

1 Like