Pixelblaze becomes unresponsive after a handful of broken websocket connections?

Hi,

I’m attempting to trigger UI elements with a Pi Pico W and physical buttons. The Pi is relying on this uwebsocket script.

So far it’s going pretty well, except that the location where the Pi is to be installed gets power cycled regularly, and the PB itself does not. The Pi doesn’t have any capability to detect imminent power loss and properly close the websocket connection, and after a few power cycles the Pixelblaze will stop accepting new connections. Both the Pi and browser are prevented from connecting.

Is there a way to tell the PB to drop all connections? I don’t have a way to automate power cycling it when this happens.

I don’t know of one, and you probably already considered this, but a very brute force idea could be to have a boot script on the Pi Pico W cycle a relay on Pixelblaze’s power line.

Thanks Jeff, I appreciate the advice!

I could maybe rig a relay up to reboot the PB, but due to some context I left out, if it can be avoided at all I would prefer not to. When the PB reboots the LEDs all flash bright white for a couple seconds before the PB script begins executing again. If that happens when the planetarium building is in pitch-dark mode for a show, it would be very bad for the audience.

I guess I’m hoping for a WS api feature that would allow me to either set the timeout length or manually close “all but this one” connections.