How to's

HowTo: Get notifications for ssh login attempts

  • Posted on: 30 January 2017
  • By: robin

Recently one of my accounts was hijacked. I was hacked. For the first time in my life. The first thing I did was changing all passwords and keys. But still I felt not save enough. For external accounts I can not do much but for my remotely acceptable computer I could (e.g. Allow Only public-key auth). One thing I came up with is Android Notifications (or email, sms, etc.) when a ssh session is created.

Most useful code snippets for Raspberry Pi

  • Posted on: 17 January 2017
  • By: robin

I am using Raspberry Pi's since the first generation and I use them a lot. Over the time I collected a few snippets that I find really useful and want to same them with you.

 

Turn off display programmatically

I've got a Magic Mirror and by default its screen would be always on. Thats not necessary. It should be on when I am looking at it. So I added a PIR Sensor for motion detection and let it trigger the following python lines:

Erste Schritte mit dem Alexa Skills Kit (Anleitung) - Echo & Dot

  • Posted on: 24 November 2016
  • By: robin
Neue Skills für amazon Alexa Echo Dot

Seit dem Film Space Odyssey (Odyssee im Weltraum) und dem HAL9000 sind wohl viele von uns begeistert von dem Gedanken eine Unterhaltung mit einem Computer zu führen, ihm Fragen zu stellen und Informationen zu bekommen. Genau diese Voice Services sind zur Zeit auf dem Vormarsch. Amazon's Alexa, Google Home, ivee oder Cubic. 

Dies öffnet eine ganz neue Welt für Entwickler. In diesem Tutorial möchte ich euch anhand eines einfachen Beispiels die Entwicklung eines neuen Skills für Alexa beibringen.

Raspberry Pi USB Festplatte automatisch einbinden

  • Posted on: 17 November 2016
  • By: robin
Raspberry Pi mit externer Festplatte

Nun ist es an der Zeit den Raspberry PI mit externen Dateträgern zu verbinden - sei es über LAN oder eben per USB. Besonders wegen des geringen Stromverbrauchs (~ 2 W) ist das eine klasse Sache. So kann man den Raspberry auch gerne mal im Dauerbetrieb laufen lassen - ohne viel Energie zu verbrauchen. Fangen wir also an und schliessen unsere Festplatte per USB an den Raspberry Pi. Am Besten sind USB Festplatten mit externer Stromversorgung.

DIY Smart Door für 5 Euro (Android App - Part 3)

  • Posted on: 2 November 2016
  • By: robin

Die App hat genau 2 Aufgaben: Sie soll es ermöglichen die Tür aus der Ferne zu öffnen und uns über Klingel Events per Notification informieren. Das ist nicht viel Programmieraufwand, aber trotzdem interessant. Zum realisierung wird nämlich Firebase verwendet und die unter euch die Firebase für eine Android App noch nicht verwendet haben werden heute etwas lernen.

Die App:

HowTo: Raspberry start command on startup with tmux

  • Posted on: 27 October 2016
  • By: robin
autostart command as specific user

What you want is to automatically start a script or programm when your raspberry pi boots. And you want so specify a user which is executing the process. Even better, you want to start it in a tmux session because this allows you to attach to the session and see whats going on. You are awesome. But you don't know how to do it ? Simply follow this simple steps:

 

1. Create a bash script file tmux_start.sh (e.g. with: touch tmux_start).

2. Add the following lines to this file (e.g. nano tmux_start.sh):

Retrofit2 + RxJava: "Unable to create call adapter for rx.Observable"

  • Posted on: 28 July 2016
  • By: robin
If you have trouble with Retrofit2 and RxJava you should doublecheck you Retrofit setup. To be honest I write the blogpost because it happend to me and I did not found a good answer on google.
A really common exception that you get when when Retrofit2 is missing the right call adapter is this:
 
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Unable to create call adapter for rx.Observable<java.util.ArrayList<java.util.ArrayList<java.lang.String>>>

Android Lesson Learned: Drawable vector is ignoring color (svg shown black)

  • Posted on: 24 June 2016
  • By: robin

What you need to know when you want to support versions older than L and want to use vector (svg) drawables is that you cannot use the @color thing to pick your color. You need to take the oldfashion way with #HEXCODE. If you don't this will lead to black vector graphics on all devices running something older than L.

Pages