Hacker News new | past | comments | ask | show | jobs | submit login

One of those plagues of shitty consumerism & no market pressure: there's a standard that works great but no one implements it, cause they suck & are no good & there's no consumer pressure to do basic shit.

USB HID has all kinds of sensors & telemetry it can do. USB HID includes a whole sub-spec on Power Devices, with all kinds of information that chargers & batteries can report. To take one example, the Battery System Page (x85) can report Current, Voltage, Temperature, Absolute/RelativeStateOfCharge, RemainingCapacity/FullCapacity, RunTimeToEmpty, ChargerConnection, OutputConnection, ChargingIndicator, and CycleCount (among many other factors) to tell you what is happening. You can set RemainingCapacityLimit or RemainingTimeLimit to trigger a USB alarm condition when capacity falls under threshold. You can monitor individual inputs & outputs separately.

(The one ask I have that's not supported by the spec: a StopChargeAtCapacity setting for batteries, so I can stop my UPS's 5000mah battery at 4200mah to extend it's life drastically)

It's a stupid senseless world where the obvious never happens. Consumers aren't educated enough to have sensible asks. What is possible is ignored. I'll try to break out 'lsusb' more in the future when charging, but my impression is that basically no one- not batteries nor chargers- implements the ancient, obvious, sensible, & easy spec for power devices to report the basics about what they are doing. For shame!




> StopChargeAtCapacity

I’d also love to see this on power bricks so that I can tell the charger to stop charging my phone and tablet at 80%, regardless of what the device manufacturer gives in terms of software control


I do this with the Home Assistant app on my phone. When the battery level gets to 80% it triggers the smart plug the charger is connected to, to switch off. My phone is 3 years old now and according to AccuBattery still has a battery health of 2499mAh out of a design capacity of 2700mAh (Based on 977 charge sessions for 1,215,025 mAh total)


I do this with my Android phone using the Automate app (Tasker would work too) and a flashed smart plug. Phone hits 80% charged and it turns off the smart plug. Charger is plugged in obviously.


Seems like you want the charger to be aware of the hosts state of charge. Typically telemetry only flows from device to computer, which this violates.

Most laptops/tablets/phones/&c do know their state of charge & can in software disable charging, although only some expose this to users. This is often available in Linux but I dont think any particular scripts/apps for controlling this have risen to notice yet.


With USB-C, communication (and even charging) can be bidirectional. It’s built in to the spec


Charging can be yes.

But you are still asking for a complete rewrite of how everythinf works, for it all to be totally different. It's not a totally unreasonable ask, it's just not in reach. Unlike my discussion above, which proposes a plan entirely doable with standards we have.

USB-PD negotiates power delivery, but it doesnt communicate battery or other status. It uses a different sideband to nevotiate outside regular usb communications, and conveys very limited information. There's no battery informatuon conveyed.

My above post spoke to how multi-decade old USB HID standards can be used to present current battery status for battery packs. We'd have to flip the relationship around- make the charger be a host that can manage an attached battery, the laptop be a peripheral that exports it's power status, to invert tbe control system as you want, to make the charger responsible for battery managememt & not the device. Or we'd need to radically revamp usb-pd & layer in a lot more capabilities.

It'd be cool, in some ways. Plug in any device & it'll only 85% charge. But it's also far more complicated & rewrites all the rules in every way, unlike what I was talking about, which is just battery packs & chargers kind enough to export their status over some very very old simple specs.


Yes I agree that my wish is unreasonable and your plan is much more attainable.

I don’t want to flip everything on it’s head (OK that’s a lie: I would love to flip almost everything in the name of having better solutions). But what I mean to say is I know what I’m asking for is unreasonable and certainly unrealistic in a 1-3 year timespan, but I know it’s possible and I like to dream because sometimes moonshots actually land you on the moon




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: