It would be great if the ST mobile app could show the phone’s battery level on the presence object that way it could be used to trigger actions.
My thought is to have a smart outlet for charging my device that cuts on/off the outlet based on phone percentage. That way it stops charging when the phone gets to 100% to reduce battery fatigue or to be able to trigger action to remind you to charge your phone when the level gets below a certain percentage.
Side note, any phone, tablet, laptop etc with a Lithium Ion battery, it won’t cause fatigue by leaving it constantly on a charger since once it has finished charging it won’t actually keep charging, in fact, in some ways, it’s better to keep it on the charger.
[quote=“SBDOBRESCU, post:5, topic:57235, full:true”]It will actually keep charging to maintain the 100% chraged level, you mean it won’t overcharge…
[/quote]
But is it still a security system?
It’s not charging at the same rate before the battery was 100% but yes, it’s still charging. We’re arguing semantics. The point is, you won’t ‘fatigue’ the battery by leaving on the charger .
You will need the SharpTools plug in for Tasker. I think it costs $3.50 US.
You need to install the SharpTools app (Android or iOS) and link it to ST. It will show up as a smart app in ST.
Open the SharpTools smart app in ST and select the devices you want to be available in SharpTools.
After you do that go back to Tasker and create a “task” using the SharpTools plug in. You should be able to chose the device in SharpTools that you want to operate.
I’ve been trying to get Tasker and LAN trigger device made by @TAustin to work together so routines like this would run locally. No luck so far. There’s something I’m doing wrong, I just can’t figure out what it is.
If you are going down the Tasker route you could just turn a charger on and off using an API call. An alternative would be to create a virtual battery device (I use the @TAustin driver) and update that using the API. I favour the latter as it gives you the battery and power source in SmartThings where it really ought to be already.
Here is an example of an HTTP Request in Tasker. It requires knowledge of the device ID in UUID form, and also a suitably scoped Personal Access Token for the bearer authorization.
I’m slowly starting to get hang of this. But bare with me, I’m novice with these things. Under the Query Parameters I have FIle/Directory To Save With Output. Is is that part where the piece of code should be? Is it a file you have uploaded from the files of your phone?
Can you elaborate on this at all? This is something I’ve been wanting to do for a while, but couldn’t find a way to do it through SharpTools. I’ve created a new virtual battery device using the vEdge Creator from TAustin, I have the UUID of the battery device, and have created a PAT with (I believe) appropriate authorized scopes. I’m pretty familiar with Tasker etc., but I’m still getting an error when I try to run the task. Any tips? TIA!
That last line with just the E is where I would expect the actual error. IIRC, there’s a variety of different Tasker variables that get set with response codes and things like that. I would either Notify > Flash those variables or store them to global variables so you can review and see if they have any meaningful data.
Have you used HTTP Actions in Tasker before? At least one other person mentioned that they got a generic error like that when Tasker didn’t have the required permissions it needed on Android 12.
Otherwise if you try to do it with the SharpTools Tasker plugins, I’d be happy to help out since I wrote them.