Skip to content

SDM72 protocol and commandline tool

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

acpiccolo/SDM72-Powermeter

Repository files navigation

CI dependency status CI CI CI

SDM72 three phase four wire energy meter

This RUST project can read and write a SDM72 energy meter from the command line.

Hardware

The following hardware is required for this project:

  • One or more SDM72 energy meter.
  • One USB-RS485 converter.

Data sheet SDM72 energy meter

  • maximum 100 Ampere
  • Two wire types: 3 phase with 4 wire or 1 phase with 2 wire
  • RS485 Modbus RTU output
  • Pulse Output
  • Bi-directional measurement (import & export)

Compilation

  1. Install Rust e.g. using these instructions.
  2. Ensure that you have a C compiler and linker.
  3. Clone git clone https://github.com/acpiccolo/SDM72-Powermeter.git
  4. Run cargo install --path . to install the binary. Alternatively, check out the repository and run cargo build --release. This will compile the binary to target/release/sdm72.

Getting started

To see all available commands:

sdm72 --help

For RTU Modbus connected sdm72 energy meter:

sdm72 rtu --address 1 --baudrate 9600 read-all

For TCP Modbus connected sdm72 energy meter:

sdm72 tcp 192.168.0.222:502 read-all

You can even use this tool as a daemon for a MQTT broker, the connection is configured via the mqtt_config.yml file:

sdm72 rtu --address 1 --baudrate 9600 daemon mqtt

Cargo Features

Feature Purpose Default
tokio-rtu-sync Enable the implementation for the tokio modbus synchronous RTU client
tokio-rtu Enable the implementation for the tokio modbus asynchronous RTU client
tokio-tcp-sync Enable the implementation for the tokio modbus synchronous TCP client -
tokio-tcp Enable the implementation for the tokio modbus asynchronous TCP client -
bin-dependencies Enable all features required by the binary

License

Licensed under either of

at your option.

About

SDM72 protocol and commandline tool

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages