Comments (34)
Well that seems unfortunate for those of us that do NOT use hassio, and prefer to run official docker containers...I guess I will have to wait then.
from node-red-contrib-home-assistant.
I ran into this issue and fixed it by pulling the v8 image that flamingm0e mentioned. I also had a lot of flows randomly work and not work. I ended up re-creating all of my Hass nodes with the same information and now they work. Everything appears to work correctly and looks identical on upgrade, but there must be something behind the scenes that makes 0.2.1 and earlier flows not work all the time.
Can we get breaking changes notes for new version in the future?
from node-red-contrib-home-assistant.
@Resterday I don't use hass.io setup myself. But in the hass.io setup, all are docker containers, so you can exec to that container. The only thing I don't know where the node_modules folder is. If you can locate that, you only need to perform that npm command.
Some steps:
- first uninstall using the GUI the 0.3 version
- docker exec -it {nodred-container} bash
- cd /path/to/node_modules
- npm install [email protected]
- maybe restart
Don't know if it is the best way, but I guess it will work.
from node-red-contrib-home-assistant.
I've committed a workaround to the issue with the hassio addon at https://github.com/notoriousbdg/hassio-addons/commit/c39fa4d497e90208f8d24085d9b5aae492614bf8. For hassio users, updating the addon should get node-red-contrib-home-assistant working again.
from node-red-contrib-home-assistant.
Just threw another node-red docker up and installed a fresh home-assistant node, and it worked fine. I will try to uninstall from the 'production' instance and install a fresh HA node
from node-red-contrib-home-assistant.
No go. I cannot update to 0.3.0 on my 'production instance'
from node-red-contrib-home-assistant.
I'm having the same problem with a freshly installed hass.io System.
I installed hass.io (1.1) with Home Assistant (0.63.2), added the Node-Red Plugin (0.1.8) and installed the node-red-contrib-home-assistant (0.3.0) palette. The nodes were visible first but on deployment I received multiple errors saying the nodes are not installed.
The Node-Red log shows the following errors during startup:
Welcome to Node-RED
18 Feb 08:56:08 - [info] Node-RED version: v0.18.3
18 Feb 08:56:08 - [info] Node.js version: v6.11.0
18 Feb 08:56:08 - [info] Linux 4.4.50 arm LE
18 Feb 08:56:09 - [info] Loading palette nodes
18 Feb 08:56:15 - [warn] ------------------------------------------------------
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/server] SyntaxError: Unexpected identifier
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/server-events] SyntaxError: Unexpected identifier
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/server-state-changed] SyntaxError: Unexpected identifier
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/trigger-state] SyntaxError: Unexpected identifier
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/poll-state] SyntaxError: Unexpected identifier
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/api-call-service] SyntaxError: Unexpected identifier (line:2)
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/api-current-state] SyntaxError: Unexpected identifier (line:1)
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/api-get-history] SyntaxError: Unexpected identifier (line:2)
18 Feb 08:56:15 - [warn] [node-red-contrib-home-assistant/api-render-template] SyntaxError: Unexpected identifier (line:2)
18 Feb 08:56:15 - [warn] ------------------------------------------------------
18 Feb 08:56:15 - [info] Settings file : /share/node-red/settings.js
18 Feb 08:56:15 - [info] User directory : /share/node-red
18 Feb 08:56:15 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
18 Feb 08:56:15 - [info] Flows file : /share/node-red/flows.json
18 Feb 08:56:15 - [info] Creating new flow file
18 Feb 08:56:15 - [info] Starting flows
18 Feb 08:56:15 - [info] Started flows
18 Feb 08:56:15 - [info] Server now running at http://127.0.0.1:1880/`
from node-red-contrib-home-assistant.
I started doing a brand new installation today, and also cannot get any of the nodes to appear. On HASS.io 0.63.2 NodeRed extension 0.1.8
All of the nodes in the manage palette view show up as gray.
from node-red-contrib-home-assistant.
from node-red-contrib-home-assistant.
+1 on this issue from me too.
Tried @jmesberg suggestions to no avail.
Node-red 18.3
Homeassistant Node 0.3
from node-red-contrib-home-assistant.
Also having this issue. Tried a fresh installion of Node-red, but that didn't help.
Node-red: 18.3
node-red-contrib-home-assistant: 0.3.0
When I install 0.2.1 it works in node-red 18.3
from node-red-contrib-home-assistant.
I am having this issue too. Just trying to get started with Node-Red and Home Assistant. I have Hassio with the node-red add-on. When I install node-red-contib-home-assistant I get the following:
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/server] SyntaxError: Unexpected identifier
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/server-events] SyntaxError: Unexpected identifier
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/server-state-changed] SyntaxError: Unexpected identifier
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/trigger-state] SyntaxError: Unexpected identifier
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/poll-state] SyntaxError: Unexpected identifier
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/api-call-service] SyntaxError: Unexpected identifier (line:2)
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/api-current-state] SyntaxError: Unexpected identifier (line:1)
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/api-get-history] SyntaxError: Unexpected identifier (line:2)
18 Feb 11:51:04 - [warn] [node-red-contrib-home-assistant/api-render-template] SyntaxError: Unexpected identifier (line:2)
Is there a way I can install a previous version until a solution is found?
from node-red-contrib-home-assistant.
I tried various restart-reinstall cycles as well as installing several other addons, which worked as expected, so far no help.
from node-red-contrib-home-assistant.
@Resterday I removed the installed version using the GUI en then installed an older version using the cli.
npm install [email protected]
from node-red-contrib-home-assistant.
@Joentje thanks for the response. I don't think I have access to npm with my setup: hass.io with node-red installed as an add-on. I can see the npm commands in the node-red add-on logs, but I don't know where I would input them myself. If you know how I could accomplish this that would be a big help.
from node-red-contrib-home-assistant.
so you can exec to that container
You sure about that? Resin-OS is not a normal Linux distro.
from node-red-contrib-home-assistant.
0.21 worked for me.
My setup has node-red as seperate install on pi rather than an addon in hass.io.
from node-red-contrib-home-assistant.
Hey all, I suspect that the issues seen here stem from the version of node being run on the node-red server / container. Can you please list output of node -v
from the server or inside the container?
This project has a docker build included and everything is working there so something must be different with the environments on the failing installs.
from node-red-contrib-home-assistant.
Hey AYapejian,
I'm still at work so I can't check it our locally but according to the log the hass.io-Addon of node-red uses Node.js version: v6.11.0.
best regards
from node-red-contrib-home-assistant.
Node 8.9.2, npm 5.5,1, Node-RED 0.18.3, did an in place upgrade from 0.21 to 0.30 without any issues.
from node-red-contrib-home-assistant.
Ok, yea that confirms what I was thinking. So some of the code I have written requires ES features not available until node 8.x. Since v8.9 is the latest LTS version of node I thought it a safe bet this group would be up to date. I do not use Hass.io personally so I can't comment on what to do there directly, however you can always take the Dockerfile found in this repo and adapt it to your needs and just run that.
from node-red-contrib-home-assistant.
@notoriousbdg Might need an update to your hass.io addon if possible, see above. Many thanks.
from node-red-contrib-home-assistant.
node -v:
v6.12.3
I don't have node-red as an addon in Hass.io. My node-red is standalone install on pi.
from node-red-contrib-home-assistant.
Any ideas for workaround for hassio users? I don't know that I could get node-red working as standalone on a different pi since my home assistant is encrypted via duckdns add-on for hassio.
from node-red-contrib-home-assistant.
Just a small note: @notoriousbdg's addon uses the official node-red docker image which is still using nodejs 6 (https://github.com/node-red/node-red-docker/blob/master/latest/Dockerfile), however they are currently planning to upgrade to nodejs 8 (node-red/node-red-docker#62) at which point 0.3.0 should work within hass.io.
from node-red-contrib-home-assistant.
Took me a while but I finally figured out I needed to update node.
The script here: from Rasberry Pi docs didn't seem to do it.
I then used:
`sudo npm cache clean -f
sudo npm install -g n
sudo n stable`
Which gave me this issue:
npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module 'internal/util/types'
to which I had to run this:
rm -rf /usr/local/lib/node_modules/npm
And then re-ran the script from from Rasberry Pi docs
And I think then had to run the 3 sudo commands (above) again, before I finally got a working install.
A good result in the end because it's brought all my nodes into .node-red which is better, I had some globally installed nodes from historic.
home-assistant v 0.3.0 running ok
npm 5.6.0
node 8.9.4
nr 18.3
from node-red-contrib-home-assistant.
yeah, official node-red docker node version is v6.12.3. I am not using hassio, I run my own docker stack, and this is the latest version of node-red-docker.
from node-red-contrib-home-assistant.
Just FYI for those that are running there own docker stacks as @flamingm0e mentions. This project has an example Dockerfile as well as an example docker-compose.yaml file that I use for testing these nodes, node-red and home-assistant all integrated.
I apologize for the problems, I don't use hassio and run my own custom images so didn't realize both node-red docker and the hassio addon are on non-latest LTS versions. Hopefully those projects can update soon or the above mentioned files can provide a jumping point if you just want to build your own image. Alternatively you always have the option of just staying at 0.2.x until those images are updated. Sorry again all.
[EDIT]
To actually use the linked files you'll need to checkout the project build from within the _docker
directory, some details in the README.md file. But these are really for development and mentioned as only a jumping off point for you to get something going on your own stack.
[/EDIT]
from node-red-contrib-home-assistant.
I can confirm the breakage on my docker stack and that switching back to 0.2.x solves the issue as an interim
from node-red-contrib-home-assistant.
Think this one is nailed down and addressed a couple different ways, thanks @notoriousbdg for taking the initiative on that PR.
from node-red-contrib-home-assistant.
Sorry, @flamingm0e I didn't think it was asking all that much since spinning up a modified Docker image is pretty trivial. I just don't see removing the offending code to support the older of the two LTS's at this stage.
For anyone else wanting a more complete example than what I provided in this repository already of the Dockerfile see below:
- Create a file called
Dockerfile
- Paste in these contents:
FROM node:8.9.4
RUN mkdir -p /app /data && chown -R node:node /data /app
# Install NodeRed base app
ENV HOME=/app
USER node
WORKDIR /app
RUN npm install [email protected]
# Add Useful Automation Nodes here
RUN npm install \
node-red-contrib-bigstatus
# Install node-red-contrib-home-assistant
RUN npm install AYapejian/node-red-contrib-home-assistant#master
# User configuration directory volume
EXPOSE 1880
# Environment variable holding file path for flows configuration
ENV NODE_PATH=/app/node_modules:/data/node_modules
CMD ["node", "node_modules/node-red/red.js", "--userDir", "/data", "-v", "flows.json"]
- Create a file called
build-and-start.sh
and paste below. ( Change the first line below to wherever your flows are located on the host system )
#!/bin/sh
local_flows_dir=/tmp/node-red-flows
docker rm -f my-local-node-red
docker build -t local-node-red .
docker run -d --name my-local-node-red \
--name my-local-node-red \
-p 1880:1880 \
-v $local_flows_dir:/data \
local-node-red
- Run
chmod a+x build-and-start.sh
- Run
./build-and-start.sh
- Hit
http://localhost:1880
in your browser - profit
from node-red-contrib-home-assistant.
looks like the node-red guys put out a tagged V8 image, but unfortunately I have to re-do all my flows :( I built everything around the pre 0.3.0 and a lot of stuff doesn't work now.
from node-red-contrib-home-assistant.
Shouldn't the latest by v8? LoL
from node-red-contrib-home-assistant.
Hi guys!
Running a 0.3.2 node-red-contrib-home-assistant on an hassbian freshly installed.
I have copied my node using import function of node-red and all my get current state nodes log "local state cache missing, sending empty payload".
Of course those nodes break the flow :(
I have spent hours searching how to correct that :(
from node-red-contrib-home-assistant.
Related Issues (20)
- Support SSL LetsEncrypt 443 port? HOT 1
- History Node Not Filtering Per Entity
- Can't install node-red-contrib-home-assistant HOT 1
- Call Service with Merge Context not working properly
- The node doesn't see all of my services. HOT 1
- Install error on bcrypt HOT 4
- DEPRECATED HOT 1
- Templating not working properly in data field
- Accept boolean inputs to call_service nodes HOT 1
- Node Red still broken after HA update (0.106.1) HOT 2
- current state error HOT 1
- Entity could not be found in cache for entity_id: HOT 2
- Issue Installing HOT 1
- Dead link to example flows on the Github page
- Error install HOT 1
- Change to OAuth Access Token HOT 2
- Node Red Stopped Responding after upgrading to HA 0.76.0 HOT 1
- Call service node replaces msg object
- install with npm: not a valid repo name HOT 1
- Updates? HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-home-assistant.