ML algorithm to predict the state of state of a device (ON/ OFF) based on day, time and location I require to develop an machine learning algorithm to predict that if a secondary car battery should be connected to load at any given time of day based on the automobile usage profile of the user. (the output is either 1 or 0 , ON or OFF)

Some Background : My project car is equipped with a secondary battery which has to run a car Computer, LTE modem etc. So it is important that the battery is not connected to these loads all the time so as to extend the run time of the battery when the car is not in use( primary car battery charges the secondary battery when the car is running.) . These electronic parts are used for IOT operation, running alexa voice interaction etc.

So it is necessary to predict at what times user is using his car and switch the circuit ON before the driver actually gets in the car, So that it can start alexa voice interaction  with user as soon as he enters the car without any delay( if it starts after user gets in , it will take some time before all the internet connections are up and running.).

Any suggestions on which existing machine learning algorithm I can use here? For the start I’m planning to predict the state based on the day, time and location only.  For example if the time is 7.am, weekday, and the location is home,  the car is usually ON to travel to office., if the time is 10.00am and the location is Office , the car is usually OFF.

Please help me with any  ideas/ suggestions that can also  improve the concept.
You need to predict 2 classes (on/off). The first question is: Based on what data (exactly) this happens?

Problem statement

You do have some training data, so this is a supervised learning task. The algorithm choice really depends on the question what data exactly to need and what kind of patterns you expect to detect:


is the prediction based on a single user (data will be scarce then) or on multiple users (enough to determine similar users for predictions)
does it really suffice to consider Daytime + Week/Weekend? What about public holidays or seasons, where the usage behavior likely changes
Will vacation times impact the usage behaviour beyond date/time?


Picking an algorithm

Once you now based on which data you will recognise what kind of pattern you think about algorithms that fit well. For example: If you really only need time + weekday/weekend then very simple algorithms might do. Decisions trees for example (with simple rules as if weekday + 7.a.m. then turn on).

If rules need to be a lot more complex (and I think this is the case here) you might need a more complex model. I have very little experience with time based predictions but things like recurring neural networks come to mind which are heavily used for time based predictions (e.g. web analytics in order to find anomalies in usage patterns for any given point in time). 

Concerns

Your problem sounds like you need a very accurate prediction (minute-wise accuracy) while the actual user behaviour will be a bit more random (some times earlier, some times later). Many algorithms try to reduce an error which often leads to in-between values if the actual time of an event fluctuates around a mean value. 

When using neural networks you can influence how the error is calculated and you can train it in order to favour one kind of error (being early) over another. This makes it more complex, and requires that being "too early" is not an issue (or that the user is always very reliable).