gdgib/span

Install Error - Won't Initialize with Automatic Detection

tylas13 opened this issue Β· 7 comments

After getting another lock-out due to the door panel needing to be opened x3 again I attempted reinstall, but integration would not initialize using the automatic detection feature in the Devices and Services section in Settings. Would get an access token error:

Logger: homeassistant.config_entries
Source: custom_components/span_panel/__init__.py:40 
Integration: Span Panel ([documentation](https://github.com/gdgib/span), [issues](https://github.com/gdgib/span/issues)) 
First occurred: 1:19:03 PM (1 occurrences) 
Last logged: 1:19:03 PM

Error setting up entry Span Panel nt-2142-c1aj0 for span_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/span_panel/__init__.py", line 40, in async_setup_entry
    access_token=config[CONF_ACCESS_TOKEN],
KeyError: 'access_token'

If I choose a manual installation it installs flawlessly and begins logging data. However, the Devices and Services will still see the Span Panel to do a setup even though it is already configured.

Duplicated discovery and set up from discovery should be fixed with this PR

#12

@tylas13 I'm doing some volunteer support housekeeping on a few HA-related repos that I rely on and wanted to check in on this one. Did the newer version using the merged-in PR 12 listed above prevent this issue from reoccurring for you, and if so is it safe to close this one out?

(You'll need to switch your version in HACS to main I believe, since a release hasn't been cut since this PR was merged in.)

Had this exact issue just now... The default version from the HACS dropdown is 'v0.0.7' and I resolved the issue by manually choosing the 'main' branch in HACS durring the download stage.

All is good now that I'm on the 'main' branch.

Yes, I do still have this issue. Had do to a reset again with the door swing open x 3 times this weekend and usually have to reinstall the integration. The auto detect install does not register but if you go into the button and put in the IP address this will work as expected.

I have not attempted to reinstall the integration from HACS. I am using gdgib's 0.0.7 version - don't know if it if 'main' branch or not.

@tylas13 Yeah this issue should be fixed, but you need to run a different version than the one you have for it. Here's how:

  1. Go into the HACS panel menu and select the span integration.
  2. Once you are inside the Span integration (where all the readme data is) click the three dots in the top right, and select "Redownload".
  3. On the new box that appears, the dropdown for "select version" will be preset to v0.0.7. You want to click this drop down and scroll to the bottom, where the last entry says main. Select that, and click "download" at the bottom of the window to update your version to the main version.
    This should replace your version of the Span integration with one that has new code changes that should solve your issue. In the future when version 0.0.8 is eventually released, you can update to that instead if you'd like, and continue following the latest releases from that point onward.

(Context: 0.0.7 is the most recent release, main is everything that has been added to the code since 0.0.7, but has not yet made it into a future pending 0.0.8)

Thanks for the instructions, thought I was on the most recent version and missed the β€˜main’ on the bottom.

Had to delete the integration, redownload, restart (twice for some reason?) and then auto detect enrolled it without an issue.

Thanks all!

Happy to help!

Technically you were on the latest "Release" which is what you generally want to be on, so your instincts were right. Main is sort of a rolling version of the "bleeding edge" of what will be in the next release once it is ready... so this was just a shortcut way to get you those fixes you needed before a 0.0.8 release is cut.