I am having the same issue as you… everything was fine until I set up Pi-Hole and now I cannot install new nodes. Mind pointing me in the right direction for how you changed the DNS? I was able to get the bash shell into the node-red container as @NotoriousBDG mentioned above but am lost on where to go from there. I did get nmcli
working when I ssh into the host but can’t seem to get it to change.
That did the trick. Thanks!
Newb to both Home Assistant and Node-RED. My apologies for the simple question, just not figuring this part out yet. I’m having similar issues as the OP.
I’m looking for how to use the API Proxy so that I can install the node-red-contrib-home-assistant as stated below:
—> Have you tried that “magic” address that I suggested to fernandex00? Type exactly http://hassio/homeassistant as server address.
I am running:
Node-Red Version 0.1.11 (Installed through Home Assistant as add-on → github/ notoriousbdg/ hassio-addons)
hostname: hassio
System: Resin OS 2.3.0+rev1
Add-ons installed: Duck DNS, FTP, Node-RED, SSH Server, Samba, AirCast, AppDaemon, Bluetooth BCM43xx, CEC Scanner, Configurator, Home Assistant Control Panel
I am getting the error in Node-Red through hassio:
Failed to install: node-red-contrib-home-assistant
Error: Install failed
Check the log for more information
My Node-RED config looks like:
{
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“users”: [
{
“username”: “admin”,
“password”: “",
“permissions”: “*”
}
],
“http_node_user”: [
{
“username”: “admin”,
“password”: "***”
}
],
“projects”: true
}
My Node-RED logs look like:
[INFO] Enabling SSL
[INFO] Updating IDE Users
[INFO] Adding IDE User admin
[INFO] Updating HTTP Node User
[INFO] Adding HTTP Node User admin
[INFO] Enabling Projects
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]
[email protected] start /usr/src/node-red
node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS “–userDir” “/share/node-red”
15 May 08:35:25 - [info]
Welcome to Node-RED
===================
15 May 08:35:25 - [info] Node-RED version: v0.18.5
15 May 08:35:25 - [info] Node.js version: v10.0.0
15 May 08:35:25 - [info] Linux 4.4.50 arm LE
15 May 08:35:26 - [info] Loading palette nodes
15 May 08:35:29 - [info] Settings file : /share/node-red/settings.js
15 May 08:35:29 - [info] User directory : /share/node-red
15 May 08:35:29 - [info] Server now running at https://127.0.0.1:1880/
15 May 08:35:29 - [info] Active project : Home
15 May 08:35:29 - [info] Flows file : /share/node-red/projects/Home/flow.json
15 May 08:35:29 - [info] Starting flows
15 May 08:35:29 - [info] Started flows
15 May 08:37:18 - [info] Installing module: node-red-contrib-home-assistant, version: 0.3.2
15 May 08:37:42 - [warn] Installation of module node-red-contrib-home-assistant failed:
15 May 08:37:42 - [warn] ------------------------------------------
15 May 08:37:42 - [warn] npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to node-red-contrib-home-assistant failed, reason: getaddrinfo ENOTFOUND registry.npmjs.0rg registry.npmjs.0rg:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-15T13_37_42_728Z-debug.log
15 May 08:37:42 - [warn] ------------------------------------------
15 May 08:40:33 - [info] Installing module: node-red-contrib-home-assistant, version: 0.3.2
15 May 08:40:57 - [warn] Installation of module node-red-contrib-home-assistant failed:
15 May 08:40:57 - [warn] ------------------------------------------
15 May 08:40:57 - [warn] npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to node-red-contrib-home-assistant failed, reason: getaddrinfo ENOTFOUND registry.npmjs.0rg registry.npmjs.0rg:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-15T13_40_57_434Z-debug.log
15 May 08:40:57 - [warn] ------------------------------------------
Can anyone let me know where to setup the Proxy API so that I can install the Home Assistant nodes for Node-RED?
Thanks so much! First time here, so if I need to open a new thread or whatever, just let me know.
ф
That error suggests you have a DNS issue. Do you use Pi-Hole addon by chance? if so, your hassio box must have a static IP and have a non-Pi-Hole DNS server as the first DNS server.
Thanks for the quick response! I do not have the Pi-Hole addon added at this point. I do have a static IP for my hassio instance though.
I wasn’t sure where you were referring to, in order to add the Proxy API address.
Thanks!
Ф
ssh’ing into my hassio instance, I was able to curl the URL that is failing in my node-RED logs:
core-ssh:~# curl https://registry.npmjs.org/node-red-contrib-home-assistant
{"_id":“node-red-contrib-home-assistant”,"_r …
The api proxy URL is needed when you create your first flow with node-red-contrib-home-assistant. You’ll need to figure out why you’re having DNS issues while attempting to install node-red-contrib-home-assistant.
Makes sense, thanks!
I can ssh from my box and curl the ‘https://registry.npmjs.org/node-red-contrib-home-assistant’ and get a response. Yet, when running the install from inside node-RED, my logs are showing:
npm ERR! network request to node-red-contrib-home-assistant failed, reason: getaddrinfo ENOTFOUND registry.npmjs.0rg registry.npmjs.0rg:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
I’m not behind any proxies. For node-RED, I’ve opened ports 443 TCP, 123 UDP, and 53 UDP.
Anyone have any other ideas to try?
ssh’ing into my hassio instance seems like ‘npm’ should have no problems with the URL. I have connectivity and all my checks seem fine.
Have internet connectivity
core-ssh:/# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=54 time=13.505 msDNS resolve working
core-ssh:/# ping google
PING google (173.194.219.99): 56 data bytes
64 bytes from 173.194.219.99: seq=0 ttl=40 time=12.404 mscan ping URL with port
core-ssh:/# ping registry. npmjs. org:443
PING registry. npmjs. org:443 (151.101.204.162): 56 data bytes
64 bytes from 151.101.204.162: seq=0 ttl=52 time=11.942 msconnect via https
core-ssh:/# curl https:// registry. npmjs. org/
{“db_name”:“registry”,“doc_count”:883646,“doc_del_count”:342,“update_seq”:11002588,“purge_seq”:0,“compact_running”:false,
“disk_size”:9663005649,“data_size”:5493835562,“instance_start_time”:“1526403022417329”,“disk_format_version”:6,“committed_update_seq”:11002587}
Did you solve your problem already?
First, have you rebuild your Node-Red add-on? It helps many times.
One of my problems was that I had tried different ip and DNS settings for Hassio. And that had somehow screwed something inside Hassio networking. I had to manually fix ResinOS ip settings.
Where are you running your ping tests? If you are running them inside SSH add-on, then those aren’t full truth. Try to get inside Node-Red add-on container with these:
THanks for following up, that’s what I did that eventually worked. I kept trying different DNS settings and finally got it all working!