ESP8266 reading Peacefair PZEM-017 values over ModbusRTU and passing date to SignalK server.
Voltage and current sensor based on Peacefair PZEM-017 with 200A/75mV shunt. The sensor can be ordered e.g. from AliExpress.
- Wemos D1 ESP8266
- Peacefair PZEM-017
- 200A/75mV shunt
- MAX3485
- 120 ohm resistor
Power Connector (two pins):
- 5V DC for ESP8266 (red)
- GND DC for ESP8266 (black)
Modbus Connector (four pins):
- Modbus 5V DC (red)
- Modbus A (striped blue)
- Modbus B (striped yellow)
- Modbus GND (black)
- Copy template file
lib/settings.cpp.sample
aslib/settings.cpp
- Edit according to your environment
make upload
To enable OTA update set OTA password (variable otaPass
in settings.cpp
) to non-empty
string.
To update image using PlatformIO pio
tool:
PLATFORMIO_UPLOAD_FLAGS="--auth=ota-password" pio run -t upload --upload-port device.ip.address
Or with zeroconf address (hostname
is your wifiHostname
defined in settings.cpp
):
PLATFORMIO_UPLOAD_FLAGS="--auth=ota-password" pio run -t upload --upload-port hostname.local