Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HACS installation does not work #116

Open
Aephir opened this issue Aug 18, 2020 · 4 comments
Open

HACS installation does not work #116

Aephir opened this issue Aug 18, 2020 · 4 comments
Labels
invalid This doesn't seem right

Comments

@Aephir
Copy link

Aephir commented Aug 18, 2020

The component:

  • Current version: 1.12.6 (but shows 1.3.6 in UI)

Your setup:

  • Home Assistant version: 0.113.3
  • OS: Ubuntu Server LTS 20.04 with Home assistant core in Docker
  • Browser name & version: Various, e.g.: Firefox (79.0), Vivaldi (3.1.1929.45), Iridium (2019.04), Chrome (84.0.4147.125), Safari (13.1.2)

Describe the bug
Custom alarm is not updated in HACS. It was working, but stopped at some point (not sure when, haven't used it in a while). No upgrade is shown as available in HACS.

When completely removing, and re-installing with HACS, it shows that the correct version (1.12.6) is available and installed (config/custom_components/bwalarm/resources/panel.html shows var _VERSION = 'v1.12.6';).

When navigating to the Alarm panel in HA UI, it shows:

This Panel: v1.3.6_ak74

This is regardless of browser, and clearing cache.

To Reproduce

Steps to reproduce the behavior:

  1. Install via HACS
  2. Create the config/resources as described and copy the bwalarm folder to here. (yes, the correct one, this one, not this one)
  3. Restart HA (as instructed by integration, but have also tried without restarting)
  4. Clear browser cache
  5. Log in to HA
  6. Navigate to alarm panel

Expected behavior
Custom alarm working, like it used to.

Your bwalarm.yaml
Have tried with my old config, but [as suggested](platform: bwalarm), I also tried with just minimal config.

platform: bwalarm

Home Assistant log

2020-08-18 08:13:54 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up bwalarm platform for alarm_control_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
    return fut.result()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 395, in async_setup_platform
    await hass.components.panel_custom.async_register_panel(
  File "/usr/src/homeassistant/homeassistant/components/panel_custom/__init__.py", line 144, in async_register_panel
    hass.components.frontend.async_register_built_in_panel(
  File "/usr/src/homeassistant/homeassistant/components/frontend/__init__.py", line 196, in async_register_built_in_panel
    raise ValueError(f"Overwriting panel {panel.frontend_url_path}")
ValueError: Overwriting panel alarm

I have also had logging on for HACS. They are too long to paste here (github won't let me). I have uploaded two different logs here (trying to start) and here (logging is on while installing)

Screenshots
Screenshot 2020-08-18 at 09 55 12

Additional context

@akasma74
Copy link
Owner

akasma74 commented Aug 19, 2020

Out of curiosity, have you tried removing the alarm and installing it manually? If yes, does that make any difference?

Unfortunately, I don't use HACS (had to remove it as it was too resource-hungry) and it will be difficult to reproduce the issue.
On top of that, your HA log shows that there is another problem that does not allow the panel to be setup.

If you rename that file, restart HA, clear cache and navigate to alarm panel, do you see any changes comparing to your screenshot?

@Aephir
Copy link
Author

Aephir commented Aug 19, 2020

No, none of those things worked. Which was very weird, and got me searching through everything I had. A locate alarm finally helped solve it.

Apparently, I had in panel_custom.yaml:

  - name: alarm
    sidebar_title: Alarm
    sidebar_icon: mdi:shield-home
    config:
      alarmid: alarm_control_panel.house ## USE THE SAME ID AS USED IN YOUR ALARM.YAML

Not sure why re-naming the panel.html and clearing cache didn't work, but cleaning this old part of the config helped. So no error in Hass_Custom_Alarm or HACS, just some stupid leftover code that I (and others, judging from the other issue) hadn't cleaned properly.

@akasma74
Copy link
Owner

akasma74 commented Aug 19, 2020

Not sure why re-naming the panel.html and clearing cache didn't work, but cleaning this old part of the config helped.

so tell me what exactly did you do? and have it solved the issue?

@Aephir
Copy link
Author

Aephir commented Aug 20, 2020

In configuration.yaml I had

panel_custom: !include config_files/panel_custom.yaml

and in my panel_custom.yaml I had (among other things):


  - name: alarm
    sidebar_title: Alarm
    sidebar_icon: mdi:shield-home
    config:
      alarmid: alarm_control_panel.house 

I just removed that part from panel_custom.yaml, cleared cache (again), installed Hass-Custom-Alarm (manually), and everything was back to normal.

I then removed Hass-Custom-Alarm again, and installed via HACS, which also works as expected now (using my old bwalarm.yaml config).

Removing the config about panel_custom worked. Problem solved. I was just noting that renaming panel.html (before removing panel_custom part) didn't change anything, and though that was odd. But yes, everything works as expected now, regardless of method of installation.

Repository owner deleted a comment from 26tajeen Aug 31, 2020
@akasma74 akasma74 added the invalid This doesn't seem right label Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants