I am setting up a second instance of HA at our Scout Hut, using HA Green. I am trying install HACS, and have followed the instructions at Downloading HACS - HACS
When I run the Get HACS add on, the download starts happening in the log, but around about the 80-85% mark it fails, with the error:
wget: connection closed prematurely
What am I doing wrong? I’ve tried restarting, the internet connection is fine, there isn’t much else installed on the instance yet.
Ethernet into a 4g router. But the connection seems fine. The couple of other integrations I’ve installed all downloaded fine, as did the various updates needed.
I tried HACS a couple of times this afternoon, and the download was slow but steady, until 87%, when it cancelled both times. Then I tried again this evening, and it downloaded much faster, but stopped at 83%. However, this time the percentages were going up at 3 or 4 per time, so in fact it probably failed at 87% again. Which makes me wonder whether there is a problem with the download package, or something to do with its size.
I’m not sure how I would use wget! Do I need to install a command line integration?
In any case, the script seems to be running wget, and it is that which is failing?
Just a note.
A DNS query is only done in the beginning of a connection to get the IP of the server.
Once that IP is acquired then it will be used instead of the host name.
“Connection closed prematurely” means computer/server do not know why it closed, so it is either the connection or the opposite computer server that does it.
GitHub, where HACS is stored, can have issues, but only solution to that is waiting for them to fix it.
Your connection is the other possible cause and a 4G mobile connection can be disconnected and reconnected quickly, but this might cause the router/modem to get a new IP and then the connection is disconnected to the server, because the old connection was between the server and the old IP of your modem/router.
Downloading to my laptop, then connecting via samba and copying across the files worked. So thanks very much. Still not sure why the download is failing.