elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
133 stars 24 forks source link

Special Interfaces (example: vtun0) unable to be turned off/on #101

Open matth0727 opened 1 year ago

matth0727 commented 1 year ago

I see in version 2.0.15 that it was mentioned that special interfaces do not support turn off/on, but is this to still be expected even in the current versions? I essentially need a way to Enable/Disable the interface (vtun0). Was curious of the reasoning if this is still a problem.

From what I can tell, it looks like this may have been disabled since the toggle sometimes causes instability in EdgeOS and causes the router to crash... at least this is what I experienced.

I am seeing the integration properly, but the command even as an Admin, doesn't change the EdgeOS configuration.

Thanks!

matth0727 commented 1 year ago

Just a quick note on this one as well... It looks like I can go back to 2.0.5 (or even 2.0.14), and get this to work as desired, but I lose some of the newer features. So not completely a loss, since the main thing I need is the toggle to work.. but still curious about the loss of this functionality in the newer versions.

For anyone else who is trying to get this working in Home Assistant, in version 2.0.14 of the integration, it looks like I can get it to run somewhat stable by using Scripts (Settings > Automations & Scenes > Scripts) and creating a script using a Sequence with 'Device' "EDGEROUTERX Interface VTUN0" and Action: Turn off or Turn on - EDGEROUTERX Interface VTUN0 Status. (I just created two separate scripts to do either function...

... This way the Toggle is not getting confused on the status of the interface and bombarding the router's configuration with commands. I can also add the Entities to Lovelace to be able to run either of the scripts and then monitor the "EDGEROUTERX Interface VTUN0 Sent Packets" entity thru the integration to see if it's actually on.

Would still love to hear from the author @elad-bar to know if this is being worked on for a more straightforward integration, but otherwise I'm loving the project!

Thanks so much!

image1

image0

elad-bar commented 5 months ago

can you please check with v2.1.3?

thanks