Disable Sleep Timer When Voltage > n volts

So it looks like by default the system sleeps when it doesn’t detect an engine being started fairly quickly. This makes sense, but when I’m developing not in the car, this is just annoying. It’s also silly because when it shuts down, it just boots up again from the WAKE timer (or something I guess I’m not sure).

I know I can manually disable this somehow on a per time basis, but I like automating things, and I’m looking for a first task.

I probably just need to read some docs, but I noticed in my dashboard, that the Auto pi reports >= 18 V on AC, and between 12-14 V in my car. So I was wondering how I could do something that if the Voltage is above 18 V disable sleep timers.

Hi @SJrX.

Unfortunately, there isn’t such a setting as of today. However, what you can do is fiddle with the power settings for your device (link to the documentation here). Changing the suppress regular expression to something that works for you should stop the device from going to sleep, however you may need to change it again after you put the device back in your car. The rest of the power settings could also be changed to get the desired outcome.

Another place where you can look into is the services, however they are much lower level and should only be changed with caution and if you know what you’re doing - you can go to Advanced -> Services and view the event_reactor service. In there, under Reactors, you should be able to see all the reactors that set up sleep timers and remove them and change what you would like so it fits your needs.

Please be cautious when changing those settings, however, as they are much lower level than the normal settings on the device and may cause issues. Change them only if you know what you’re doing.

Best
Nikola

Hi @SJrX.

I apologize for the misinformation. There is another way to stop the sleep timers from being set, however you will need to open your device up and have a specific connector to achieve it. You can take a look at this community post for a bit more information.

Best
Nikola