I haven’t posted in the community before but I found this so useful I thought I would see if there is anyone else looking for this solution.
We have a Synology RT6600ax router. One of our favorite features of this router is the Safe Access App that can be used to reward time to certain devices on the network. For example the TV has internet scheduled from 7am to 9am. Outside of those hours the router blocks it from connecting to the internet.
We can login to the router, via an app on our phones, to reward time on the internet so once chores/homework/etc. are done the kids can use the TV. We have the same rules for a few devices on our network. The mobile app can be agonizingly slow when we are not away from home. So I wanted to have a way to do this through home assistant.
There is an SRM integration, however it just gives us presence detection on the router. Helpful, but not exactly what I wanted. So I enabled SSH on the router, dived into it’s dark bowels, and was able to get a solution for this.
The rewards are handled via an sqlite database. I added the SSH connection to home assistant and created some bash scripts that it can execute in order to add and remove rewards to the database. The database is located at /usr/syno/etc/packages/SafeAccess/synoaccesscontrol/database.db
I would be happy to detail more if anyone is interested. The router runs Alpine Linux and Ash so the scripts feel a little janky but it may be a limitation of Ash. I don’t have much experience with it but I would love some collaboration to see if I could do this in a better way.