camprof 1.5.1 released

I just uploaded a new version of camprof version 1.5.1.
It fixes a few issues with incorrect luminance clipping and has better gamut clipping.

You can download it from the camprof page.


camprof 1.5 released

A few weeks ago I started to work again on camprof to make it usable and compatible with Capture One. (I switched to C1 from DXO since the first version was released.) My initial attempt of a profile maker was hardly usable: relying on scanin from ArgyllCMS made it fragile and slow (scanin is designed for scanning tiffs from scanners not from digital cameras) and the profiles were missing the right curve, so it made photos dull and flat.
I set out as a goal to correct all of this and also make it as easy to use as possible.
I think I achieved these goals so today I release the new version of cramprof:

  • New target scanning module with perspective distortion correction
  • Improved color accuracy
  • TIFF Transfer function tag support for better C1 compatibility
  • Generated profiles are fully compatible with C1

You can download it from the camprof page

camprof 1.0 released

The short story: I have a Colorchecker Passport and I couldn’t use it with my favorite raw processor DXO Optics Pro. There’s a Lightroom plugin and that’s all, no other raw processor is supported by X-Rite. I couldn’t find an affordable solution that would create an ICC profile from a Colorchecker target so I wrote one… 🙂

camprof is an easy to use ICC profile maker for your camera. It lets you to use your Colorchecker Passport or Colorchecker target with DXO Optics Proc to profile your lighting and get better color balance than basic white balancing.

camprof uses scanin, icclib, cgats from ArgylCMS. The profile calculation / generation is done by a new module (camprof) written by me.

You can download it the camprof page

Bonjour, Avahi, RPi, Windows… Setup guide

After reading about UPnP vs Zeroconf and how easy to implement the later on, I have decided to tinker with Zeroconf in my home network. Probably the name of the standard Zeroconf does not sound familiar, but its implementation Bonjour (from Applce), and Avahi (from an open source project) are much better known. A quick summary: Zeroconf is built on three technologies:

  • automatic IP address assignment (without a DHCP server),
  • distributed name resolution using mDNS (without a DNS server)
  • network service publishing/discovery using DNS-SD.

The first one is not really relevant nowadays, because everyone has a DHCP server in his home network. But second and third point is still an unresolved problem.

The full guide setting it up on Windows, RPi and Chrome:

1. Install Bonjour on Windows

Getting the latest version of Bonjour from Apple is a bit tricky, because it is not available as a standalone download. First you have to download the 64 bit version of iTunes from Open iTunes64Setup.exe in Winrar and extract the Bonjour64.msi file. Double click on the extracted Bonjour64.msi file and finish the installation steps.

2. Install Avahi on Raspberry PI (Raspbian)

Log into your RPi with ssh and install libnss-mdns and avahi-utils:

sudo apt-get update
sudo apt-get install libnss-mdns avahi-utils

3. Head scratching

At this point I thought I was done and started to test it with a ping from my Windows notebook. Zeroconf publishes your computer with its hostname on the network under the .local domain. So my RPi should have been available as raspberrypi.local… but it was not working.

ping raspberrypi.local
Ping request could not find host raspberrypi.local. Please check the name and try again.

First I thought that my wifi router running on Openwrt was not forwarding multicast packets used by mDNS between the wireless and wired ports, but the following command on my wifi router printed 0, which means that was not the case:

cat /sys/devices/virtual/net/br-lan/bridge/multicast_snooping

A little snooping on the network with tcpdump from the wifi router quickly revealed the real problem: Bonjour on my notebook was sending out mDNS packets using IPv6 and Avahi was sending out on IPv4.

That meant there were two solutions: a) turn off IPv6 on my notebook b) turn on IPv6 on my RPi. Obviously I choose the later one…

4. Enable IPv6 on RPi

Log into your RPi with ssh and load the ipv6 module

sudo modprobe ipv6

Then add the ip6 module to list of modules loaded during boot. Open /etc/modules in your favorite editor and append ipv6 as the list line in the file. I did it with vi:

sudo vi /etc/modules

Then restart the avahi daemon:

sudo /etc/init.d/avahi-daemon restart
[ ok ] Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon.

Now the name resolution should work on either IPv6 or IPv4:

C:\>ping raspberrypi.local
Pinging raspberrypi.local [fe80::ba27:ebff:fe0d:5692%14] with 32 bytes of data:
Reply from fe80::ba27:ebff:fe0d:5692%14: time=4ms
Reply from fe80::ba27:ebff:fe0d:5692%14: time=1ms

C:\>ping -4 raspberrypi.local
Pinging raspberrypi.local [] with 32 bytes of data:
Reply from bytes=32 time=2ms TTL=64
Reply from bytes=32 time=2ms TTL=64

5. Publish services on your network

Publishing services with Avahi is easy. I have got the web interface of FHEM running on port 8083. To publish it I created /etc/avahi/services/fhem.service with following content:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
  <name replace-wildcards="yes">FHEM on %h</name>

To publish the ssh and sftp server, I created /etc/avahi/services/ssh.service with the following content:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
  <name replace-wildcards="yes">SSH on %h</name>

The same way you can publish the samba and other services running on your devices. You can find the complete service type list here:

After creating the service definition files, you have to restart the avahi daemon:

sudo /etc/init.d/avahi-daemon restart
[ ok ] Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon.

You can check the available services on your network with avahi-browser:

avahi-browse -a -t

6. Install DNSSD plugin in Chrome

Windows has no proper gui for Zeroconf, but you can install the DNSSD plugin for Chrome that makes published web sites easily accessible in Chrome. The installation method has changed in the later versions of Chrome for extensions not downloaded the Chrome Web Store: First you have to download the plugin from by right clicking on „Install for Google Chrome” button. Then open Tools->Extension in Chrome and drag and drop the downloaded crx file into it.

Edit:  The Chrome extension is no longer available as Chrome is abandoning NPAPI. You can let the Chrome developers know you’d like native browser support by clicking the Star on this issue(must be logged-in)

What is FHEM

I had been thinking about implementing a home automation system for a long time. One with a low budget, based on an open source home automation (HA) solution that runs on a Raspberry PI and still usable in real life. I looked at all of the open source HA project that I could goggle up, but most them has a limited HA protocol/hardware support, wouldn’t run an Raspberry Pi or not based on a script language. Using a script language may sound a disadvantage, but in case of a HA system the performance loss is minimal, the flexibility and easy customization is a big plus.

Finally I found FHEM. It is actively maintained by a team of enthusiastic German (speaking) team.  They have a forum in German and a wiki also in German… so that’s why you probably never heard of it. Thankfully the built-in command reference and the GUI is in English. I think the lack of English material restricts the popularity of FHEM which is a shame. To fill the void I decided to create a series of posts about my experiences about installing and configuring it on a Raspberry PI.The system itself is very mature and supports most of the HA protocol/hardware available in Europe, even ones with proprietary protocols. These guys reverse engineered them on a bit level… They even have their own hardware dongle with and open source firmware that taps into some of these closed HA systems. As the other HA systems it can automate some common tasks in the household like switching lamps, shutters, heating and to log measurements like temperature, humidity, power consumption, etc.

As it turned out it perfectly fits my other requirements: very lightweight and fully written in Perl so it runs on any platform including the Raspberry Pi and other low power devices. And it takes advantage of the fact that it is written in a script language: easy to extend, configuration is very flexible.

Next post will be about supported HA protocols and hardware. In the meantime you can find the homepage of FHEM here:

First post…

I’m a former professional developer / architect nowadays working as a project manager / product manager. The fact that my daily job doesn’t revolve about coding anymore doesn’t mean that my interest died in it.  That’s why the Raspberry PI caught my attention, an ideal platform for small interesting projects that can be useful for other people. So I purchased one, but not for turning it into a cheap video player (there’s nothing wrong with that!) … I have been thinking about implementing a home automation system for a long time. One with a low budget, based open source solution and still usable in real life. The RPi turned out to be a great platform for this. My next project is turning into a proper headless music streamer…  I felt that keeping the knowledge that I have gathered wouldn’t be fair, so I have created this blog to share it, and also the code I have created to extend the packages that I’m using for my projects. Have fun reading it! 🙂