Connection to freeathome as 3rd Party via Hue emulation is not working

Dear all!
I also tried to ask this question within discord but without success or I’m not able to understand the hints there. So sorry to asked it also here:

I’m using a Conebee II Stick which works very well together with my BuschJaeger/ABB free@home system till the moment I updated the firmware of freeathome access point to 2.6.3(4) (they changed or integrated something related to Hue-Bridge groups and other stuff). With this the collaboration stopped working. I tried reboot, reconnect etc. The connection deconz (as Hue Bridge) and freeathome is shown: established or connected but all ZigBee devices go offline without working after a while. In a short time I’m able to see state changing of the Zigbee devices within the 3rd party environment. But within this environment I’m not able to change states of the Zigbee devices. So I contacted BuschJaeger-Support and they mentioned that they will not support because it’s not an original Hue Bridge. So I tested this with an original Hue Bridge and get this working without problems… So I’m lost and I don’t know whom to ask for support. Do you think it could also be an issue from deconz?
Do you have any idea to get rite of this problem?

Thanks in advance and BR, Peter

Ha yes I remember.

I m agree, the HUE support is not guaranteed but on my side I suspect a “user-agent” change (provoked by the firmware update). Deconz can work differently according to the client.
The machine is detecting the deconz gateway and connect to it, so I don’t think it s right/authentification issue.

But the problem is on my side I realy don’t know this machine, and can’t find information on it, or how to get the “user-agent” it use for requests.

Thanks, to come back to me :slight_smile:

What can I do to show you the freeathome environment? I found the global website: abb-freeathome, access point including stuff to read: SysAp
I know there is a swagger API and lots of other stuff to log and debug within this access point. If you like I can try to log something. Does this could help?

Thanks in advance.

Peter

I realy don’t know your stuff.
But if you enable"http" log on deconz, and making a request with third app you can see this kind of logs

20:46:47:623 HTTP API PUT /api/12EAB8295E/lights/2/state - 127.0.0.1
20:46:47:627 Text Data: 	{"bri": 251, "on": true}
20:46:47:631 ApiMode: 0
20:46:47:636 [{"success":{"/lights/2/state/on":true}},{"success":{"/lights/2/state/bri":251}}]

You can’t see the “user-agent” but you can see the Apimode

ApiMode: 0 > All third app, all options enabled
ApiMode: 1 > Strict mode ???
ApiMode: 2 > ECHO
ApiMode: 3 > HUE

For this I have to add: " --dbg-info=1 --dbg-error=1 --dbg-aps=1 --dbg-zdp=1" to the deconz.service file then reboot or restart? Where will the log-file be stored? Or is the “Debug view” within the deCONZ-App sufficient enough? Which Level I should look into?

Sorry for the number of questions.

Thanks in advance!
Peter

Can use the GUI if you have it, it’s easier.
Else the flag you need is just " dbg-http"

You have some help if you are using command line here deCONZ debug flags · dresden-elektronik/deconz-rest-plugin Wiki · GitHub

And no, better to not edit the service file, you can send log to a file or just display it in the console.

I did lots of different http-logs and the ApiMode: 0 all the time!
Any further ideas to check?

thanks in advance!

So for Hue compatibility I think it will be better to have ApiMode = 3.

I have just see a command to force a HUE mode, try to add in the command line to start deconz “–hue-mode”

Ok, I added "–hue-mode to the line “ExecStart” within the file “/lib/systemd/system/deconz.service” But ApiMode and behaivior does not change: after restart:

ApiMode

Here the file I changed:

There is something strange with your “-”

Mine is ascii 0x2D “-”
Yours is ascii 0x95 "–’

Try with http://asciivalue.com/

ofc the good one is 0x2D on the code

gwHueMode = (deCONZ::appArgumentNumeric("--hue-mode", 0) == 1);

Hello all together,
so coming back after vacation an some trouble at work. Without any change here, still no change also with your mentioned setting. Are there some new ideas?

Thanks a lot in advance,
BR
Peter

Still apimode = 0 with the good “-” ?

yes :frowning:

Can you show the command line used ?

I only changed the service file and did a reboot of the Rasp:

And you are using desktop mode ? (with GUI, or have tried both ?)

I don’t understand why it s not working … https://github.com/dresden-elektronik/deconz-rest-plugin/pull/3696

Perhaps the Freeathome is asking additional things from the API that deconz doesnt provide. A note should be made here that deCONZ emulates Hue until a extend: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Hue-API-Compatibility

Yes, I m agree but why the command to force the hue mode is not working ?
He is using " --hue-mode" but he still have ApiMode = 0.

How can I help you, to find the root cause? May it help if you have access to my system via MSTeams, Teamsviewer or something else? I’m not that familiar with Linux and command line as I want to be. So I only changed the service file for the gui mode and then I see within htop the deconz task running with the parameter “–hue-mode”.

Thanks in advance for your kind support.
BR
Peter