[collectd] new plugin - multimeter

Florian Forster octo at verplant.org
Wed Aug 16 19:15:21 CEST 2006


Hi,

On Wed, Aug 16, 2006 at 06:24:03PM +0200, Claus Herwig wrote:
> There's no real "autodetect" functionality for RS232 (serial port). Only
> thing you can do is "walk through" the most probable set of settings.

that's what I figured, too. The settings to try can be narrowed down to
`known' multimeters, so there will be <20 settings to try.

> For each setting send a "reset" plus a kind of status command and listen
> for the answer. If you get a reasonable one, parameters are right.

The `status command' depends on the multimeter, so I think walking along
a list and try every one in turn is the way to go here, too..

> Disadvantage: Detection will take a while, you've to re-detect it on
> every start of collectd and it's error-prone anyway.

Agreed. I suggest doing an `autodetect' if the plugin is loaded and no
further configuration exists and do what the user tells us (and nothing
else) otherwise.

> I would propose to use vendor name and type as a configuration value and
> hardcode the parameters in the plugin. You could add flexibility with a
> second config value which allows to set the interface manually if
> needed. Something like:
> <metex>
>   type: manual
>   settings: 19200-8N1-HW
> </metex>

I'm not sure about the manual setting, since there is so much to set:
- Standard serial stuff (baud rate, no. bits, no. stop-bits, parity).
- The device's protocol (QtDMM knows six of them). This is sadly not
  vendor dependent: `Voltcraft' uses three different protocols in
  it's models, PeakTech uses two.
- The number of values the multimeter will return.
- A `display digits' setting of which I have no clue. I guess it's the
  precision of the values being sent.

I'd suggest a config syntax like this:
  <Plugin multimeter>
    Device: /dev/ttyS0 Metex M-4650CR
    [Device: /dev/ttyS1 Manual 2400 14a 7 2 1 Even 6]
  </Plugin>

Where:
 `2400' is the baudrate
  `14a' is the protocol
    `7' is the no. of bits
    `2' is the no. of stop-bits
    `1' is the no. of values being sent
 `Even' is the parity
    `6' is the precision/`display digits'

What do you think: Is manual configuration worth it? One could argue
that people with a not-yet-supported device should rather send in the
parameters they need so the plugin is improved..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060816/d765f085/attachment.pgp


More information about the collectd mailing list