#MyOpenHA Part 1 -Philosophy

Home Automation. The holy hipster and geek grail. I have played with it. I have tried. I have failed. But today I am proud to have a solution I can truly endorse. So join me on this journey. This series will explain my solution, in excruciating detail. In the hope that I can learn from you while I am explaining. This series will be filled over time with more and more articles. But now, let’s talk about philosophy. The Why. Soon you will see the What and How. One promise, or the TL;DR: It is all 100% Open Source.

Well, almost. I have integrated some quite non-open things but always in an Open Source Way.

To wet your appetite, Here’s the simple thing you will see on a display hanging on the wall in my apartment:

Home Automation Welcome Screen

What you see here is the main screen of my Dashboard. From here you can switch Light Scenes, roll up or down the projector screen, send my Roomba to clean my place and observe the current outside temperature. This all runs from a Raspberry Pi 2 with FedBerry (23 ATM), the Mosquitto MQTT Broker, a Node-RED instance with the node-red-dashboard, controlling my Philips HUE lights, a Nanode, an ESP8266 with a Dallas DS1820 temperature sensor. Too much Techno-Babble? OK. That’s all going to be explained in the other parts of this series, so relax!

Philosophy. Or the Zen of HA

Home Automation truly is a fascinating field. But it’s also filled with land mines, frustration, lack of interoperability, competing standards, non-maintained cuteness and hype. A lot of hype.

Here are the guiding principles for what I consider to be a good Home Automation (HA) solution.

  • Locality Everything happens on the local network. There is no need at all for any external connections or services. This is where I protect my privacy. And guarantuee (well, shift the blame 😉 ) that I and only I am in control. Remember the NEST fiasco? Not going to happen here.
  • Simple The solution must be simple to use, maintain, extend and install.
  • Open The parts of the solution I interact with must be 100% open. Ideally Open Hardware and Open Source. But at least accessible using a 100% Open Source solution.
  • Sustainable This means two things. It uses modules and parts that are actively maintained and simple to use for a long time. And it means that the solution doesn’t need my daily attendance. That I don’t have to be bothered with updates, changes, downtime and frustration. This is the unsolved part, to be honest.
  • Rock Solid The solution should be extremely stable. And in case of problems there must be a (manual) fallback solution for all parts.

Packed with failed experiments, the lessons I’ve learned at Red Hat about long-term stability and sustainability of Open Source and the vibrant community of fellow geeks sharing their experiences and solutions, I came up with the following approach:

  • Low Level Use “things” in the widest sense that can always be physically controlled. With switches, buttons or by simply pulling the plug.
  • Communication All parts talk MQTT. Period. They send status updates and state changes via MQTT. They receive commands via MQTT. If they cannot do that directly, there must be an open source solution that does the translation between whatever protocol it uses and MQTT.
  • Configuration Now that we only have MQTT messages to send and receive, we use Node-RED as the rules engine. Where we plug the parts together and come up with interactions as needed.
  • Simplicity With a nice UI using node-red-dashboard in a browser, I can use whatever device that has a browser to control my apartment. Cheap Android tablets mounted to the wall, my smartphone or tablet. Or some voice controlled device, maybe? Mycroft?

So there you have it. The blueprint for my truly open HA solution with flexibility and agility on all layers. Sounds too good to be true? I thought the same. And in some parts it still is. But for geeks with a bit of time, I can offer quite a working solution. Stay tuned! On to the next parts, where I will dive into the how and what.

Comments? Always welcome!

Google+: #MyOpenHA Part 1
Twitter: #MyOpenHA Part 1

Or right here (but I’m more responsive on G+ and Twitter).

Thank you, Tesla Motors For The Patents, but …

Here’s the thing. Elon Musk doesn’t trust the patent system to protect his inventions. So instead of filing for more, he will simply not file at all and keep his inventions secret. The stuff that already got patented thus is already considered lost by him so it is safe to “open source” them all.

While the move itself is a good one for the makers and hackers out there, it shows the fundamental problem of the patent system: It doesn’t do its job.

It doesn’t protect and foster innovation as patent trolls and patent pools have subverted that part of the deal.

It doesn’t make knowledge available as patent claims have become so broad and vague that those “skilled in the art” do not learn from patents – which is the CORE task of the patent system. This is especially true for software patents. Trust me, as a programmer I know what I am saying here. No software patent has ever taught me something.

The patent system has become a caricature of its intended purpose and delivers the exact opposite of what it should do,

Small to medium sized businesses don’t file patents at all most of the time. It’s prohibitively expensive, it doesn’t create value (except for trolls and lawyers) and it doesn’t protect the innovator.

So Elon Musk has decided to drop patents from his world. He clearly states it:

“We have essentially no patents in SpaceX. Our primary long-term competition is in China,” said Musk in the interview. “If we published patents, it would be farcical, because the Chinese would just use them as a recipe book.”

I think he uses the same reasoning for Tesla. So while the opening up of Teslas patents is a good move, we will clearly see added secrecy to protect the real innovation happening at Tesla.

And I cannot blame Musk. I blame the broken patent system, the trolls, the courts and a clear lack of vision by our political leaders to promote the needed changes.

Let’s discuss over at Google+!

Why (Linux-)devs use Macbooks

Just read an article by Matthew Garrett on why developers use Macs.

My take:

I think it is also correct to say that the good ole “workstation” metaphor of having a separate machine for development is being replaced. Now that computers are ubiquitous parts of the developers life, we prefer to have an all-in-one machine for that.

No more separate work or personal machines. We are looking for a “life-machine”. The laptop as a companion that is always at our hands. And as developers we need more than just a tablet or a mobile phone.

And I think that’s why many people prefer OS-X over Windows or Ubuntu/Fedora. For everyday tasks as email, picture stuff, booking flights, doing taxes etc. OS-X definitely offers a good solution. And being UNIX-y enough to be used in a Linux delpoyment context, you get a good compromise.

Discussion also here on Google+

Paper task management – the Corbinizer as A4

I have always been struggling with task management. Always. And will always do. I have tried a lot of things, paper based, digital (starting on my Apple Newton, over to the Palm III, V, various mobile phones, Blackberry and now iPhone and Android.

But somehow I have learned over the years that I need the totally simple stuff or else it will fail.

Seems I am not alone 😉 I stumbled across the Corbinizer, a very simple but nice approach. More explanations here.

However, the usual Le Sigh after downloading it. It doesn’t fit on A4, it uses Letter. So I opened my Inkscape, fiddled around a bit and created the A4 version which is attached to this blog entry.

Remember, the Corbinizer is Copyright 2014, All Rights Reserved by Brandon Corbin.
The Corbinizer is released under the Creative Commons Attribution-NonCommerceial License.

Let’s give it a try. Print it at 100% and make sure “shrink to fit” is NOT selected.


GPG, subkeys, the genius of it!

#geekporn Today it made “click” in my head. I finally understood the use of subkeys in GPG. The genius of it!

You create your GPG-key on a truly safe machine (ideally a machine that has no connection to the network, runs a minimal and trusted OS (Linux, I personally use Fedora) and create subkeys for signing and encryption. You export your key to a safe device (USB Stick, SD card) and store it offline.

Now you can safely delete the master key from your keyring and carry ONLY the subkeys in your keyring on machines or mobile phones that you use to encrypt/decrypt/sign. So should your keys become compromised, you can revoke the subkeys, take out your masterkey again on a truly safe machine and generate a new set of subkeys for encryption and signing.

NOTE: You cannot sign other keys with this stripped down keyring as you need the master key for that.

And these new subkeys are still identified via the same keyID as that comes from the masterkey. So you can keep the masterkey longterm and swap out the subkeys every year or whenever you think they are compromised.


Edward Snowdens letter to German government/Authorities

Edward Snowdens letter to german government/authorities

Background: German member of parliament, Hans-Christian Ströbele (Greens) met Edward Snowden in Moscow on 2013-10-31. They talked for 3 hours and Mr. Ströbele came back to Germany with this letter.

“To whom it may concern,

I have been invited to write to you regarding your investigation of mass surveillance.

I am Edward Joseph Snowden, formerly employed through contracts or direct hire as a technical expert for the United States National Security Agency, Central Intelligence Agency, and Defense Intelligence Agency.

In the course of my service to these organizations, I believe I witnessed systemic violations of law by my government that created a moral duty to act. As a result of reporting these concerns, I have faced a severe and sustained campaign of persecution that forced me from my family and home.I am currently living in exile under a grant of temporary asylum in the Russian Federation in accordance with international law.

I am heartened by the response to my act of political expression, in both the United States and beyond. Citizens around the world as well as high officials – including in the United States – have judged the revelation of the unaccountable system of pervasive surveillance to be a public service. These spying revelations have resulted in the proposal of many new laws and policies to address formerly concealed abuse of the public trust. The benefits to society of this growing knowledge are becoming incresingly clear at the same time claimed risks are being shown to have been mitigated.

Though the outcome of my efforts has been demonstrably positive, my government continues to treat dissent as defection, and seeks to criminalize political speech with felony charges that provide no defense. However, speaking the truth is not a crime. I am confident that with the support of teh international community, the goivernment of the United States will abandon this harmful behavior. I hope that when the difficulties of this humanitarian situation have been resolved, I will be able to cooperate in the responsible finding of fact regarding reports in the media, particularly in regard to the truth and authenticity of documents, as appropriate and in accordance with the law.

I look forward to speaking with you in your country when the situation is resolved, and thank you for your efforts in upholding the international laws that protect us all.

With my best regards,

Edward Snowden
31 October 2013”

That HP/Microsoft “study” on the Linux Migration in Munich? Hm.

With the help of Google translate and my infinite wisdom I translated the statement of IT@M, the IT service company owned by the city of Munich. DISCLAIMER: This NOT an official translation. This is my personal translation. The original text in german is linked from here.

I published (with permission) the original statement here.

HP study produced on behalf of Microsoft on the LiMux migration

(01/22/2013) Under the intriguing title “[Mayor of Munich] Ude has wasted millions on Linux machine?” Focus Money Online reported on a study that HP made on behalf of Microsoft. The study allegedly proves that the city didn’t save in the tens of millions Euro by switching to OpenOffice and LiMux, but actually paid far more.

Karl-Heinz Schneider, head of the municipal IT service IT@M:”Of course we want to deal with this criticism. I have asked Microsoft to share the study with us. What I could gather so far from press articles however raises a considerable amount of doubt on the validity of the study and its findings.” The study does not take into account the licensing costs that would be incurred for using Microsoft products. Schneider: “This simply drops seven million into the void – which is quite the biggest saving we had.”

The claim that no new versions of Windows and its application would have been needed is simply not true. Schneider: “A major trigger for the decision to put our operating system architecture to the test was precisely the announcement by Microsoft to drop support for Windows NT – the operating system that was used as a standard at the city of Munich at that time. A migration to a new operating system was therefore inevitable. ”

The claim that the city would have compared the cost of a current Windows 7 with a ten year old version of Linux is also simply wrong. Schneider: “Of course we have been gradually optimizing LiMux over time. The current version is far away from the original version and can stand a comparison with Windows 7.”

The study also falsely claims that one in four city computers still run on Windows as none of the specialized procedures can be migrated to Linux. Schneider: “It is true that not all business applications can be migrated to Linux. But that is ‘not all’ and not ‘none’. All web-based business applications can be used without any migration costs under LiMux and most of the procedures that are tightly integrated with Microsoft can be accessed with standard technologies that are also used by the Linux client.

Finally the number of remaining Windows machines in Munich that the study claims is too high. Instead of the claimed 75 percent, we have already moved 13,000 of the planned 15,000 machines to LiMux – that’s almost 87 percent. ”

Original german version published in the 2013-01-22 edition of Rathaus Umschau – Page 8 and 9

Munich: That HP/Microsoft study has a few problems, we guess.

[UPDATE: My english translation of the statement now here]

Reproducing the statement of IT@M – with permission from the press office of the city of Munich.

IT@M in eigener Sache

HP-Studie untersucht im Auftrag von Microsoft LiMux-Umstellung

(22.1.2013) Unter dem reißerischen Titel „Hat Ude Millionen für Linux-Rechner verschleudert?“ berichtet Focus Money online über eine Studie, die HP im Auftrag von Microsoft angefertigt haben soll. Die Studie belege angeblich, dass die Stadt durch die Umstellung auf LiMux und OpenOffice keinen zweistelligen Millionenbetrag gespart, sondern sogar draufgezahlt hätte.

Dazu erklärt Karl-Heinz Schneider, Chef des städtischen IT-Dienstleisters IT@M: „Selbstverständlich werden wir uns mit dieser Kritik gerne auseinandersetzen. Ich habe deshalb Microsoft sofort aufgefordert, uns diese Studie zur Verfügung zu stellen. Was ich bislang der Presse entnehmen konnte, wirft allerdings erhebliche Zweifel an der Aussagekraft der Studie auf.“ So lasse die Studie die Lizenzkosten, die beim Einsatz von Microsoft-Produkten angefallen wären, von vorneherein unberücksichtigt. Schneider: „Damit lässt die Studie den Löwenanteil der Einsparung in Höhe von fast sieben Millionen Euro einfach unter den Tisch fallen.“

Auch die Behauptung, beim Verbleib auf der Windows-Schiene wären überhaupt keine neuen Versionen erforderlich gewesen, trifft nicht zu. Schneider: „Ein wesentlicher Auslöser für die Entscheidung, die BetriebssystemArchitektur auf den Prüfstand zu stellen, war ja gerade die Ankündigung von Microsoft, den Support für das damals als Standard bei der Stadt eingesetzte Windows-NT-Betriebssystem einzustellen. Eine Migration auf ein neues Betriebssystem war also unvermeidlich.“

Unzutreffend ist auch die Behauptung, die Stadt hätte die Kosten einer aktuellen Windows-7- mit einer zehn Jahre alten Linux-Version verglichen. Schneider: „Selbstverständlich ist der LiMux-Client sukzessive optimiert worden. Die aktuelle Version ist mit dem ursprünglichen Client zu Projektstart nicht mehr zu vergleichen und braucht einen Vergleich mit Windows 7 nicht zu scheuen.“

Falsch ist darüber hinaus die Darstellung der Studiie, jeder vierte StadtRechner laufe noch auf Windows-Basis, da „alle Fachverfahren nicht auf Linux migrierbar“ seien. Schneider: „Richtig ist, dass nicht alle Fachverfahren auf Linux umgestellt werden können. Da wurde offensichtlich aus einem „nicht alle“ ein „alle nicht“ gemacht. Alle web-basierten Fachverfahren können ohne Umstellungsaufwand unter LiMux genutzt werden und die meisten Verfahren, die eng mit Microsoft integriert sind, können über andere Standardtechniken ebenfalls vom Linux-Client aus benutzt werden.

Auch die Zahl der verbleibenden städtischen Windows-Rechner ist zu hoch gegriffen. Statt der in der Studie behaupteten 75 Prozent haben wir bereits jetzt 13.000 der geplanten 15.000 Arbeitsplätze auf LiMux umgestellt – das sind knapp 87 Prozent.“

Source: Rathaus Umschau, 2013-01-22 – Page 8 and 9

BREAKING! Deutsche Verleger haben eine Erweiterung der robots.txt vorgeschlagen!

Der Vorschlag wurde mir geleakt von einem befreundetem DevOps in einem ungenannten Verlag.

# robots.txt zu http://www.bild.de/

User-agent: Google-Crawler*
Pay: /* {PayPal:SpingerVerlagLSR@bild.de:0.05€/click}
Free: /404.html
Free: /500.html
Pay: /erotik* {PayPal:SpingerVerlagLSR@bild.de:2.50€/click}

Es wird bereits über erweiterte Sytax diskutiert. Unter anderem ein Promo: mit Datumsangaben für Freicrawlertage.

Ach ja, wer Sarkasmus und Ironie findet darf es behalten.