I am creating a "digital dashboard", consisting of a TV and a Raspberry Pi 3B+. The TV just shows calendar, time, weather, etc..
In the tutorial I am following for that, the creator uses a cron job to turn the TV on and off via CEC. However, he does this at a specific timeframe.
What I would like to achieve here, is that whenever one of two phones (or both) - the ones of my girlfriend and mine - are logged into the router, the TV is on, if not, the TV is off. So, to recap, whenever nobody is at home, the TV shouldn't be turned on / should be turned off. Also, at the night, lets say 11PM to 6AM, the TV shouldn't be on either, respectively, it should be automatically turned OFF at 11PM.
My router is a Fritz!Box 7520, just to mention that as well.
What do you think? Is this even doable? Or am I gonna run in huge effort with high costs for this?
Thanks in advance!