AccSettings icon indicating copy to clipboard operation
AccSettings copied to clipboard

[FEATURE REQUEST] Also show charger information like voltage/current/power/charging protocol

Open KaMyKaSii opened this issue 2 years ago • 5 comments

Just as it is already done with the battery information. I currently use a personal script on Termux to see this. It needs bc installed and the logic only works if the charger has enough power to charge the battery and power the phone. Screenshot_20220606-112857818_1 charger.txt

KaMyKaSii avatar Jun 06 '22 14:06 KaMyKaSii

Currently acc only outputs the voltage, current, power, and status of the device.
Your requirement is to additionally display the voltage, current, power and protocol of the charger? I don't know much about it, but I think maybe not all device kernels support getting the status of the charger. This may require help from @VR-25, who is the developer of acc.

CrazyBoyFeng avatar Jun 06 '22 15:06 CrazyBoyFeng

Indeed, not many devices provide this information. Still, I'm considering the idea. I like your script. I'd like to take a look at your /sys/class/power_supply/usb/uevent as well.

Off-topic: acc wiki is live (and empty!) Anyone is free to add/edit pages.

VR-25 avatar Jun 06 '22 18:06 VR-25

I thought support was implemented equally as battery information. Using a good USB Tester (TC66C) I see that it reports 15% more power for a standard 5V USB charging and 30% more for a 9V QC3 charging than what is reported by the kernel. I don't know if this difference is due to low kernel precision, loss of energy in heat or both.

Indeed, not many devices provide this information. Still, I'm considering the idea. I like your script. I'd like to take a look at your /sys/class/power_supply/usb/uevent as well.

Here is the contents of the uevent file:

root@ASUS_Z01KD_3:/ # cat /sys/class/power_supply/usb/uevent
POWER_SUPPLY_NAME=usb
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_MAX=9000000
POWER_SUPPLY_VOLTAGE_NOW=8574218
POWER_SUPPLY_PD_CURRENT_MAX=-22
POWER_SUPPLY_CURRENT_MAX=1400000
POWER_SUPPLY_TYPE=USB_DCP
POWER_SUPPLY_TYPEC_MODE=Source attached (medium current)
POWER_SUPPLY_TYPEC_POWER_ROLE=sink
POWER_SUPPLY_TYPEC_CC_ORIENTATION=2
POWER_SUPPLY_PD_ALLOWED=1
POWER_SUPPLY_PD_ACTIVE=0
POWER_SUPPLY_INPUT_CURRENT_SETTLED=1400000
POWER_SUPPLY_INPUT_CURRENT_NOW=764345
POWER_SUPPLY_BOOST_CURRENT=0
POWER_SUPPLY_PE_START=1
POWER_SUPPLY_CTM_CURRENT_MAX=-22
POWER_SUPPLY_HW_CURRENT_MAX=3000000
POWER_SUPPLY_REAL_TYPE=USB_HVDCP_3
POWER_SUPPLY_PR_SWAP=0
POWER_SUPPLY_PD_VOLTAGE_MAX=5000000
POWER_SUPPLY_PD_VOLTAGE_MIN=5000000
POWER_SUPPLY_SDP_CURRENT_MAX=-22

KaMyKaSii avatar Jun 07 '22 14:06 KaMyKaSii

@KaMyKaSii, try the latest pre-release.

VR-25 avatar Jun 25 '22 21:06 VR-25

@KaMyKaSii, try the latest pre-release.

Sorry for the late reply. For me using the latest ACC release it is just printing the CHARGE_TYPE, no POWER_SUPPLY_* info

KaMyKaSii avatar Aug 25 '22 14:08 KaMyKaSii