Well, that was wild. I’m quite stubborn as long as I have the feeling it could actually work.
After hours of testing with a diyHue installation on another SD card (which pairs with Homepilot instantaneously!) and field-by-field checking of network frames in Wireshark I found the solution.
First of all: The actual bug seems to be done by the HomePilot himself.
Whenever it requests information via the Hue API, it adds a HTTP header
Accept: text/plain
which is, if you’re actually expecting a JSON response, some quite impressive bullshit
Fun fact: All the other Hue Emulators just ignore this header. The openHAB emulator is more dilligent here - it reads this field, knows that it’s returning Json and answers NULL
. So the “mistake” of openHAB is to adhere closely to the spec, woohoo and if you just leave away this header it works.
The absolutely good news is: If you have nginx in place anyhow, it allows filtering headers. And exactly this is the solution.
So if you have a Rademacher HomePilot (or SmartHomeBox, as they call it by now), you have to configure the Hue Emulator just by default and let it announce Port 80. Set nginx as proxy to Port 8080 as described in the tutorial, and then add the following lines:
location /api {
proxy_pass http://localhost:8080/api/;
proxy_set_header Accept "";
}
location /api/ {
proxy_pass http://localhost:8080/api/;
proxy_set_header Accept "";
}
This will cater for the case of the missing / in the URL as well as throw away the “Accept” header. And then it magically works - pairing as well as seeing the new devices in HomePilot.
And, don’t forget, this gives you something like a superfast callback possibility from HomePilot to OH!