modbus2mqtt icon indicating copy to clipboard operation
modbus2mqtt copied to clipboard

Fixes a whole bunch of issues

Open psy0rz opened this issue 3 years ago • 5 comments

Its a xmas miracle! \o/

Fixed debugging, logging, exception handling and documentation.

Added support for multiple modbus function codes and read lengths.

Added parity/databits/stopbits settings.

psy0rz avatar Dec 15 '21 15:12 psy0rz

@psy0rz are you using this in conjunction with the instathings ecosystem, or are you running this locally? I'm trying to find something that will convert modbus to mqtt messages and map the registers to objects using config data. As far as I can tell, this is exactly what I'm looking for. Is my understanding correct?

thompcd avatar Dec 16 '21 15:12 thompcd

Yes, i'm using it standalone.

And yes: If there exists a herdsman-converter for your device, it will regulary poll the device and convert it to nice usabe json messages via mqtt. (https://github.com/Instathings/modbus-herdsman-converters/tree/master/devices)

note that due to a bug you can configure it to poll just one modbus device. (issue #13 )

psy0rz avatar Dec 16 '21 17:12 psy0rz

Yes, i'm using it standalone.

And yes: If there exists a herdsman-converter for your device, it will regulary poll the device and convert it to nice usabe json messages via mqtt. (https://github.com/Instathings/modbus-herdsman-converters/tree/master/devices)

note that due to a bug you can configure it to poll just one modbus device. (issue #13 )

Thanks for the confirmation.

Did you set up your own mongoDB? I've never set one up and there isn't a docker container built for my 32 bit pi so I'm not sure how much effort that will be or what it'll entail.

I've got some holiday time this week, I'm going to try setting it up and adding some new herdsmen devices!

thompcd avatar Dec 20 '21 13:12 thompcd

I'm always using influxdb + grafana for stats and to make cool dashboards.

psy0rz avatar Dec 24 '21 15:12 psy0rz

Have you looked into using a worker? https://github.com/yaacov/node-modbus-serial/tree/a0a020fa6c0888ffa0b60a845e70b4dfc14d14ec/worker Requires a newer version of modbus-serial, but gets rid of your switch case.

danielvandenberg95 avatar Jan 15 '22 09:01 danielvandenberg95