rtl-sdr as flight radar receiver

Last week I got my rtl-sdr usb dongle by http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/. I ordered the “RTL-SDR Blog R820T2 RTL2832U 1PPM TCXO SMA Software Defined Radio with 2x Telescopic Antennas”.

Installation of the driver on the Debian Jessie system worked flawless I also first insalled and tested on a Raspberry Pi 2 B without hassles. But as I wanted to use the dongle alos as a radio scanner, I went over two the larger system.

After trying different Linux compatible software for Radio reception I went over to ADS reception. First I started with dump1090, which runs fine without any problems but I missed the flightradar24.com similar display on a google map and airplane details. So I tried ADSbox. After getting the sqlite3 source and placing it nearby the adsbox directory, the compilation went fine and I now can watch some airplanes around my location.

ADSBox - Pale Moon_081

and, some time later (therefor different planes):

ADSBox - Pale Moon_083

Please know that the noise made by these airplanes is loud, even if they are 30000ft high and some kilometres away.

Now, I know which planes are there making the noise and where they are. Frustrating…I can not do anything against the noise but going indoor.

fhem rss layout update Wochentag

Im vorherigen Post habe ich uner anderem eine Visualisierung von Abfallterminen beschrieben. Leider konnte ich da noch keine Wochentage als Text darstellen. Nun habe ich die 99_MyUtils.pm erweitert um für einen wday Wert den Wochentag Namen zu bekommen:

package main;

use strict;
use warnings;
use POSIX;

sub
myUtils_Initialize($$)
{
  my ($hash) = @_;
  my $NewMailtime = time;
}
# Enter you functions below _this_ line.
######## Wochentag
sub wochentag($){
   my $wd=shift;
   if($wd > 6){
     $wd=$wd % 7;
   }
   my @Wochentage = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag);
   return $Wochentage[$wd];
}

######## Wochentag kurz
sub wochentagkurz($){
   my $wd=shift;
   if($wd > 6){
     $wd=$wd % 7;
   }
   my @Wochentage = qw(So Mo Di Mi Do Fr Sa);
   return $Wochentage[$wd];
}
...
1;

Nun kann man dies Funktionen nach einem Neustart von fhem verwenden. In meiner rss.layout steht nun für die Abfalltermine folgendes:

text 400 60 { 'Abfalltermine 5 Tage:' }
text 410 75 { sprintf('%s', wochentagkurz($wday)) }
text 435 75 { sprintf('%s', wochentagkurz($wday+1)) }
text 460 75 { wochentagkurz($wday+2) }
text 485 75 { wochentagkurz($wday+3) }
text 510 75 { wochentagkurz($wday+4) }
text 535 75 { wochentagkurz($wday+5) }

img 410 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 0') .'.png' }
img 435 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 1') .'.png' }
img 460 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 2') .'.png' }
img 485 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 3') .'.png' }
img 510 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 4') .'.png' }
img 535 80 0.2 png file { '/opt/fhem/www/images/tonne_'. fhem('get abfall days 5') .'.png' }

und so siehts dann aus:

Abfalltermine rss

Die Bilder tonne_grau.png, tonne_gelb.png, tonne_papier.png, tonne_buendel.png, tonne_braun.png, tonne_none.png habe ich alle aus einem Bild generiert indem ich die Tonne in GIMP jeweils anders eingefärbt habe.

FHEM myrss Gestaltung

Angeregt durch den 02_RSS Workshop im fhem forum dachte ich, das ist eine wunderbar einfach Möglichkeit Status-Anzeigen übersichtlich zu präsentieren. Meine fhem Web Seite ist nun ziemlich überladen und ich suchte nach einer einfachen Gestaltung. Da gibt es zwar noch Tablet UI und Floorplan, aber beide sind nicht wirklich einfach in der Gestaltung.

Für 02_RSS benötigt man nur eine Textdatei mit Anweisungen und es lassen sich sehr schöne und übersichtliche ‘Seiten’ mit fhem Information gestalten. Dazu gibt es auch einen eigenen Thread im fhem Forum. Leider haben viele User ihre Layouts dort ohne die entsprechende Layout-Datei vorgestellt. Ich bin da nicht so ein Geheimnis-Krämer und möchte euch den einen oder anderen Kniff aufzeigen.

myrss

Continue reading ‘FHEM myrss Gestaltung’ »

FHEM alle Batterie Zustände auf einmal

Um alle Batterien von Sensoren in einer Gruppe anzuzeigen habe ich folgendes in meiner fhem.cfg:

#Batteriestatus aller Devices im Raum Zentral anzeigen
define ZE.Batterie readingsGroup .*:[Bb]attery\
.*:[Bb]atteryLevel
attr ZE.Batterie notime 1
attr ZE.Batterie room Zentral
attr ZE.Batterie valueFormat {return "0" if( $VALUE eq "low" );; return "100" if( $VALUE eq "ok" );; return "25" if( $VALUE < 2.1 );; return "50" if( $VALUE < 2.3 );; return "75" if( $VALUE < 2.5 );; return "100"}
attr ZE.Batterie valueIcon {'battery.0' => 'measure_battery_0@red','battery.100' => 'measure_battery_100@green','Battery.0' => 'measure_battery_0@red','Battery.100' => 'measure_battery_100@green','batteryLevel.0' => 'measure_battery_0@red','batteryLevel.25' => 'measure_battery_25@red','batteryLevel.50' => 'measure_battery_50@orange','batteryLevel.75' => 'measure_battery_75@green','batteryLevel.100' => 'measure_battery_100@green'}

Selection_075