Here is cheap MODBUS Power Meter plus RS485 to TTL adapter with WiFi Wemos D1 mini and MQTT.
Can control all this parameters and publish to MQTT topic:
Voltage -Volts
Current -Amps
Active power -Watts
Apparent power -VA
Reactive power -VAr
Power factor
Frequency -Hz
Import active energy -kWh
Export active energy kWh
Import reactive energy -kvarh
Export reactive energy -kvarh
Total active energy -kWh
Total reactive energy -Kvarh
You need connect 2 wires from SDM120 to TTL adapter and 4 wires to Wemos D1 mini.
TTL VCC to Wemos 3.3
TTL TXD to Wemos D6
TTL RXD to Wemos D7
TTL GND to Wemos GND
Here is sketch for Wemos were you can setup your network settings:
sdm120wifi.pdf (48.0 KB)
Rename it to .zip