Friday, September 30, 2016

Creating presentations ...

Early november I am presenting both at the Dutch JFall and Devoxx BE conferences.
This year I wanted to get started early, so I sat down and ... "Ok, what am I going to use to create the presentation in? Keynote? Mmm ... If I want to present this at different conferences with a matching style, maybe I need something different."

So, I looked at some Markdown slide tools. RemarkJS looked nice.
I played a bit with it and after one night I had the Devoxx look in a template for RemarkJS.

Jekyll also looked nice to be able to split the Markdown and HTML into separate files. This will also make it easier maybe to switch presentation layouts, I thought.
Jekyll is also not that difficult and it was setup quickly for my sample presentation.
A disadvantage of using Jekyll and RemarkJS together, is that they both use double brackets for variables. Since Jekyll already tries to replace those, variables cannot be used for RemarkJS in this setup.

Finally I wanted to be able to write the markdown and interactively see the resulting slides in a browser. I found this blogpost which explained a Gulp+BrowserSync setup.

So ... now I have a generic setup in which I can write in markdown and see the result directly in the browser. The look can easily be customised with css and the style can easily be switched using page variables.

I made the setup available in this git repo so it is freely available for anyone:

Now I can start on the real slides ... ;-)

Wednesday, July 13, 2016

Running Docker on Pine64

In the beginning of this year I backed the Kickstarter for Pine64. The Pine64 is an interesting little board with a quad core All-Winner 64-bit CPU, lots of IO, a gigabit network interface and up to 2GB memory.
And that for a price less than the latest Raspberry Pi 3, starting at just $15 up to $29 for the 2GB version.

Almost 2 weeks ago I received the 5 Pine64's from my pledge. Unfortunately I was not able to do anything with them till last weekend.
Recently the site was launched with lots of info about the board and how to get started.
I started out with the latest DebianBase image, but that did not seem to work. The board did not start properly somehow. The DebianMate image did work though, but it is quite big and also has a UI which I do not need. I was quite a hassle to figure out how to disable the LightDM UI.
For those interested in knowing how:
$ systemctl get-default
// will show it's current status is ''.
// to disable ui it must be set to ''.
$ systemctl get-default
$ reboot
Then I had an issue with the screen resolution on my Eizo display, but that was solved changing the screen size on the monitor itself.
If you'd like to adjust the resolution of the Pine, you can do so in the /boot/uEnv.txt file. Default it is set to '720p60', but you can change it to '1080p60', '1920x1080p' or '1080p50'. For more info about setting the resolution see Linux Sunxi Display or here in the code for all supported resolutions.

After the initial boot and upgrade of the packages, I checked whether the GoLang was available since Docker is build in Go. It was, and it installs.
Then I checked out Docker. It is available in the '' package, but unfortunately it does not install. I then looked into how to build Docker myself on a armv7, but that's quite a hassle since it seems you need Docker to build a new Docker. :-/
And Etcd, which is needed by Kubernetes which is my ultimate goal to run in the Pine, is also not available for Debian but that one is easy to build yourself.

Yesterday I tried out the UbuntuBase image since it is much smaller than the DebianMate (160MB compared to 1.2Gb).
This Ubuntu version does have GoLang and Etcd and Docker packages available. And they all work!

After installing them, I wanted to verify Docker really works. I was a bit of a search to find a BusyBox image for armhf, but finally found Container4armhf on the Docker hub which provides one.
Then, running
$ docker run container4armhf/armhf-busybox echo "Hello Docker on Pine64"
prints 'Hello Docker on Pine64". It works! :-D

Another option is to run:
$ docker run armv7/armhf-ubuntu echo "Hello from armv7 ubuntu"
which also prints out the echo string.

So ... Docker on the Pine64 works. Great!
Next steps will be to try to install Kubernetes to run on the Pine64 and try to build a cluster out of all the pines.

Wednesday, June 29, 2016

Talking to my home

My home is mostly automated using KNX. Yes, that’s a bit expensive, but it’s wired, very flexible, it always works and is a truly open standard so I can choose from many manufacturers. I always get my hardware from
I use OpenHab to extend the KNX installation a bit for simple but nice ui and to have an easy accessible playground.

Last weekend I started to look into how to control my home by voice. A few weeks ago I receive a free Hue kit. After installing those and connecting to the via the iOS app, they already can be controller by Siri, but I wanted to see whether I could also control my KNX installation.

I quickly found this OpenHab-HomeKit bridge application which allows you to control your OpenHab installation via Siri on an iPhone or iPad. The new MacOS Sierra Siri which will be release this fall will also make Siri available on the Mac!

Setup was not difficult, but I was not able to get it running on my Pi which also runs OpenHab mainly because the bridge is a NodeJS app and I just could not get a NodeJS version on the Pi which worked with the bridge application. So I ended up just running it on my MacMini server.
This only thing needed in OpenHab was to create a separate sitemap with the items to expose to Siri since not all items are supported (yet).
After that it was just trying out several commands to figure out what works in the Dutch language. Controlling the lights, light color, dim level and outlets work fine. Only the roller shutters do not work yet, but that's because a wrong command is send to OpenHab. It’s sending a ‘0’ or ‘100’ value instead of ‘UP’ or ‘DOWN’, but I already saw that this can be fixed by adding a rule to OpenHab to translate the wrong command into a valid one.

Here is a short video of the result:

The reason why some commands did not work was that I first I was using a wrong command and second Siri only could have of the sentence.
Overall it worked really nice. And, as an added bonus, because I also have an AppleTV, it also works remote without having to setup anything for that! Not only controlling the lights, but also for getting information about the house like the temperature in the living room.

I also briefly looked into Google Voice, but since that api is not open it is not possible to use Google Voice to control OpenHab. I did find a blogpost somewhere on how to setup Google Voice with home automation by using IFTTT, but I want my home to work standalone and not be dependant on internet services so I do not want to duplicate my home to IFTTT. But, I want to try out some geo fencing features with IFTTT and OpenHab soon.

Friday, January 29, 2016

Testing Neo4j 3 with embedded server with Bolt

Together with colleague Stijn van Drunen we're working on a project where we're using Neo4j 3 since we want to use Neo4j's new binary Bolt driver.

See Stijn's blogpost on how to use an embedded Neo4j to run integration tests where the application uses the new Bolt driver.