Controlling Axis camera status LEDs

I recently discovered that it is possible to manually control the LEDs on the Axis network cameras (using SSH and the Linux sysfs LED driver), so I decided to write a simple Java library that would allow me to do this from my robot code (or from a SmartDashboard extension). This could be useful for diagnostics or debugging. I have designed this library to work with the M1013 camera, but it could easily be modified to work with other models. In reality, this is code probably not super useful because it is usually impossible to see the status LEDs due to the ring lights that are usually used with these cameras.

If you want to play around with it anyway, the code is available here.

To use it you need to include the sshj library in your robot code, which is easy if you use GradleRIO (which, by the way, is awesome), but otherwise you will probably be able to include the jars manually. You will also need to enable SSH access on the camera.

The only known limitations are that there is some lag when controlling the LEDs (due to how the commands are executed over SSH), and that if the camera is disconnected a backlog of commands can build up and be executed all at once once the camera is reconnected.

I hope someone finds this useful, but at least it was a way to occupy my time while waiting for kickoff. :slight_smile:

What kinds of colors can the light do? Does the camera have an RGB light or are the LED’s just the standard colors it uses? Also have you found a way to do lighting effects or are the delays in the camera too sporadic?

The ring consists of two sections (left and right), each with a red and a green LED. They can only be turned on or off (the brightness is not variable), allowing them to appear to be red, green or yellow.

You can make the LEDs blink using the kernel driver, and this functionality is exposed in my library. It is also possible to use the status LEDs as network or SD card access indicators.