Black Magic Mirror – Day Fourteen

I’ve spent some time in the last week getting a Raspberry Pi running on my new “spare” TV. I put a new Philips TV into the lounge last week and wrote about that in this communication. I’m coming up to personal isolation day 13. This means I’ve kinda had time to program another Raspberry Pi and get it displaying information on the spare TV. I wanted to have a map of the aircraft in the sky near me and I might eventually look into writing a script that will automatically reload a webpage with password every ten minutes and put it in full screen.

I already have a Raspberry Pi in the loft. It is receiving aircraft ADS-B signals and decoding them. It then feeds the results to 360 Radar, an aggregator website that then publishes all the positions. I wrote about that quite a bit. Just use the search function and find ADS-B.

This time I was working with a program called Magic Mirror. It should be used with silvered glass to create a display mirror but I just want it for the display. The initial program was easy to load and get working. The trickier thing was getting custom modules loaded and then get their parameters working correctly. I had to edit js files all the time and so I found that irritating but rewarding. It’s all about the syntax, which I got eventually.

Magic Mirror Display
Magic Mirror Display

Basically the elements are:

Top_Left – Current date and time.

Top_Center – Two calendars of upcoming things.

Bottom_Center – Three RSS news feeds. One from each of the BBC, Defence Blog and The Guardian. These change at different rates depending on how much there is to read.

Top_Right – Current weather. The temperature is measured in Kelvin – because why would you measure it in anything else? Also, this updates every ten minutes or so.

Top_Right – A weather forecast of the next six days of weather. Again, temperatures in Kelvin.

Center_Right – A feed displaying what is playing on the home SONOS system and in which rooms.

Bottom_Right – which lights are on in the house. I mean I could just look around my house because it’s that small but why would you when you can have the information displayed on a screen.

Bottom_Left – My proudest part of this display. A section devoted to which aircraft are closest to my house and [now] where they are. It takes a feed from the Raspberry Pi in the loft which is decoding ADS-B signals. So, not all aircraft will be shown here but most interesting ones will be. Given that there’s so little flying at the moment the top ten closest aircraft are going out to 180km. Once the world returns to normal it will interesting to see how far out this goes. About 50km I reckon.

Black Mirror Display
Black Mirror Display

The picture above has the added details of how far the aircraft are from my house and in which direction.

This project has taken about ten hours of putting together and playing with the software. I think it is mostly finished. There are a couple of small things and I’m investigating them over time. At the moment the Pi starts in the wrong resolution if the TV isn’t turned on before the Pi. I have looked at this and it seems to be all levels of wrong so I don’t know how to fix it. I have googled like an expert and pretty much figured out what it isn’t. I’d really like the Pi to turn on at a particular time and turn the TV on at the same time. I think this is possible but will take much work.

I currently have the Pi plugged into a Philips Hue smart plug that means I can turn it on and off from anywhere. This is a helpful feature. The TV is then set to turn off after a short while without receiving a signal.

I do feel quite smug at the moment. Also as the TV showed up two RAF aircraft earlier. They must have had their ADS-B signals on and so were cargo/passenger planes. All in all I’m a happy chap.