node-red-contrib-home-assistant icon indicating copy to clipboard operation
node-red-contrib-home-assistant copied to clipboard

Cannot install node-red-contrib-home-assistant on Node-RED Hass.io Add-On

Open matt1as opened this issue 7 years ago • 6 comments

I'm trying to install node-red-contrib-home-assistant on a clean install of Node-RED Hass.io Add-On, but the install silently fails, and the node is still available as "installable" in the palette. This is the log I can see in hassio.

Also the node is not added to package.json which I guess it should be?

Log
[INFO] Creating /share/node-red folder
[INFO] Creating default settings
[INFO] Disabling 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"
10 Mar 09:02:37 - [info] 
Welcome to Node-RED
===================
10 Mar 09:02:37 - [info] Node-RED version: v0.18.4
10 Mar 09:02:37 - [info] Node.js  version: v9.8.0
10 Mar 09:02:37 - [info] Linux 4.4.50 arm LE
10 Mar 09:02:38 - [info] Loading palette nodes
10 Mar 09:02:43 - [info] Settings file  : /share/node-red/settings.js
10 Mar 09:02:43 - [info] User directory : /share/node-red
10 Mar 09:02:43 - [warn] No active project : using default flows file
10 Mar 09:02:43 - [info] Flows file     : /share/node-red/flows.json
10 Mar 09:02:43 - [info] Creating new flow file
10 Mar 09:02:43 - [info] Starting flows
10 Mar 09:02:43 - [info] Started flows
10 Mar 09:02:43 - [info] Server now running at http://127.0.0.1:1880/
10 Mar 09:04:43 - [info] Setting active project : Hemmafloden
10 Mar 09:04:43 - [info] Flows file     : /share/node-red/projects/Hemmafloden/flow.json
10 Mar 09:04:43 - [info] Stopping flows
10 Mar 09:04:43 - [info] Stopped flows
10 Mar 09:04:43 - [info] Starting flows
10 Mar 09:04:43 - [info] Started flows
10 Mar 09:05:26 - [info] Installing module: node-red-contrib-home-assistant, version: 0.3.0

matt1as avatar Mar 10 '18 08:03 matt1as

I have the same issue.

I have installed a node-red that works fine. Then I installed a HA in the same raspberry and works fine too. Now I installed node-red-contrib-home-assistant from the Manage Palette option in the menu. It installed with any message but their nodes does not appears in palette.

Any help will be appreciated. Adrian

alasso avatar Mar 24 '18 22:03 alasso

Hi,

I found something in the log that can be useful for the resolving the issue:

25 Mar 12:39:22 - [info] Dashboard version 2.8.2 started at /ui 25 Mar 12:39:27 - [warn] ------------------------------------------------------ 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/server] SyntaxError: Unexpected identifier 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/server-events] SyntaxError: Unexpected identifier (line:1) 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/server-state-changed] SyntaxError: Unexpected identifier (line:2) 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/trigger-state] SyntaxError: Unexpected identifier 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/poll-state] SyntaxError: Unexpected identifier 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/api-call-service] SyntaxError: Unexpected identifier (line:2) 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/api-current-state] SyntaxError: Unexpected identifier (line:1) 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/api-get-history] SyntaxError: Unexpected identifier (line:2) 25 Mar 12:39:27 - [warn] [node-red-contrib-home-assistant/api-render-template] SyntaxError: Unexpected identifier (line:2) 25 Mar 12:39:27 - [warn] ------------------------------------------------------

I will try to understand where is the problem.

alasso avatar Mar 25 '18 15:03 alasso

Hi @alasso,

I had a similar issue today when installing these HA nodes. After a bit of searching and wasted time, it turned out that the default node-red container uses node-v6 [0], which is not supported [1].

[0] https://hub.docker.com/r/nodered/node-red-docker/tags/ [1] https://github.com/AYapejian/node-red-contrib-home-assistant#docker-tips

rubenbe avatar Jun 24 '18 17:06 rubenbe

For anyone else stumbling on this. If you are using the nodered/node-red-docker docker image then you need to use the v8 tag.

respectTheCode avatar Jul 07 '18 00:07 respectTheCode

I continue to have this issue installing the latest version. No Docker.

stainlessray avatar Jul 19 '18 17:07 stainlessray

I would say: Use the community version of the add-on:

https://github.com/hassio-addons/addon-node-red/

frenck avatar Jul 19 '18 18:07 frenck