technology creates problems and
not all problems can be solved technically. Trust me, I am a mom and a software engineer with 25 year experience.
The best solution is through human interaction - talk to him and agree on a limit that he can adhere to, like finishing homework first, and no more than 1 hour each day, with reward and punishment policy. :)