Trying to display Voltage Values from ION Meter

modbus
items
Tags: #<Tag:0x00007fe06349d540> #<Tag:0x00007fe06349d270>

(Devrat Singh) #1

Good Afternoon everyone.

I am Currently trying to retrieve a current measurement from an ION Meter. Trying to configure the modbus binding. But keep getting NULL on my PANEL.

so in my modbus.cfg the code is

# Parameter IA, Address 40150, Regs 1, Format UINT16, Scaling 10
modbus:tcp.slave1.connection=10.1.1.228:502
modbus:tcp.slave1.type=holding
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=149
modbus:tcp.slave1.length=2
modbus:tcp.slave1.valuetype=uint16

items

Number	IonIA           "Amperage Line A raw [%f A]"            <energy>	(raw)		{ modbus="slave1:0" }

If anyone can see what i might be messing up on, it would be amazing!!
Thanks!


(Rossko57) #2

First, let’s confirm versions.

The configuration you have shown is for modbus binding version 1.
That can still be used in openHAB version 2, but it is obsolete.
If you’re just starting out with modbus it would be sensible to use modbus binding version 2.


(Devrat Singh) #3

The current modbus binding addon i have is 1.8. I cant seem to find the download to modbus binding 2.

EDIT: I have deleted the old modbus binding from the adodn folder and installed directly from the openhab. It shows version 2 now. And im assuming i would need to do something in order to transition my program to modbus binding 2?


(Rossko57) #4

Afraid so. modbus.cfg is not used at all, welcome to the world of Things and channels.
There are two ways to add Things, you may use PaperUI to add them individually, or you may define them in a file xxx.things. They work differently, best to pick one method and stick to it.

You’d define a TCP bridge thing for your meter.
Then a poller bridge thing for a group of holding registers
Then data thing(s) for each register describing how to interpret it (and optionally write to it).
That creates a channel that you can link to in your Number Item.


(Devrat Singh) #5

I ended up doing it manually through the Paper UI, and we have success! Thank you.