addons: Updated deCONZ addon to 4.0 and 4.1 - missing entities

Hi,

my config is:

  • Conbee 2,
  • RPi 3B+,
  • Hass.io 0.103.2,
  • deCONZ add-on 4.1.

I noticed that after upgrading to deCONZ 4.0 my entities are missing. The same issue is present in 4.1.

Logs:

ERROR (MainThread) [homeassistant.components.deconz] Error connecting to deCONZ gateway at core-deconz
WARNING (MainThread) [homeassistant.config_entries] Config entry for deconz not ready yet. Retrying in 80 seconds.

WORKAROUND by @frenck:

The add-on sends a reconfiguration discovery notification to Home Assistant to adjust the settings. However, if in the past a manual configuration flow was used, that probably won’t work in that case. The only solution at that point is by removing the integration -> restart Home Assistant -> restart the add-on. After that, a integration should be discovered and visible on the integration screen.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 91 (42 by maintainers)

Most upvoted comments

🎉 Add-on v5.0 is available right now.

I truly hope it will fix everybody’s issues and wishes.

If it does not appear in your Hass.io panel yet, please go to Hass.io add-on store and hit the refresh icon in the top right. Next refresh your browser and the upgrade appears.

Please note: It is advised to use Home Assistant 0.103.4 or newer!

The add-on has now auto-healing capabilities (In terms of the connection between Home Assistant and the add-on). So in case of any issues, restart the add-on, wait at least 1 minute, restart Home Assistant and after that, everything should be normal again.

Sorry about the inconvenience and thanks for the patience.

Merry Christmas 🎄


Changelog:

  • Fix additional gateway visible on Phoscon login on Ingress
  • Fix Phoscon device scanning/probing triggering IP bans
  • Fix redirect to login page when Phoscon session expires
  • Fix incorrect manifest request from Phoscon frontend
  • Fix and improve API key handling with Hass.io discovery
  • Change Hass.io discovery to use add-on IP instead of hostname
  • Improve Phoscon discovery to work different and faster with Ingress
  • Add Websocket support to Ingress for instant and snappy UI updates
  • Re-instate direct access capabilities to the Phoscon/deCONZ API

ℹ️ Status update time. This is what I currently I’m running and testing to death at this moment.

  • I’ve managed to patch out excessive probing that causes IP bans in Home Assistant.
  • Fixed an issue on Home Assistant side of things, that caused the integration to be updated with incorrect data (not effected everybody). This is released with version 0.103.4 of Home Assistant.
  • Fixed an issue on Home Assistant side of things, where the add-on was unable to communicate all settings to the integration. This is fixed with the 0.103.4 release of Home Assistant as well.
  • I’ve figured out an alternative way on how Phoscon handles discovery, which now instantly makes the login available when opening the app in ingress, and removes the additional weird gateway found.
  • Because of the above, it seems like I’m able to open up direct access to both Phoscon, the API and the Hue emulation without issues.
  • WebSocket support for Ingress.

I really want to spend some more time tomorrow on making sure everything works as expected.

So to be clear, for all of the above, it is still unsure if that will be released or works stable.

@frenck It is unrelated to addon, but I gave a workaround since You mentioned that outbond access to deCONZ is disabled in this version. For us who are still learning the system and others that have particular idea of what they want in these with multiple softwares accesing it I had this sollution checked for and published here. Other than this, I understand You and others made effort in creating these pieces of software, (meaning HA and plugins), which we all have to respect as this makes our lifes easier, but as well we have our needs where we find all these apps usable in more or less ammount. Having both of these in mind, I have made this small step. I hope this does not make a issue in this topic.

ℹ️ Status update again.

During extensive testing I’ve found and fixed the following today:

  • If the session expires to Phoscon (e.g, clearing cookies) the redirect to the login page will now work.
  • Fixed a case where Phoscon will try to fetch a file called developer.js that didn’t exists.

I’ve tortured the add-on today and even went in the running container and destroyed things and it was able to recover.

Even resetting the gateway completely, including de-install/install the add-on, pairing devices again, made HA pick up the changes (on HA 0.103.4) automatically, even keeping my device based automation in a working state.

Things are looking good from my end and I ran out of senario’s to test. So personally, I’m 100% happy with the result. I’m going to update to documentation and start working towards opening a pull request to update the add-on.

Even if I don’t appreciate all the bugs, I do appreciate nice status updates. Thanks

I’ve removed integration and add-on, rebooted, added add-on, rebooted, added integration. I get the standard daylight sensor and the gateway itself. I still can’t access the gateway settings page. I can’t control any lights in the house, and thermostat functions no longer work since all my temp sensors are offline.

An oddity is that from one browser, I get all my lights, switches and sensors in the deconz interface. If I open a different browser, it appears as if the GW has been reset. What is going on? I have more than 50 devices paired, and re-pairing them would be a major pain.

Why can’t the API be available from an external port as an option? HomePanel lets me access it from both external port and ingress, so this seems like a completely arbitrary limitation.

Well this only helps for one machine for now. I hope you change your mind in the future and then I’m sure a solution can be found, maybe asking Deconz team to add support for it in some way (like another ports or something) or maybe even have an option to configure the hassio addon to disable/enable ingress or use port access.

Merry christmas and I hope new year will bring new stuff 😃

Yep, however, with the 4.x add-on, it is no longer possible to reach the API from the outside world. I would not worry to much about it.

You’re amazing @frenck

Does this mean the API now allows remote integrations from one Hassio to another + Deconz? If so is remote discovery supported or does the Deconz host have to be manually specified?

I hope you have a wonderful Christmas!

@jamesking420 Well actually, the last part you describe is the part that I wanted to improve, so in that case, you should be happy I pulled the brake on that 😉

The good news is though, I’ve addressed it, the PR is open and ready to go.

@jdenver13 That issue is tracked in #943

Thanks for the update frenck, the deconz integration has now updated and works well. Still have issues with Safari accessing the deconz Gateway, it just will not display the page, I have to use chrome ATM.

ℹ️ Small update from my end and day. I’ve been digging in and setting up all kinds of setups to look further into this issue.

I am making progress in the following area’s:

  • Limiting the number of random “discover” requests to prevent IP banning: This part is going pretty well, trying to work out some last ones.
  • Preventing incorrect discovery data: This is actually pretty much solved at this point. However, I want to make sure it works consistently. In my dev setup, the correct gateway is now available instantly from the web interface.
  • I’ve up until now not been able to reproduce the incorrect API token from the HA integration end.

@fantomnotabene You can still use curl against the API to change settings. Using:

curl -H 'Content-Type: application/json' -X PUT -d '{"duration": 5}' http://core-deconz:40850/api/api_key_here/sensors/motion_sensor_id_here/config

As long as the command is issued from within the Hass.io ecosystem (e.g., using the SSH add-on). For more information see: Using the deCONZ/Phoscon API with another add-on

I think user should have an option to use the API

That has been explained a couple of times on why it is not an option. It is also listed in the “known issues and limitations” section of the add-on documentation.

Thanks, but right now I’m too afraid to test that, was real mess when I upgraded this morning. All house stopped working. I usually do that verty carefully but I didn’t think something will break. I will try that later, but I still recommend finding a way for having direct access also. For example I access data from motion Eye on another machine (not from the HA machine) in motionEye there is an option to map the port (with a text written that it is not necessary for ingress support). image

I apologize if it looked like I jumped into conclusions, I’ve asked on few places and no one know the answer…

I guess you are fine in that case 😉

@frenck The add-on sends a reconfiguration discovery notification to Home Assistant to adjust the settings. However, if in the past a manual configuration flow was used, that probably won’t work in that case. The only solution at that point is by removing the integration -> restart Home Assistant -> restart the add-on. After that, a integration should be discovered and visible on the integration screen.

Thanks for the workaround! But I’m a little worried that I would need to rename all entities again if I remove and re-add the integration. Or will the naming be preserved?

@VivantSenior @jan-dewit The add-on sends a reconfiguration discovery notification to Home Assistant to adjust the settings. However, if in the past a manual configuration flow was used, that probably won’t work in that case. The only solution at that point is by removing the integration -> restart Home Assistant -> restart the add-on. After that, a integration should be discovered and visible on the integration screen.

@pboschi @roaringbits, you guys already did the above 👍 @pboschi The naming of devices is something the integration handles and is not in control for the add-on. If that is a reproducible issue, please be sure to raise an issue on the Home Assistant repository, so the maintainer of the integration can look into it.

@hellcry37 The add-on is now available over Ingress and does not use ports anymore. This makes the add-on available from the Home Assistant frontend, no matter how or where you log into it. For example, when using a remote UI, the add-on can be used, without any port forwarding. Most add-ons do this already, this one is now following.