How can I create a time quota in OpenWRT?

Hello OpenWRT community. I want to give my son 1 hour each day of internet access, which he can use at any time he chooses. I also want to have an easy way to give him one additional hour if he does his homework. How can I accomplish this using OpenWRT? I know I can set hours when the internet is unavailable (such as 10pm to 9am etc) but that is not what I am looking for.
Thank you for your help.

I do not remember seeing a tool for that kind of action. There are a few captive portals, like used in hotels for customers, but usually they are require some login action.

And I am not sure if they would offer timed approach of one hour access. It might be possible to grant one continuous hour-long session, but I guess that you would like to have possibility for using the time in several pieces, like 20 minutes now and 40 minutes later etc. That might not be so easily implemented, especially as the mobile devices are chatty and communicate in the background, so it may be difficult for the portal to detect when your son stopped using phone.

I would also look into mobile device installed parental control tools, e.g. included in various security/antivirus suites. You might be better off with trying to control the son's phone than trying to set it in the router.

And if they got a subscription including data, they'll just disable wifi, and keep watching TikTok.

Use Apple screen time or similar instead

Putting a screen time on your kid's phone would be better. Another solution is you can disable specific services (like YouTube, tiktok etc) using adguardhome package on openwrt. I tried looking into openNDS but couldn't find luci version of it. Anyways, once you install openNDS, configure it to act as a captive portal specifically for your son's device MAC address, then set daily session limit (1 hour).