Hi guys,
i buy ORNO 514 Energy meter with Modbus connection RS 485
and i have small problem to connect with my openhab2.
So i have python script which print me data eg.
print "testing @ ",DEVICE_0
testEmeter=energymeter.testPort(DEVICE_0, ADDR)
if testEmeter:
print "meter ok"
mbcli = energymeter.startClient(DEVICE_0, ADDR)
print
print "ID ORNO ... ", energymeter.readRegs(mbcli, 0x0110, 1)
print "Grind Frequency ... ",energymeter.readRegs(mbcli, 0x0130, 1)
print "Voltage ... ", energymeter.readRegs(mbcli, 0x0131, 1)
print "Current ... ", energymeter.readRegs(mbcli, 0x0139, 1)
print "Active Power ... ", energymeter.readRegs(mbcli, 0x0140, 1)
print "Reactive Power ... ", energymeter.readRegs(mbcli, 0x0148, 1)
print "Apparent Power ... ", energymeter.readRegs(mbcli, 0x0150, 1)
print "Power Factor ... ", energymeter.readRegs(mbcli, 0x0158, 1)
print "Active Energy ... ", energymeter.readRegs(mbcli, 0xA000, 1)
print "Reactive Energy ... ", energymeter.readRegs(mbcli, 0xA01E, 1)
print "LCD Display state ... ", energymeter.readRegs(mbcli, 0x112, 1)
testing @ /dev/ttyUSB0
meter ok
Energy MODBUS: /dev/ttyUSB0
ID ORNO ... [1]
Grind Frequency ... [5001]
Voltage ... [23847]
Current ... [0]
Active Power ... [0]
Reactive Power ... [0]
Apparent Power ... [0]
Power Factor ... [1000]
Active Energy ... [0]
Reactive Energy ... [0]
LCD Display state ... [65281]
Ok now configuration my modbus.conf now i set to testing only one value
serial.home_freq.connection=/dev/ttyUSB0:9600:8:even:1:rtu:150:1000:none:none
# The data type, can be "coil" "discrete" "holding" "input". See wiki for more details.
poll=5000
serial.slave1.type=holding
serial.slave1.id=1
serial.slave1.start=0110
serial.slave1.length=1
serial.slave1.valuetype=uint16
serial.orno_1.type=holding
serial.orno_1.id=1
serial.orno_1.start=0110
serial.orno_1.length=1
serial.orno_1.valuetype=uint16
serial.home_freq.type=holding
serial.home_freq.id=1
serial.home_freq.start=20
serial.home_freq.length=6
serial.home_freq.valuetype=float32
`Number mt_home_freq "Grid Freq [%.2f Hz]"{ modbus="<[home_freq:1]"}`
Text item=mt_home_freq label="Prad" icon="bath" {
Text item=mt_home_freq
}
And question is, where i can configure connection with my ORNO energymeter and send address/register to get the data?