Closed iclems closed 6 months ago
Sorry for filing this, bought you a coffee to apologise for the noise :-) I can probably take a look at the code in a couple of weeks myself to debug if you need help
Thx for submitting the bug and for the coffee of course!
Looks like the RequiresACPower
value in /Library/Preferences/com.apple.TimeMachine.plist
is neither 0
nor 1
in your case. Could you please share what value it is in your case?
Maybe I need to change this to an enum of some sort instead of a boolean.
It would be interesting to know what possible values there could be.
For some weird reason it’s a string here: 
On 9 Jan 2024, at 12:07, Lukas Pistrol @.***> wrote:
Thx for submitting the bug and for the coffee of course!
Looks like the RequiresACPower value in /Library/Preferences/com.apple.TimeMachine.plist is neither 0 nor 1 in your case. Could you please share what value it is in your case?
Maybe I need to change this https://github.com/lukepistrol/TimeMachineStatus/blob/b14769d534db6f8fca08a0a496baf5c3f2dca7ad/TimeMachineStatus/Model/Preferences/Preferences.swift#L32C18-L32C18 to an enum of some sort instead of a boolean.
It would be interesting to know what possible values there could be.
— Reply to this email directly, view it on GitHub https://github.com/lukepistrol/TimeMachineStatus/issues/17#issuecomment-1882869800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIROMVJXXWK2JLRFZHTWW3YNUQIFAVCNFSM6AAAAABBS4MMDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSHA3DSOBQGA. You are receiving this because you authored the thread.
And what string? Which device are you on? Any special energy related settings?
I tried on both my Mac Mini and (Intel) MacBook Pro and couldn't reproduce it unfortunately. The checkbox in Time Machine Settings for backing up on battery power only changes the value to either 0 or 1. And energy related settings like Power Nap have no impact on the value.
It’s actually a 0 (I attached a screenshot earlier) but set as a string. Maybe a tool I used tricked it… unfortunately it’s hard to unlock this file to edit manually
Clément
Le mar. 9 janv. 2024 à 12:29, Lukas Pistrol @.***> a écrit :
And what string? Which device are you on? Any special energy related settings?
I tried on both my Mac Mini and (Intel) MacBook Pro and couldn't reproduce it unfortunately. The checkbox in Time Machine Settings for backing up on battery power only changes the value to either 0 or 1. And energy related settings like Power Nap have no impact on the value.
— Reply to this email directly, view it on GitHub https://github.com/lukepistrol/TimeMachineStatus/issues/17#issuecomment-1882900403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIROMV2HFEV5VXMSKKTC63YNUSZZAVCNFSM6AAAAABBS4MMDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSHEYDANBQGM . You are receiving this because you authored the thread.Message ID: @.***>
This file should not be edited manually. Which tool are you talking about?
Could you run the following command in a terminal session to read the file out?
plutil -p /Library/Preferences/com.apple.TimeMachine.plist
Then look for the line that starts with "RequiresACPower" =>
. What value has it assigned?
It should be either 0
or 1
(without any quotes) like so:
"RequiresACPower" => 1
"RequiresACPower" => "0"
The problem is that it’s “0” and not just 0 so it’s a string with a 0 inside, not a bool in my case
On 18 Jan 2024, at 13:58, Lukas Pistrol @.***> wrote:
This file should not be edited manually. Which tool are you talking about?
Could you run the following command in a terminal session to read the file out?
plutil -p /Library/Preferences/com.apple.TimeMachine.plist Then look for the line that starts with "RequiresACPower" =>. What value has it assigned? It should be either 0 or 1 (without any quotes) like so:
"RequiresACPower" => 1 — Reply to this email directly, view it on GitHub https://github.com/lukepistrol/TimeMachineStatus/issues/17#issuecomment-1898433527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIROMRAFQ4CQTN6F77JVWLYPEL63AVCNFSM6AAAAABBS4MMDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJYGQZTGNJSG4. You are receiving this because you authored the thread.
Ok then something messed up your time machine preferences.
To fix this you can simply run this in Terminal:
sudo defaults write /Library/Preferences/com.apple.TimeMachine.plist RequiresACPower -bool NO
Describe the bug Probably related to Time Machine Editor.
To Reproduce Steps to reproduce the behavior:
Expected behavior Only shows an error when opening
Screenshots
Additional context Add any other context about the problem here.