- Platform information:
- Hardware: RPI4 / 8GB
- OS: openHABian
- openHAB version: 4.0.3 stable
I am using a Rademacher Homepilot together with an openHAB server.
At this moment, there is “only” a HTTP binding available where I found a lot of possibilities recently.
So far, so good, but the whole thing only works close to real-time acceptable if you poll the Homepilot to death with 2 secs interval. But well, just close to acceptable.
As HomePilot is compatible to Hue and can “even officially” handle multiple bridges, my idea is to use the Hue Emulation from OH and introduce proxy items as “Switchable” devices. These can be added to scenes and triggers in the HomePilot config, and in OH they can trigger events on update. Et voila, we have event trigger forwarding for Homepilot for time-critical applications and can waaaaay relax the polling interval
And now I ran into issues described in many similar ways, but yet none of the solutions worked for me. My current state:
- Set up the Hue Emulation just as is.
- Changed the HTTP port of OpenHAB to 80 in
etc/default/openhab
(just to be sure I don’t mess up a port forwarding, I can do this later when it actually works ). Rebooted. Works, the openHAB UI now is reachable at port 80. - Enable pairing mode.
- Under http://<openHAB_IP>/api/status, the reachability test looks great:
URL Responds? Ours?
http://192.168.85.2:80/description.xml yes yes
http://192.168.85.2/description.xml yes yes
http://[2a06:be00:346:0:b541:a13e:ba8b:c78d]:80/description.xml yes yes
http://[2a06:be00:346:0:b541:a13e:ba8b:c78d]/description.xml yes yes
http://[fe80:0:0:0:e58c:84c4:68b5:90a5]:80/description.xml yes yes
http://[fe80:0:0:0:e58c:84c4:68b5:90a5]/description.xml yes yes
-
With pairing mode still on / active, I was a bit confused by
http://<openHAB_IP>/api/testuser/lights
andhttp://<openHAB_IP>/api/testuser/sensors
both giving the response:
[{"error":{"address":"testuser/sensors","description":"Not Authorized","type":1}}]
-
Now, anyhow, I tried to pair with HomePilot. I made sure pairing mode is on in OH, started searching for new devices in HomePilot, and actually, a new HUE Bridge was immediately detected. But whenever I tried to add this device, HomePilot informed me that the pairing process failed. I tried again and again and again, also with add unknown user ID enabled, with API v1 emulation enabled, but nope.
-
Then, I enabled debug logging in the emulator - enable discovery:
2023-11-03 10:40:41.014 [INFO ] [io.hueemulation.internal.ConfigStore] - Using discovery ip 192.168.85.2
2023-11-03 10:40:41.015 [INFO ] [io.hueemulation.internal.ConfigStore] - Hue Emulation pairing enabled for 60s
2023-11-03 10:40:41.108 [INFO ] [ueemulation.internal.upnp.UpnpServer] - Hue Emulation UPNP server started on 192.168.85.2:80
- No logs to be found while HomePilot scans for new devices (but finds it). Then I click on “Pair” in the HomePilot and this appears in the OH log:
2023-11-03 10:41:13.293 [DEBUG] [ulation.internal.HueEmulationService] - REST request GET /
2023-11-03 10:41:13.294 [DEBUG] [ulation.internal.HueEmulationService] - REST response: [{"error":{"address":"/","description":"Not Authorized","type":4}}]
Note that this is a bit different from the “Not Authorized” with the manual tests, it just requests the address “/” and the error type is “4” instead of “1”.
Now I’m a bit lost… help is very much appreciated!
EDIT:
I can connect to / pair with the emulated bridge with the All4Hue app. All on port 80. It displays the virtual devices as well. Yet, interestingly, autodetection did not work, I had to enter the IP manually.
So it seems that the emulator is not actually “broken” and runs so far.
Vice versa this means that maybe the Homepilot does the pairing process somewhat differently. It tries to access http://<openHAB_IP>/api/ directly.
It’s a bit strange, because the All4Hue app does not do such a thing at all, it starts with a GET CONFIG.
And, I just tested - the original Hue bridge would answer with:
[{"error":{"type":4,"address":"/","description":"method, GET, not available for resource, /"}}]
to this request, no matter if the button was pressed or not. Whatever they want to achieve with this, but it seems to expect the reply above instead of
[{"error":{"address":"/","description":"Not Authorized","type":4}}]
The only difference I can see is the order of the elements and the description which should actually not be such a big deal for JSON…
Help even more appreciated