We sometimes have customers who ask us whether we have some ideas on how to check that a display supposed to show videos is actually on and works correctly. It so happens that yes, we have a few ideas :-)
It seems that the issue is rather common. Let's imagine a display set in a public location, showing videos, not to say advertisements. It so happens that such a system breaks down, but that the person in charge of maintenance doesn't notice it, because that person isn't looking at the screen all day long. How could we build a cheap enough system which would enable us to notice remotely that the system broke down? The issue is somewhat tricky: we must build a system able to "look at" the screen and to deduce whether it is working or not.
The basic idea is to detect the light that the screen emits, with a photo-transistor and a Yocto-Knob. We simply need to add a blinking pattern in a discreet corner of the screen, put the photo-transistor before it, and measure the blinking frequency with the Yocto-Knob. It's rather easy to do: the Yocto-Knob has a pulse counter coupled to a timer.
We simply need a Yocto-Knob and a photo-transistor
For the sensor part, we printed a small black plastic piece in which we hid the photo-transistor. We fixed the device with repositionable glue. For a real use in a public location, we should probably plan for something sturdier :-)
The blinking pattern
For the system to work well, there must be enough light to detect. It so happens that a screen doesn't actually emit a lot of light. Therefore, we chose to draw a small square of which the color alternates between black and white in the lower left corner of the screen. Thus, we maximize brightness differences and we make them easier to detect. There are two ways to create this blinking square.
Putting it directly in the video
The first idea that comes to mind is to put the blinking square directly in the video. But it's not necessarily the most practical or the smartest way.
- You may not want, or have the opportunity, to redo the rendering of all the videos you are going to display to integrate a small blinking square into them
- If it is integrated in the video, the square may not appear at the wanted location. Indeed, if the ratio of the video and of the screen don't correspond, the video player is going to add black bands, which may move the square with regards to the edge of the screen.
If the size of the screen and of the video don't match, you are going to have a problem
Adding it to the video player
In the end, the most convenient way we found was to recode our own video player which, on top of displaying the wanted videos, is going to display the blinking square in the lower left corner. Said like this, it looks very daunting, but actually, in C# under Windows, you only need to integrate the "Windows media player" component, it takes only a few lines of code. Here is the source code of the C# project that does it.
We decided to make the monitoring system completely independent from the machine displaying the video: we connected a Yocto-Knob directly on a YoctoHub-Ethernet. The later is configured to directly send the state of the Yocto-Knob to a PHP server which computes the blinking frequency and deduces the state of the video broadcasting system.
The system principles
The PHP code managing all this is dead simple. The only subtlety is that we arranged for the code managing the user interface and the code managing HTTP callbacks to fit in a single file.
The tablet displays the state of the screen
Here is a short demo of the concept:
Obviously, the main inconvenient of this method is that the sensor uses a small portion of the screen which would be best hidden, for example by a frame.