Grafana is the answer to the nagging question we’be been asking ourselves over the years – how to quickly and nicely present our data gathered from devices. InfluxDB on the other hand is the database that is as easy and simple to use, thus making it an ideal candidate for this job.
Let me show you how to quickly and easily put our data from domoticz and other devices to InfluxDB and then using Grafana – display in much more useful way than default domoticz graphs do.
OPTION: A different ARM based micro-computer (i.e.: OPi PC” rel=”noopener” target=”_blank”>Official Store – OrangePi PC using CPU H3/H2/H5) – they could be cheaper. It’s also entirely possible to use x86 computer with Debianem, but it’s going to eat way more than 4-6W when using ARM based. Here I used finally Orange Pi PC with latest armbian distribution, tested first on latest Raspberry Pi 2
As a result, a both fresh and advanced user finds himself in a situation where the system – ceases to work at all, or requires frequent restarts, or worse causes quick degradation of the main storage device – which is often (micro) SD card.
Is there a simple and effective solution to increase Domoticz’s availability on Raspberry Pi / Orange Pi?
Sure there is! But first – before you begin – make a copy of your (micro)SD working used in domoticz instance on your Raspberry Pi/Orange Pi. CAUTION: We will perform operations that may lead to the loss of all data – so make sure you have a copy!
What will you need?
harddrive either classic HDD or better SSD, small is OK from 32GB up to 128GB
heatsinks for Raspberry Pi/Orange Pi
USB 2.0 or 3.0 to SATA adapter – so we can connect the harddrive via USB port
PLNOG is a conference held in Warsaw and Krakow twice a year. This is the place where IT and telco people meet. Last time I spoke about some of my experiences in building small devices, listen if want to (Polish only):
During next PLNOG 19 I’m going to talk about SMOG sensor:
Big Thank You to all who were present – hope you liked it!
[Update 2017-08-22 – Sharing data with friendly radars]
A lot has changed since the last entry about tracking the aircraft using ADS-B messages. There are new options for data sharing, greatly simplified installation procedure and – optionally new equipment. This allows you to build a new receiver with an emphasis on simplicity, yet lower cost of purchase and maintenance with new feature (MLAT). Moreover, in addition to the aircraft you can now track other aircraft – i.e. meteorological balloons! I call that progress!
What will you need?
Orange Pi Zero. It’s a competition to Raspberry Pi – board that gives a lot for $10 – four CPU cores, 256 or 512MB RAM. Onboard you will find Ethernet and WiFi along with single USB. There’are extension available – extra USB/IR/CVSB Out HAT or new USB2SATA HAT
DVB-T USB Dongle. Look for the upgraded version in blue chassis – AKA “DVB-T RTL2832U+R820T2” – it offeres better sensitivity in interesting frequency – and will give you extra range. The most important part in that equation is the new R820T2 (version ‘2’) and of course the included antenna
Micro SD – could a cheap 8G for $4, but better is to use Sandisk Extreme/Ultra – at least 4GB
Power supply – at least1.5 to 2A @5V with micro USB (i.e.: old charger from cellphone)
Two small heatsinks (radiators) for CPU and controller – for Orange Pi Zero
ALTERNATIVE: Raspberry Pi 2 or 3 – they have enough of CPU power, but triple the price
In summary: Our new reciever should be around 25-30$ in total!
Armbian for Orange Pi – the best at this point is to use the Ubuntu Xenial with legacy kernel, you can also try developer/beta version, with 4.9.x kernel. Go to https://www.armbian.com/orange-pi-zero/
piaware and fr24feed – software to recieve, decode and share the data about plane flyovers. Free ports on the Orange Pi – 8080 and 3000-30010 – if there’s nothing else there – they should be free to use.
MLAT – new functionality
MLAT is short for multilateration. Airships without ADS-B transponders do not advertise their latitude and longitude, so the Mode S they use is not useful for us. Thankfully those Mode S transponder messages can be used by means of multilateration – based on the delay of the received messages in at least 3 different receiving Mode S. A very precise clock synchronization is required – which means you have another oportunity to ask friends living so-so close by to start their own radars!
Orange Pi Zero
As you noticed – we have been using mainly Raspberry Pi. The unprecedented success of this small computer spurred a number of “compatible” boards – Orange Pi Zero is very cheap, able, but the software is not yet quite there or stable. Well, it’s whatever $10 can buy!
Start with the included antenna. Next use google to find out the optimal length – and cut it. From there to increase coverage – you will ned to dive into the wonderful world of pro antennas!
The roof top is the best place for antenna, but don’t forget that if you place your Orange Pi in the attic – it may get very hot!
Before first run of the Orange Pi Zero – please install the heatsink on the H2+ CPU, and on the chip next to it. With the heatsinks and no chassis the CPU works at 42-48C. Without it 60-65C – which can shorten the life of both Orange Pi and the micro SD card.
Let’s install – just as in the first blog entry about SDR – Armbian with 4.9.x (Xenial) – using dd or win32diskimager.
On the first run Armbian allows you to login as root with the password “1234”, and immediately asks to change this default password, and create a user. Could be ‘pi’ user of course.
Let’s login now as pi and change the credentials to root:
sudo su -
Now – every commend we issue we do it as root, so be careful!
First: update and upgrade of the armbian system.:
apt update && apt upgrade
To allow usage of the raw feed from airplanes we need to turn off the automatic loading of the DVB-T:
Together we are strong! There’s always someone who has resources, server and is able to recieve multiple radar data and present them on web. Usually, by sharing you will get the access to such service, also to the data that is based on MLAT. How to connect? You should get the IP address and port (socket) from the server provider to connect to – all you need to do is one line to redirect (copy actually) the traffic and data from your radar.
First let’s install socat