I have a config that detects when a AP is plugged in to the network. It then triggers a script that:
ssh to the device
check the build version
if old version, copy new sysupgrade image and upgrade
if correct version is in place, it issues the poweroff command to shut them down.
Combined with PoE, this allows us to setup a switch with a host on it and upgrade the APs by just plugging them in and waiting until they power off
Unfortunately, the Openwrt One AP will power back on a minute or two later.
How can I make it stay off?
Or, as an alternate, is there a way to manipulate the LEDs on the WAN ethernet jack (which is unused when we are doing this update) The LEDs on the front panet are normally not visible when we are doing this. Turning these LEDs on when the correct version is detected would be a usable work-around.
Most devices that can run OpenWrt cannot be powered off. If you issue the shutdown command, the operating system shuts down but the device itself stays powered on.
You should achieve about the same effect by simply bringing the interface down. A simple ifdown br-lan should do the trick.
Regarding the LEDs: they should be GPIO-driven - I don't own the device, I just checked the docs. Check the LEDs in /sys/class/led for the corresponding LEDs. To turn a LED on, do
Thanks, I was able to find the controls for the ethernet LEDs and use those.
The Openwrt One router and the wndr3800s that I've been using for the last decade+ do turn themselves off. It's just that the Openwrt One turns itself back on
What I'm looking for is for a clear visual way to let someone know that the update is completed so they can unplug it and go on to the next one. Powering off is best (and makes sute all updates get flushed to disk correctly), but turning on a LED can work.