travisghansen / hass-opnsense

OPNsense integration with Home Assistant
Apache License 2.0
220 stars 29 forks source link

[FR]: OpenVPN client service switch #171

Closed V4ler1an closed 3 weeks ago

V4ler1an commented 1 month ago

I'd like to use Home Assistant to restart both my Openvpn client connections when needed. I run them together in a failover gateway group.

I notice this integration provides an Openvpn service status switch. But when I either toggle it off manually, or use the opnsense.restart_service action, it only reconnects one of the clients. Always the same one. How might I get it to work on both client connections?

Here's the yaml I tried: image

Integration ver: 0.2.0 OPNsense ver: 24.7.3_1

V4ler1an commented 1 month ago

Found out how to do this directly using the OPNsense REST API (Start, stop and restart each individual OpenVPN client connection). But it would be nice if we could do this through your integration.

alexdelprete commented 1 month ago

Not sure, but might be covered by #206.

cc @Snuffy2

Snuffy2 commented 1 month ago

Yes, I believe it should be fixed with #206

Snuffy2 commented 1 month ago

@V4ler1an please check if this is working now with v0.3.2

V4ler1an commented 1 month ago

I'm current on 0.3.1 and HA isn't offering me a further update. If this is a beta, what's the recommended update install process please?

alexdelprete commented 1 month ago

I'm current on 0.3.1 and HA isn't offering me a further update. If this is a beta, what's the recommended update install process please?

if you want HA to consider pre-release versions (betas) you need to enable the relevant pre-release integration switch: switch.opnsense_integration_for_home_assistant_pre_release.

All this is described here: https://hacs.xyz/docs/use/entities/switch/

Snuffy2 commented 1 month ago

It's not a beta though. HACS will periodically check for updates to installed integrations. To force a check:

2024-09-30_21-43-05
V4ler1an commented 3 weeks ago

Using 0.3.4 (prod release) I was successully able to:

Thanks for fixing this.

alexdelprete commented 3 weeks ago

Excellent. Thanks for the feedback.