Page 1 of 1

Get charging current

Posted: 18 Apr 2015 21:02
by bichlepa
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?

Re: Get charging current

Posted: 20 Apr 2015 19:28
by Martin
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.

Re: Get charging current

Posted: 23 Apr 2015 20:42
by bichlepa
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 :-(

Re: Get charging current

Posted: 24 Apr 2015 10:38
by Martin
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.

Re: Get charging current

Posted: 24 Apr 2015 18:58
by bichlepa
Thank you for that hint!
It works when I read this file: /sys/class/power_supply/sec-charger/current_now