amaximus / garbage-collection-card

Custom Lovelace card for Garbage Collection custom component
MIT License
128 stars 24 forks source link

doesn't install correctly in HACS? #25

Closed jonwaland closed 4 years ago

jonwaland commented 4 years ago

according to HACS (and based on the hacs.json), the following should be added to lovelace..

/hacsfiles/garbage-collection-card/garbage-collection-card.zip

But according to the install info here it should be

/hacsfiles/garbage-collection-card/garbage-collection-card.js

Causing the following error in HACS: Not loaded This plugin is not added to your Lovelace resources.

amaximus commented 4 years ago

Trried to reproduce the error by re-installing the card, but the original path is still working. Please set the location of the card in the ui-lovelace.yaml back to the original /local/community/..... instead of /hacsfiles/... .

Please get back to me with results.

jonwaland commented 4 years ago

uninstalled, reinstalled - again HACS wants to add to lovelace config. And it adds /hacsfiles/garbage-collection-card/garbage-collection-card.zip

I'm running HACS 0.22.2

(I also have /local/community/... in the lovelace file so the card itself works.

SurfingSpider commented 4 years ago

Ditto. Did the same for me. manually changing .zip to .js fixed it

CrallH commented 4 years ago

I have the same issue. If i change it to /hacsfiles/garbage-collection-card/garbage-collection-card.js the card works but is red in HACS (Not Loaded). if i set the old way its the same.

(I also have /local/community/... in the lovelace file so the card itself works.

amaximus commented 4 years ago

I'm using HomeAssistant Core (installed standalone on Raspbian OS) in yaml mode not Hassio. Even if I reinstalled HACS and the custom card, specifying /local/community/... for the card (ui-lovelace.yaml) makes the card work (in spite that HACS information says it should be /hacsfiles/...). I presume the issue is caused by Hassio way of handling things.

Repsionu commented 4 years ago

No, nothing to do with Hassio, I run HA in virtualenv (core) and despite all tricks I tried still Not added to Lovelace and a red icon. Card OK itself :-)

amaximus commented 4 years ago

@Repsionu , so to clarify things: is then the card show up as it should? What was giving "not added to Lovelace". Are you using the yaml mode (thus editing ui-lovelace.yaml) or doing all the things via the UI?

Repsionu commented 4 years ago

Thanks, Adding it through UI raw config editor, all works Ok except HACS Red icon. BTW great thanks for very useful add-on 😀Best, JR Edit: in 0.107 card is not shown in Lovelace and in new Lovelace resource UI editor You have to replace .zip with .js and then card works but HACS again not :-( Where did this .zip come from- faulty adding to HACS?

RoldyBuffalo commented 4 years ago

This is the log error I get in HA.


Log Details (ERROR)
Logger: hacs
Source: custom_components/hacs/http.py:76
First occurred: 12:51:41 PM (1 occurrences)
Last logged: 12:51:41 PM

Tried to serve up '/config/www/community/garbage-collection-card/garbage-collection-card.zip' but it does not exist
Successfully saved

this is the resource the integration adds when clicking "add to lovelace"

Url
/hacsfiles/garbage-collection-card/garbage-collection-card.zip

Resource type
JavaScript Module

if I change it to /garbage-collection-card.js it stops the error, but no longer recognizes the integration as ... integrated.

Might be an oversight by the repository owner, might also just be a change that hadn't been implemented yet with the changes to lovelace and hass.

amaximus commented 4 years ago

Unfortunately managing Lovelace from UI has a lot of issues. I got a lot of reports about this, while those who use Lovelace in yaml mode do not have issues with the card. I admit that it might be comfortable using the UI mode, but you are less in control of what's happening, how things are handled. Unfortunately I cannot fix this behaviour as it's out of scope for this card, I can only recommend switching Lovelace to yaml mode.

chillkiller commented 4 years ago

at the new update to 0.107.1 there are many nice features come to lovelace and also some improvements to the ui-mode... the problem is at your plugin, that hacs installs the resource as a .zip and not as a .js, does this not can be fixed?? Also home assistant explicitly points this out to not implement resources over yaml

hacs-garbage-card

amaximus commented 4 years ago

@chillkiller The issue is with HACS in non-yaml mode not unzipping the file. Anyway in the newest - 1.5.2. - release I added explicitely the js file as well. Unfortunately not unzipping the zip file the translations files (from translation directory) will not get deployed, thus you will not have access to translations.

You stated that "home assistant explicitly points this out to not implement resources over yaml". Can you provide a link to such statement?

chillkiller commented 4 years ago

@chillkiller The issue is with HACS in non-yaml mode not unzipping the file. Anyway in the newest - 1.5.2. - release I added explicitely the js file as well. Unfortunately not unzipping the zip file the translations files (from translation directory) will not get deployed, thus you will not have access to translations.

You stated that "home assistant explicitly points this out to not implement resources over yaml". Can you provide a link to such statement?

Sry, the info-box is in german but its that what I mentioned in the last post

resources info

"Resources should no longer be added to the Lovelace configuration, but can be added in the Lovelace configuration window"

chillkiller commented 4 years ago

And a other point ... hacs already unzipping the files the right way all the time, but implementing it in the lovelace resources got wrong... I allready got the translation folder and the right garbage-collection-card.js. Its only name it as a *zip in the resources section...

resources

Only some handshake or take over are getting the issue, I'm not a dev so I don't know where it is to look in or how this normaly work...

amaximus commented 4 years ago

In the newest version - 1.5.4 - I removed the zip-release mode and restructured the translations. Please update and let me know the results.

chillkiller commented 4 years ago

Sry, for the question, but did you change something else than release without *.gz??

resources2

As I told there seems to be only a handshake issue ...

amaximus commented 4 years ago

Yes, in the newer version I restructured the translations so I do not need to have them in a different directory, this way I can add those json files to the release easily. The newest version is 1.5.4. Could you please upgrade?

chillkiller commented 4 years ago

An error ocoured while processing Could not use repository with ID 207018200

amaximus commented 4 years ago

After I upgraded to 0.170.2 and had to restart hass the issue got solved (not sure if it was the upgrade or the restart).

chillkiller commented 4 years ago

After I upgraded to 0.170.2 and had to restart hass the issue got solved (not sure if it was the upgrade or the restart).

yeah that was why I asked you the post above .... suddenly release 1.5.1 worked ... but now 1.5.4 produce an error

RoldyBuffalo commented 4 years ago

lol...

yeah that was why I asked you the post above .... suddenly release 1.5.1 worked ... but now 1.5.4 produce an error

same. getting this error

An error ocoured while processing Could not use repository with ID 207018200

amaximus commented 4 years ago

Any update on this issue? Yaml mode of Lovelace doesn't present this issue, so I suppose the UI mode does something completely different.

jonwaland commented 4 years ago

no issues here, using hacs 1.0.0, Home Assistant 0.110.0, garbage card 1.5.6 (icon issue aside - refreshed cache, fixed)

tsrattan commented 4 years ago

this file do not exist /hacsfiles/garbage-collection-card/garbage-collection-card.zip but this file was present /hacsfiles/garbage-collection-card/garbage-collection-card.js so I zipped it and placed it in the location along with js. no error after that (zip not found)