Always leave my phone charging and forgot to turn off the power, so based on some example I found in the forum, I wrote a small app that allow you to determine (indirectly) the charging is complete and trigger the power off of Smart Outlet.
When charging phone / tablet / etc, the power drawn will reduce when fully charged, usually fell below 1W. So defining something like 0.8W is a good start, once it reached the triggering point, Smart Outlet will be power off and no over-charging happen to the device.
You may copy the code below and create as your own app.
Just a quick heads up for formatting… If you edit your post, select all of the code and then click on the option for Blockquote (looks like a giant double quote in the text editor), it will keep all of your code in line and present nicely.
Also, I updated the title of your post to signify this is a smartapp release.
An interesting idea, but perhaps a bit misguided. You’re really no saving any energy by doing this. In fact, you’re burning more by having two devices plugged in.
A modern charger/adapter only provides power to the device when it needs it. Once the device is fully charged, the charger essentially shuts off and goes into standby mode. In standby it consumes at most 300 mW. The z-wave switch not only has a power supply but a radio, and it’s always on. So, it consumes at least 300 mW, whether the outlet it controls is on or off.
You’re just trading the standby consumption of the charger for the always-on consumption of the switch, which may in fact be higher.
It’s also important to note that 99.99% of phones have overcharge protection. The circuitry will ensure the battery isn’t over-charged. However, I will give this a try with my dad’s MP3 Player (yeah, a dedicated MP3 Player). It can be over-charged and doesn’t work for a few hours.
Anyways, great contribution and keep up the good work!
Work well especially for the battery bank, as it’s only have blue light indicator when it’s being charged for some time but I have no idea whether it’s 80% or 100%. Now I can see the charging still going on for another hour after the light turned blue, and finally the power drawn reduce to less than 1W
I think the app is genius, and for those that don’t understand the benefits limiting lithium ion charging to ~90%, they don’t know what they are missing.
I purchased Aeon Labs DSC18103-ZWUS smart switch/outlets, however I can’t seem to get the app to recognize them. “When This Power Outlet…” is dead. Is there any way to modify to accommodate, or is there something I am doing wrong?
So I use this app to charge my kids PowerWheels. Those old led acid batteries come with a dumb charger that doesn’t turn off on it’s own.
The only problem is that it seems that when it takes to long to charge the app doesn’t turn itself off. I haven’t been able to clearly find the threshold, but it’s usually at least 6-8 hours. I suspect that it’s only when the time it takes to charge goes past midnight, but again I haven’t had a chance to verify this as it’s particularly difficult to predict the amount of drain my kids can get on these things per use.
I think lead-acid batteries are best kept on a smart charger. Any time the battery discharges, idle or in use, it will tend to sulfate more than necessary and reduce life. When you keep it on a smart charger (multistage that does not overcharge) then life will be maximized. So the right charger will not cook the battery.
“Battery Tender” is one brand but there are others. There are slightly different charger models with profiles for AGM, gel, Lion so you could tweak selection.
You can monitor power with smart plug which makes it easy to see when charging is done from 100 miles away or on the toilet. Then your charging routine would be, leave it on the charger when not in use. For example, motorcycle charger takes 2 watts idle when not bulk charging my AGM (lead acid) that is now at least 8 years old. A dumb charger would probably cook it in 2-3-4 years, and smart charger cost is reasonable for the benefit.