Get charging current

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
bichlepa
Posts: 148
Joined: 04 Mar 2014 18:29
Location: Germany
Contact:

Get charging current

Post by bichlepa » 18 Apr 2015 21:02

I'd like my AM to notify me the charging current after connecting a charger to it. (And maybe even get discharging current when no charger is connected.)

Can you add an action that can get the charging current, Martin?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Get charging current

Post by Martin » 20 Apr 2015 19:28

Charging current is one of the features that was added only recently to Android. My last tests showed that the function had some issues so I did not add it to Automagic yet. I add it to the todo-list to check again, maybe things got better.

User avatar
bichlepa
Posts: 148
Joined: 04 Mar 2014 18:29
Location: Germany
Contact:

Re: Get charging current

Post by bichlepa » 23 Apr 2015 20:42

Thanks for the new variables in the EAP version. But unfortunately it works only in Android 5. On my phone with Android 4.4.2 it isn't working :-(

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Get charging current

Post by Martin » 24 Apr 2015 10:38

Yep, unfortunately it's Android 5 only. The new variables don't work very well, a Nexus 5 only returns values for one of the variables. I still have to test a few other devices.
It might be possible to read the values using an action Init Variable Text File from here /sys/class/power_supply/battery/current_now or here /sys/class/power_supply/battery/batt_current or another file.

User avatar
bichlepa
Posts: 148
Joined: 04 Mar 2014 18:29
Location: Germany
Contact:

Re: Get charging current

Post by bichlepa » 24 Apr 2015 18:58

Thank you for that hint!
It works when I read this file: /sys/class/power_supply/sec-charger/current_now

Locked