Sign inSign up

jcostom/plugmon

By jcostom

Updated about 1 month ago

Image
0

3.6K

jcostom/plugmon repository overview

plugmon

Docker Stars Docker Pulls FOSSA Status

Lightweight python-based monitoring Etekcity Smart Plug via the VeSync API and activating an IFTTT webhook that triggers sending a Telegram message. Now enabled for Docker Hub security vulnerability scanning!

Pull the image

docker pull jcostom/plugmon

Find your target UUID value

Each plug device has a unique identifier (the UUID). This is how we identify which device to pull power metrics from as we monitor the device. I've included a script in the container to assist you in locating the UUID you want to monitor. To find the UUID, invoke the container as (and don't worry, the container will self-delete and clean up after itself when you do this!)..

docker run \
    --rm \
    --user=1000:1000 \
    -e EMAIL='Your VeSync Email' \
    -e PASSWORD='Your VeSync Password' \
    -e TZ='America/New_York' \
    --entrypoint /app/finduuid.py \
    jcostom/plugmon

Run the container

Sort out your optional parameters (the ENV vars), and you're off to the races...

docker run -d \
    --name=washermon \
    --restart=unless-stopped \
    --user=1000:1000 \
    -e EMAIL='Your VeSync Email' \
    -e PASSWORD='Your VeSync Password' \
    -e TZ='America/New_York' \
    -e UUID='UUID of Your Plug Device' \
    -e IFTTTKEY='Your IFTTT Webhook Key' \
    -e IFTTTWEBHOOK='Your IFTTT Webhook Name' \
    -e OFFPOWER=1.2 \
    -e ONPOWER=3.0 \
    jcostom/plugmon

The --user parameter consists of the UID:GID pair you'd like to run the container as.

The OFFPOWER and ONPOWER values are the high and low watermarks in Watts to activate the indicated state. In other words, in the above example, when you drop below 1.2W being pulled, the device is considered to be off. Conversely, when you go above 3.0W, the device is considered to be on.

As of version 2.0, there's no more fooling around with DEVID or DEVNAME variables, which are too easy to change and break your monitoring app. As of 2.0, we rely on the device UUID. See above for how to locate the UUID you want.

Available Parameters

VariableDefault ValueRequired to Launch?
EMAIL[EMPTY]YES!
PASSWORD[EMPTY]YES!
TZAmerica/New_YorkNO
UUID[EMPTY]YES!
OFFPOWER1.2NO
ONPOWER3.0NO
IFTTTKEY[EMPTY]YES!
IFTTTWEBHOOK[EMPTY]YES!
INTERVAL (in seconds)300NO

License

FOSSA Status

Tag summary

Content type

Image

Digest

sha256:3e8f00e15

Size

51.7 MB

Last updated

about 1 month ago

docker pull jcostom/plugmon