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

Turn Off LED script #24

Open
ricktendo opened this issue Sep 11, 2018 · 7 comments
Open

Turn Off LED script #24

ricktendo opened this issue Sep 11, 2018 · 7 comments

Comments

@ricktendo
Copy link

Is there a way to use the API to turn off the LED on a UAP, if so could you create a script for this?

The UAP in my room is really bright at night and I would like a script that could disable this at nights.

@stevejenkins
Copy link
Owner

That's a great idea! Let me see what I can figure out...

@ricktendo
Copy link
Author

Thanks!

@stevejenkins
Copy link
Owner

Ooh.... I think I'm on to something. SSH into your AP and do this:

echo '0' >/proc/gpio/led_pattern

Does it turn your LED off?

If so, turn it on again with:

echo '1' >/proc/gpio/led_pattern

I think the best option will be two micro-scripts that can be run via cron which set the desired LED function at the desired times. You could schedule multiple on and off events that way.

@ricktendo
Copy link
Author

It worked perfect!

Any chance to make the controller aware of the change in setting of the LED?

@stevejenkins
Copy link
Owner

Yeah... that might be a bit trickier. But I'm doing some research and will post what I find.

There's a two year old feature requests in the UBNT forum for the ability to schedule the LED lights. Maybe I'll nudge some friends at UBNT to see if someone can cobble that together.

@ricktendo
Copy link
Author

ricktendo commented Nov 13, 2018

LOL yea, I was probably the last to reply in that feature request. They have the new UniFi LED, these have a timer feature

https://unifi-led.ubnt.com/

Thanks for this!

@mbierman
Copy link

Seems like mother crontab on my APs get wiped out periodically. Is there a way to make them persistent?

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

3 participants