Page 1 of 1

MacBook Pro battery charging sensor

Posted: Tuesday 10 October 2023 0:13
by njlammerts
I run Domoticz on raspberry Pi with MQTT/Zigbee. I have several TS0121_plug Smart Plugs with can measure Voltage, Ampere, kWh etc. and can also be switch on/off by Domoticz and scripts with blocky.

I would like to stop charging my MacBook at 80% and start at charging at 10% (which is optimum charge according Apple)
The Macbook has a charging icon with shows the % state of the battery. Is there a way to let the Macbook "talk" with Domoticz to switch the Smart Plug on/off according the battery state?



Scherm­afbeelding 2023-10-10 om 00.10.55.png
Scherm­afbeelding 2023-10-10 om 00.10.55.png (99.98 KiB) Viewed 1618 times

Re: MacBook Pro battery charging sensor

Posted: Tuesday 10 October 2023 13:41
by waltervl
Not needed if you enable optimized charging on your macbook: https://support.apple.com/en-us/HT212049

Re: MacBook Pro battery charging sensor

Posted: Wednesday 11 October 2023 18:21
by njlammerts
I want My MacBook to be charged by "solar power". In my case I let the Smart Plug switch ON 2 hours after SUN Up and switched OFF 2 hours before SUN Down (this is a timer setting in Domoticz) .
My Macbook is 99% of the time connected to the charger, this means it is charged to 100% mostly around 12:00h (and sometimes earlier, depending on use day/evening before).
Mostely the battery is not at 10% (ideal discharge level according Apple) but al 40-60% and then it is charged again to 100% the next day and it keeps being charged until the Smartplug switches off 2h before sundown.
I would like to create a situation whereby the battery is discharged to max 10% and then charged till 80-100% and then stop charging/smartplug.
My former Macbook also had optimized charging, but after a year the battery use was limited to 2-3h and then it had to be charged again.

That is why I would like the communication between Macbook and Domoticz :-)

Re: MacBook Pro battery charging sensor

Posted: Wednesday 11 October 2023 20:35
by HvdW
Here you go.
It stops charging at around 85%, sometimes at 60% and sometimes not at all but in the majority of cases it handles the charging procdure as it was supposed to.
All depends of the rate of decline in charging power.
I'm using it for batteries of mobile phone, bike, battery drill, garden mower, everything.
I'm thinking about using it for cutting of car battery charging as well. Depends of how the cars' app handles charging limits.

BTW The car charging procedure starts normally when enough solar energy is produced.

If you need further assistance, just ask.