OPNsense Forum

English Forums => General Discussion => Topic started by: sylvain on June 18, 2024, 05:05:11 PM

Title: Homeassistant automation on defined filters in OPNsense
Post by: sylvain on June 18, 2024, 05:05:11 PM
Hi,

I have a rule defined in Firewall -> Automation -> Filter to disable internet access to the streaming box (very handly if you want to limit screentime and get your kids to actually play / read / do anything not associated with being glued to the TV screen... ).

I can manually manipulate this rule from the web GUI, but I  want to switch the rule on and off using home assistant. I tried following existing tutorials (e.g. https://blog.fuzzymistborn.com/opnsense-firewall/) but these all seem to work with a legacy plugin and I cant get them to work (the enabled state does not change). This could be as easy as the API user not having the proper rights as I could not find the `Rules: API` right that is mentioned in the above mentioned howto ...

Does anyone have experience with this?

many thanks in advance
Title: Re: Homeassistant automation on defined filters in OPNsense
Post by: Alessandro Del Prete on November 23, 2024, 05:29:53 AM
You don't need that if you use this HA integration: https://github.com/travisghansen/hass-opnsense

You can automate many things, Filter Rules included, they will be available as binary switches in HA. :)