[collectd] Modbus plugin seems to read garbage values
Gerry Demaret
ml at x-net.be
Fri Oct 12 17:30:32 CEST 2012
I've been playing with the modbus plugin to read the values from a
Schneider Electric PowerLogic EGX100. I'm using Debian testing which
has collectd 5.1.
First tries resulted in segmentation faults when I would enable the
modbus plugin. Some searches later, I found other people having the
same problem and ended up applying their patches to src/modbus.c.
Just in case, my modbus.c file can be found here:
http://gerry.safehex.be/tmp/modbus.c-patch
I recompiled the package and it no longer segfaults, but it still
doesn't work properly.
The values in the rrd files seem to be completely wrong, it says I'm
using -17.9A and my power consumption is 9GWh. Since there isn't much
to configure in collectd, I don't know what the problem might be. Does
anyone have a pointer as to what I should look into?
This is the relevant part of my config:
> LoadPlugin modbus
>
> <Plugin modbus>
> <Data "current-phase1">
> RegisterBase 3000
> RegisterType float
> Type current
> Instance "phase1"
> </Data>
>
> <Data "current-phase2">
> RegisterBase 3002
> RegisterType float
> Type current
> Instance "phase2"
> </Data>
>
> <Data "current-phase3">
> RegisterBase 3004
> RegisterType float
> Type current
> Instance "phase3"
> </Data>
>
> <Data "voltage-l1">
> RegisterBase 3028
> RegisterType float
> Type voltage
> Instance "voltagel1"
> </Data>
>
> <Data "voltage-l2">
> RegisterBase 3030
> RegisterType float
> Type voltage
> Instance "voltagel2"
> </Data>
>
> <Data "voltage-l3">
> RegisterBase 3032
> RegisterType float
> Type voltage
> Instance "voltagel3"
> </Data>
>
> <Data "power-totalactive">
> RegisterBase 3060
> RegisterType float
> Type power
> Instance "totalactive"
> </Data>
>
> <Data "power-totalreactive">
> RegisterBase 3068
> RegisterType float
> Type power
> Instance "totalreactive"
> </Data>
>
> <Data "power-totalapparent">
> RegisterBase 3076
> RegisterType float
> Type power
> Instance "totalapparent"
> </Data>
>
> <Host "hq.tigron.net">
> Address "10.2.0.99"
> Port "502"
> Interval 10
>
> <Slave 2>
> Collect "frequency"
> Collect "current-phase1"
> Collect "current-phase2"
> Collect "current-phase3"
> Collect "voltage-l1"
> Collect "voltage-l2"
> Collect "voltage-l3"
> Collect "power-totalactive"
> Collect "power-totalreactive"
> Collect "power-totalapparent"
> </Slave>
> </Host>
> </Plugin>
Thanks,
Gerry.
More information about the collectd
mailing list