nmakel / sdm_modbus

Eastron SDM Modbus data collection library
MIT License
45 stars 40 forks source link

add framer command line parameter #21

Closed wowtor closed 1 year ago

wowtor commented 1 year ago

A common Modbus application is to connect to a remote RTU device over TCP. Problem is that Modbus RTU and Modbus TCP are different protocols, implemented by the ModbusFramer class in pymodbus. This change adds a framer parameter to the Meter constructor that gives the user the option to use a non-default framer. It also adds a command line parameter to the example-tcp-udp.py script to pass the framer option to the SDM120 meter.

nmakel commented 1 year ago

Looks good, thanks!