![]() Messing with any of the other API endpoints is an exercise to the student. Once you have that, it’s a simple matter of creating the Channel(s) to interact with the end points. ConclusionĪs usual, the hardest part is getting the authentication right. Of course you can expose this to Google Assistant or Alexa depending on how closely you need to control it. Sending an ON or OFF command to the Item will enable/disable the protection status. The Item’s state will represent the protection status at the last time it was polled (I use the default every 30 seconds). Don’t forget to configure it as a command so that it gets sent on to the server and doesn’t just update the Item’s state. If you want, you can set an expire on the Item to reenable the protection after a suitable amount of time. No, that is not my real URL, username, and password. StateTransformation: JSONPATH:$.protection_enabled I could not get this to work using the State Content field so Jinja to the rescue.ĬommandTransformation: 'JINJA:' You will need to check “show advanced” to see all of these properties. The full YAML is below but I’ll also describe the properties set: Thing a recent OH (anything in the past few years ought to work, I ran this on OH 4 SNAPSHOT though).AdGuard Home (tested with v0.107.21 running on FreeBSD opnSense).Look at the docs to see which API endpoints you need to use and the data you need to send. ![]() just enable/disable for one client, just disable parental controls, etc.) the API appears to support that. Note: this is a global enable/disable of all protections. Usually it’s a link in an email or the link that is riddled with trackers but we want to access it anyway. Occasionally I or my SO will encounter a link we want to go to that gets blocked by AdGuard. They haven’t deployed the “v1” version of the API yet so you’ll need to look at the openapi docs (the one where the endpoint starts with /control. The REST API docs for the current version of AdGuard Home is located at AdGuardHome/openapi at master I had a very simple requirement and I wanted to share the solution in case there are others using AdGuard Home on their network.ĪdGuard Home has a REST API that works with BASIC AUTH that provides a number of endpoints to gather information and change the settings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |