OpenHAB war recht zügig installiert und startklar. Nachdem ich einige Zeit im OpenHAB-Wiki verbrachte und die Demo-Dateien studierte, fing ich mit einer leeren OpenHAB-Konfiguration an und begann, die ersten Items und Regeln zu erstellen.
Schon seit längerer Zeit hatte ich mich für das Thema Smart Home und die Automatisierung interessiert, jedoch hatten mich die Preise der Geräte doch immer wieder davon abgehalten, in ein System zu investieren.
Irgendwann im Frühjahr 2015 machte ich ein Foto von meinem Stromzähler wegen des Zählerstandes und war verwundert, dass auf dem Handy ein Blinken zu erkennen war, das mit bloßem Auge nicht zu erkennen war. Offenbar war es Infrarotstrahlung, die die Handykamera nicht vernünftig filterte.
As my internet line bandwidth is terrible every day during „prime time“ (about between 8pm and 11pm) I wanted to create a small test to have a proof to show to my ISP as well as to find out the critical hours.
As my ISP always tells me to test with a specific speed test (actually it resides on a web page owned by the provider, giving a small distance in hops), I started analyzing what the speed test really does.
The page is http://speedtest-1.unitymedia.de/
As it turns out, the speed test is a flash application. When analyzing the network traffic you quickly find out that the speed test basically does nothing more than downloading a huge 4000 x 4000 pixels random jpg file and then measuring the time it took to download it:
The address is called with a parameter called ‚x‘ which is randomized at every new test.
Knowing how to do it, I fired up Notepad++ and created a small script in node.js that repeats this test every two minutes and dumps the result in a syslog file that I can feed into my small Splunk instance to be able to graph it:
var syslog = require('./syslog');
var syslog = require('./syslog');
var http = require('http');
var intervalSeconds = 120;
var totalMBit = 0;
var totalBytesPerSec = 0;
var numRunning = 0;
return _bps * 8.0 / (1024 * 1024);
if( numRunning > 0 )
totalMBit = 0;
for( var i=0; i<6; ++i )
// var url = 'http://speedtest-1.unitymedia.de/speedtest/random4000x4000.jpg';
var url = 'xxxxx';
url = url + "?x=" + (Math.random() * 100000.0 + 10000.0);
var size = 0;
var t0 = 0;
var t1 = 0;
console.log( "Connecting to " + url );
var request = http.get(url, function(res)
// console.log('HEADERS: ' + JSON.stringify(res.headers));
var dt = t1 - t0;
var bytesPerSec = size / dt * 1000.0;
var mbit = bpsToMBit(bytesPerSec);
totalMBit += mbit;
totalBytesPerSec += bytesPerSec;
console.log( "size " + size + ", bytes per sec " + bytesPerSec + ", mbit " + mbit + ", " + numRunning + " parts left" );
if( numRunning == 0 )
console.log( "finished, size " + size + ", total bytes per sec " + totalBytesPerSec + ", total mbit " + totalMBit );
syslog.log( "BANDWIDTH" , "isp", "Unitymedia"
, "mbit", totalMBit
, "bytespersec", totalBytesPerSec
, "size", size );
var tCurrent = Date.now();
if( t0 == 0 )
t0 = tCurrent;
size += data.length;
t1 = tCurrent;
console.log("Error: " + e);
setInterval( testBandwidthMultiple, 1000 * intervalSeconds);
So while typing this article, the test is now running since some minutes and the first graph can be shown:
Given the fact that I pay for a 100 mbit line, this is terrible. Of course, I’ll post a longer graph tomorrow when the script has been run for a longer time.
Update October 1st, 2015:
So as promised, here is a graph for the last 24 hours:
As you can see, there is a huge bandwidth drop starting at about 6pm, lasting until about 1am. This also happend one day before.
Additionally, you can see that I never managed to get above 50MBit and I was starting to hunt for a bug in my code but didn’t find one. I modified the code now to use five connections at once (code snipped above is updated), but still there was no large increase. Then suddently the speed test from Unitymedia went down and I was no longer able to test it further so I had to find a new host where I can download test data from.
At first, I tried my small V-Server but as you can see, it couldn’t provide enough bandwidth. But after that, finally I’ve found a new host so the tests can continue. As you can see, I finally reach the promised 100 Mbits so this evening will be the first day where you can see the full bandwidth drop. The next image will be posted tomorrow.
Update October 6th, 2015:
Sorry for being late, but here are the new graphs:
As you can see, the problem gets worse on weekends. So far, a Unitymedia guy will be here on Wednesday to check my line. Doesn’t make much sense in my case because the SNR levels on the modem look okay, but anyway he will be there.
My thoughts on the current state of low latency audio on Android can be found on the site of my app Heat Synthesizer: