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:
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?
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.
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, 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.
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.