HA in Hyper-V - Deconz Conbee Can't Find API

I have my HA setup in Hyper-V. Works fine although I’ve only had it setup for a few days. Hyper-V doesn’t allow USB Passthrough so I have installed Deconz and the Conbee II USB gateway in the Host OS (Windows 10). I can see the gateway and access the REST API webpage. However, when trying to add the inegration in HA I get an error saying is cannot find the API key.

I added the following after it wouldn’t work but it hasn’t helped.

deconz:
host: xxx.xxx.xxx.xxx (IP address of REST API host)
port: 80

How can I configure HA to talk to deconz on the Host machine?

1 Like

You need to go to your phoscon webapp, go to settings>gateway>advanced and click on allow third party apps. A timer will run for 60 seconds, add the integration in HA within that time period. Also make sure your HA and deconz are sitting in the same ip range and subnet. It should find it immediately. If that still doesn’t work make sure deconz is up to date and more important do NOT run a beta version of HA as the latest beta’s had some trouble with deconz (this isn’t the case for everyone though).

Let me know if you still run into trouble.

Also as advice since you run hyper-v on a standard windows host, I would suggest running at least windows server as the host for extra security.

I have tried that already, it still cannot get the API key.

Just to confirm:

Running latest stable version of HA
Latest Deconz and ConBee II driver from their website.

I can access http://xxx.xxx.xxx.xxx:80/api from another device and it shows the Phoscon web app. This is the same IP used in configuration.yaml. I rebooted after adding this.

I think I have spotted the issue. Eventhough I can access the web app from the IP address of the Hyper-V host, in the top right corner of the web app the IP address is different, I think this relates to the other vSwitch in Hyper-V.

Don’t add ip in configuration.yaml. You should be able to add deconz without adding any code to your files. I had tried this as well but that didn’t work for me either. Just add the integration via the integrations ui and make sure you don’t specify an ip in configuration.yaml. Lastly if you had added deconz before remove that first and restart HA.

Edit: make sure deconz is not blocked by the windows firewall, best thing is to add a rule for deconz.exe so that that is at least a 100% accessible.

1 Like

Thanks. I disabled the unneeded vSwitch and the entry on configuration.yaml, then rebooted and it’s there now. :slight_smile:

Now I just need to get it working with HA for autmations etc. I have paired a Hue Dimmer with Deconz but it’s appearing in HA as a battery sensor and a daylight sensor :confused:

Hm the daylight sensor is the default sensor that comes with deconz, the battery entity is weird though. Do you see this in the phoscon app?

The entities will probably not show up in HA, however if you go to dev-tools>events scroll down to the bottom and add the following:

Press start listening!!

Now press any button on your dimmer, if the integration went well you should see an event id showing up. Remember you need these id’s, there is no entity with these dimmers.

How to use this then?
https://github.com/jimz011/homeassistant/tree/master/configuration/automations

Find examples here.

Good luck!

1 Like

Thanks! Yes the entities doesn’t really appear in HA. But when I go to the switch under Integrations, I get the option to make the automations there using plain text (new feature in version 102 it seems).

I have this working but will also look at the options you recommended above :slight_smile: thank you.

I am trying to do the same thing you have working but cannot figure out what to put for device within configuration for deconz. What did you end up using?

I stopped using Hyper-V as Windows was a pain to manage. Now running it with in Docker on my Synology NAS.

Thanks @jimz011! I was reading your answer yesterday as i had the same problem… .just could not get it to work… until i allowed it in my firewall… was not thinking of it, glad you had the tip!