Washing machine done notifier - Athom PG04 16A plug with IFTTT #1788
Replies: 2 comments 1 reply
-
Something seems to be wrong in your config, if I use |
Beta Was this translation helpful? Give feedback.
-
Thanks for your feedback, it does work but not as described, modifit it for the Gosund SP111 and specially ordered the Athom PG04 16A, even flashed the firmware extra, and it only works when I flip that( as in the first post). |
Beta Was this translation helpful? Give feedback.
-
Based on an amazing JSON by @RavenSystem that uses power meter to determine when a non-smart washing machine has finished. Modified to use a plug I had available and send IFTTT notifications instead of operate a contact sensor.
Device Name: Athom PG04 16A power monitoring smart plug (UK)
URL to Device: Aliexpress / Blakadder template
Used HAA version: 10.4.2
Summary of functions: Shows outlet as On in HomeKit when washing machine is on standby/operating, and calls an If This Then That action on completion of a washing cycle (I use this to send a push notification).
Long description:
This JSON creates four accessories. Only accessory 1 is visible in HomeKit — an outlet — and both physical and HomeKit controls are disabled. This is used to indicate when the (non-smart) washing machine is operating (drawing any power at all).
Accessory 3 is the “real” power outlet, but it is invisible to HomeKit. Physical controls are defined but at boot this is set as on and then disabled so it can’t be turned off accidentally. (JSON could easily be modified to not do this and allow control.)
Accessory 4 is a switch with 300s inching. When it turns off, it triggers an IFTTT action (which you must set up, and put in the action name and secret key). Note that
"w":1
is vital for IFTTT to work reliably!Accessory 2 is a power monitor, and has been calibrated on my socket. Has various triggers based on power usage level.
In action, switch 1 is turned on and off by the power monitor to indicate appliance in use, and controls kept disabled. Switch 4 starts disabled, and only gets enabled (and kept in off state) when power usage is >20W. Once it drops below this, it gets turned on and 300s inching starts. If power usage doesn’t go back above 20W, inching will elapse and switch will turn off triggering IFTTT action; it will also disable itself so that it can’t be re-triggered until the power usage has been above 20W again to re-enable it.
{"c":{"l":13,"z":0,"ntp":"pool.ntp.org","tz":"GMT+0BST-1,M3.5.0/01:00:00,M10.5.0/02:00:00","n":"HAA-WashingMachine","b":[{"g":3,"t":5}],"1":{"m":[[3,1],[3,-10000],[4,2]]}},"a":[{"t":2,"h":1,"ks":0,"s":0,"es":[{"t":75,"xa":0,"y2":[{"v":0,"0":{"m":[[1,-10001],[1,0],[1,-10000],[4,2],[4,-10000]]}},{"v":0.01,"0":{"m":[[1,-10001],[1,1],[1,-10000],[4,1],[4,-1]]}},{"v":20,"r":1,"0":{"m":[[4,-10001],[4,2]]}}],"dt":[4,5,12],"vf":0.12128,"cf":0.01134,"pf":1.30509}]},{"t":2,"h":0,"s":1,"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]}},{"h":0,"s":0,"ks":0,"i":300,"xa":0,"0":{"h":[{"h":"maker.ifttt.com","m":2,"w":1,"u":"trigger/<<trigger_name>>/with/key/<<secret_key>>"}],"m":[[0,-10000]]}}]}
Beta Was this translation helpful? Give feedback.
All reactions