Skip to content

A CLI for the PZEM004T energy monitor as a front-end for the embedded-hal rust driver.

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

iostapyshyn/pzem-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pzem-cli

A command-line interface for the PZEM004T energy monitor as a front-end for the embedded-hal rust driver.

Usage

foo@bar:~$ pzem-cli [OPTIONS] <PORT> <SUBCOMMAND>

Options

Option Description
-a, --addr Slave address of the sensor in hexadecimal format (e.g. 5a)
-t, --timeout Response awaiting timeout in milliseconds.

The address used by default is the universal address for single-slave environments: 0xf8. Every slave is guaranteed to respond to that address. The default timeout is 500 milliseconds.

Commands

Command Description
read Read and display the measurement results.
reset Reset the internal energy counter to 0.
addr [VAL] Set the MODBUS-RTU address to VAL if given, otherwise display the current address.
threshold [VAL] Set the alarm threshold to VAL if given, otherwise display the current value.

Example

foo@bar:~$ pzem-cli -t 1000 /dev/ttyACM0 addr bf
foo@bar:~$ pzem-cli -a bf /dev/ttyACM0 read
Voltage: 241.6 V
Current: 0.000 A
Power: 0.0 W
Energy: 0.000 kWh
Frequency: 50.0 Hz
Power factor: 0.00
Alarm: off

License

This project is licensed under either of

at your option.

About

A CLI for the PZEM004T energy monitor as a front-end for the embedded-hal rust driver.

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