Thx for the info.
Yes I have enabled SSL on port 8123. I tried with my DNS address, but also no luck. Anyway I thought it must work via the local api address for add-ons??!?
I always use http://hassio/homeassistant for addons homebridge or appdaemon and never had problems before.
I’ve dug into the issue with using http://hassio/homeassistant in node-red-contrib-home-assistant a little bit more. It appears to be an issue with the API proxy in hassio.
If I execute curl -X GET -H "Content-Type: application/json" http://localhost:8123/api/stream within the Node-RED container, I get the event stream. If I execute curl -X GET -H "Content-Type: application/json" http://hassio/homeassistant/api/stream inside the Node-RED addon, it hangs.
The hassio API proxy now supports proxying the event stream. Make sure your supervisor has automatically updated to 0.78 or newer. After that, you should be able to use http://hassio/homeassistant as your Base URL in Node-RED.
I have Node Red up and running and built a number of basic flows. I am having an issue with it starting/staying running on Hass restart/start events.
On a fresh reboot, I have to manually start NodeRed. I have auto start on boot enabled.
If I restart Hass, NodeRed will crash and I have restart it.
Anyone else have this issue?
Here is the error from restarting Hass via the Hassio control panel. The crash happened right after Hass started up. Node Red stayed running up to that point.
28 Dec 09:40:19 - [red] Uncaught Exception:
28 Dec 09:40:19 - TypeError: Cannot read property 'state' of null
at Object.onIncomingMessage (/share/node-red/node_modules/node-red-contrib-home-assistant/node-server-state-changed/node-server-state-changed.js:46:147)
at HaEvents.onStateChanged (/share/node-red/node_modules/node-red-contrib-home-assistant/node-server-state-changed/node-server-state-changed.js:54:43)
at emitOne (events.js:101:20)
at HaEvents.emit (events.js:188:7)
at HaEvents.onClientMessage (/share/node-red/node_modules/node-home-assistant/lib/ha-events.js:57:18)
at EventSource.client.on (/share/node-red/node_modules/node-home-assistant/lib/ha-events.js:96:49)
at emitOne (events.js:96:13)
at EventSource.emit (events.js:188:7)
at _emit (/share/node-red/node_modules/eventsource/lib/eventsource.js:186:17)
at parseEventStreamLine (/share/node-red/node_modules/eventsource/lib/eventsource.js:201:9)
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! Linux 4.4.50
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--" "--userDir" "/share/node-red"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/share/node-red"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/share/node-red"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-red-docker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/share/node-red"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-red-docker
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-red-docker
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/node-red/npm-debug.log
When I go to install the Node-Red add-on in Hass.io, the Install button just flashes red and the add-on won’t install. I’ve never had this issue with other add-ons before (I have installed many). I don’t see anything in home-assistant.log correlated to this failure. Any ideas what I can do to get it to work? Very interested to experiment with Node-Red.
18-01-19 16:25:13 INFO (SyncWorker_11) [hassio.docker.addon] Start build 27e642c6/armhf-addon-nodered:0.1.6
18-01-19 16:25:14 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 410, in start
resp = yield from self._request_handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 325, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl
return (yield from handler(request))
File "/usr/lib/python3.6/site-packages/hassio/api/utils.py", line 33, in wrap_api
answer = await method(api, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 524, in install
if not await self.instance.install(self.last_version):
File "/usr/lib/python3.6/site-packages/hassio/docker/utils.py", line 18, in wrap_api
return await method(api, *args, **kwargs)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/hassio/docker/addon.py", line 263, in _install
return self._build(tag)
File "/usr/lib/python3.6/site-packages/hassio/docker/addon.py", line 276, in _build
image = self._docker.images.build(**build_env.get_docker_args(tag))
File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 179, in build
raise BuildError(chunk['error'])
docker.errors.BuildError: Please provide a source image with `from` prior to commit
Thanks to you both for mentioning/addressing this issue. I was having the same issue. I had no idea you could update the OS on Hass.io. Node Red installed fine after I updated it.