Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work on UDM-SE to powercycle PoE? #1

Open
markusd1984 opened this issue Sep 15, 2023 · 1 comment
Open

Does this work on UDM-SE to powercycle PoE? #1

markusd1984 opened this issue Sep 15, 2023 · 1 comment

Comments

@markusd1984
Copy link

Is it possible to use same or similar on UDM-SE to powercycle PoE on a schedule?

@lwbt
Copy link

lwbt commented Apr 22, 2024

I just came across this tool myself and found some terms a bit confusing (--host TEXT = The URL of the unifi controller). But is works.

# Install with pipx
pipx install git+https://github.com/ep1cman/unifi_poe

# Power cycle port labeled as 2 on UDM-SE
unifi_poe \
 --host my_udm_ip \
 --username local_user \
 --controller_type udm \
 --switch-mac aa:bb:cc:dd:ee:ff \
 --switch-port 2 cycle

One side effect I have in my setup is that I lose the connect to the UDM on a completely unrelated switch which I have to restart by myself. But it's late now and I will have to figure it out later.

To make it work on a schedule you will have to use something like cron / systemd timers or something appropriate in a programming or scripting language.

Edit: And you should use a local account, because the script can't handle MFA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants