Finally, i found the solution, and it worked perfectly. Here is the cli conifg:
#1. Define kid control firewall rules, to block IPTV box, child's cellphone and home PC out of internet connectivity
/ip firewall filter
add action=drop chain=forward comment="Block IPTV Box" src-mac-address=IP:TV:XX:XX:XX:XX time=8h-1d,sun,mon,tue,wed,thu,fri,sat
add action=drop chain=forward comment="Block my child's cellphone" disabled=yes src-mac-address=KI:DX:XX:XX:XX:XX time=8h-1d,sun,mon,tue,wed,thu,fri,sat
add action=drop chain=forward comment="Block home PC-LAN" src-mac-address=PC:LA:NX:XX:XX:XX time=8h-1d,sun,mon,tue,wed,thu,fri,sat
add action=drop chain=forward comment="Block home PC-WLAN" src-mac-address=PC:WL:AN:XX:XX:XX time=8h-1d,sun,mon,tue,wed,thu,fri,sat
#2. Define auto kid control script.
#Note: DA:DX:XX:XX:XX:XX is dad's cellphone mac address, MO:MX:XX:XX:XX:XX is mom's cellphone mac address.
/system script
add dont-require-permissions=no name=autokidctrl owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#Define Macro phonemac1\r\
\n:local phonemac1\r\
\n#Define Macro phonemac12\r\
\n:local phonemac2\r\
\n#Find MAC address of cellphone1 in dhcp-server lease table, if found set phonemac1=DA:DX:XX:XX:XX:XX, else set phonemac1=false\r\
\n:do { :set phonemac1 [/ip dhcp-server lease get [/ip dhcp-server lease find mac-address=\"DA:DX:XX:XX:XX:XX\" ] mac-address ] } on-error={:set phonemac1 \"f\
alse\"}\r\
\n#Find MAC address of cellphone2 in dhcp-server lease table, if found set phonemac2=MO:MX:XX:XX:XX:XX, else set phonemac2=false\r\
\n:do { :set phonemac2 [/ip dhcp-server lease get [/ip dhcp-server lease find mac-address=\"MO:MX:XX:XX:XX:XX\" ] mac-address ] } on-error={:set phonemac2 \"f\
alse\"}\r\
\n#If phonemac1=DA:DX:XX:XX:XX:XX or phonemac2=MO:MX:XX:XX:XX:XX, then disable kid controll firewall rules\r\
\n:if ( \$phonemac1=\"DA:DX:XX:XX:XX:XX\" || \$phonemac2=\"MO:MX:XX:XX:XX:XX\" ) do={\r\
\n#Disable IPTV box internet blocking rule.\r\
\n/ip firewall filter disable [ /ip firewall filter find src-mac-address=\"IP:TV:XX:XX:XX:XX\" ]\r\
\n#Disable my child's cellphone internet blocking rule.\r\
\n#/ip firewall filter disable [ /ip firewall filter find src-mac-address=\"KI:DX:XX:XX:XX:XX\" ]\r\
\n#Disable home PC-LAN internet blocking rule.\r\
\n/ip firewall filter disable [ /ip firewall filter find src-mac-address=\"PC:LA:NX:XX:XX:XX\" ]\r\
\n#Disable home PC-WLAN internet blocking rule.\r\
\n/ip firewall filter disable [ /ip firewall filter find src-mac-address=\"PC:WL:AN:XX:XX:XX\" ]\r\
\n#Else if both phonemac1 and phonemac2 value are false, then enable kid controll firewall rules\r\
\n} else={\r\
\n#Enable IPTV box internet blocking rule.\r\
\n/ip firewall filter enable [ /ip firewall filter find src-mac-address=\"IP:TV:XX:XX:XX:XX\" ]\r\
\n#Enable my child's cellphone internet blocking rule.\r\
\n#/ip firewall filter enable [ /ip firewall filter find src-mac-address=\"KI:DX:XX:XX:XX:XX\" ]\r\
\n#Enable home PC-LAN internet blocking rule.\r\
\n/ip firewall filter enable [ /ip firewall filter find src-mac-address=\"PC:LA:NX:XX:XX:XX\" ]\r\
\n#Enable home PC-WLAN internet blocking rule.\r\
\n/ip firewall filter enable [ /ip firewall filter find src-mac-address=\"PC:WL:AN:XX:XX:XX\" ]\r\
\n}"
3. Define a scheduler to run auto kid control script.
/system scheduler
add interval=10m name=schedule1 on-event="/system script run autokidctrl" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=\
jun/01/2021 start-time=00:00:00