This script will will poll WiFi Smart Plugs for state and energy usage (Watts)
2.9K
Monitor power usage through WiFi Smart Plug. This script will will poll the Smart Plugs for state and energy usage (Watts)
arp-scan can help identify devices on your network. WiFi Routers often have a list of devices connected as well. Look for devices with a name like "ESP_xxxxxx".Make sure to replace with device ID and IP. The key is only used to control the device so you can omit that or a random value will work.
# run powermonitor container - replace with device ID and IP
docker run -e PLUGID='01234567891234567890' -e PLUGIP="10.0.1.x" -e PLUGKEY="0123456789abcdef" jasonacox/powermonitor
Github: * https://github.com/jasonacox/powermonitor
$ docker run -e PLUGID='01234567891234567890' -e PLUGIP="10.0.1.99" e PLUGKEY="0123456789abcdef" jasonacox/powermonitor
Polling Device 01234567891234567890 at 10.0.1.99 with key 0123456789abcdef
Dictionary {'devId': '01234567891234567890', 'dps': {'1': True, '2': 0, '4': 69, '5': 12, '6': 1181}}
Switch On: True
Power (W): 1.200000
Current (mA): 69.000000
Voltage (V): 118.100000
Projected usage (kWh): Day: 0.028800 Week: 0.201600 Month: 0.873600
Content type
Image
Digest
Size
336.5 MB
Last updated
almost 7 years ago
docker pull jasonacox/powermonitor