0.1.1 • Published 4 years ago

pzem-004t-api v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

API for PZEM-004T

An express server API for module PZEM-004T on a Serial Port.

Features

  • Getter and setter for all features of module.
  • History tracking
  • Change periodicity for tracking

Routes

  • GET /measurements
  • GET /voltage
  • GET /current
  • GET /power
  • GET /frequency
  • GET /power-factor
  • GET /alarm
  • GET /alarm-thresold
  • POST /alarm-thresold
  • GET /address
  • POST /address
  • POST /reset-energy
  • POST /calibration

Environment variables

NameRequiredDefaultDescription
SERAIL_PORTtrueXThe serial port
LISTEN_PORTfalse3000The listen port for server
DEBUGfalsefalseEnable Debug log
MONGO_URLtrueundefinedThe mongo URL to connection