A simple nodeJS application to control a tp link HS110 wifi smart plug.
To download all dependencies, run: npm i
.
On the root of your project create a file called .env
and defife the IP of your device as: TP_LINK_HOST=<YOUR_IP>
.
To run your application type on a terminal (inside the directory of your project): npm run-script run
.
You should see printed out on command line all the info of your device and given your device IP, read its status and:
- if it is on, turn it off
- if it is off, turn it on
developed by Francesco Longo.