Comments (6)
Just for info for anyone else getting this error, it is caused by running an older version of node_js. When I installed everything on ubuntu 16, I followed the instructions here: https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/ to install version 8 of nodejs, then re-installed nodered and this module and everything works fine now.
from node-red-contrib-home-assistant.
This looks like it could be due to data you're passing into the API node. Maybe I can improve / add validity checks if they aren't there already. Could you provide some more details on how the flow was configured within node-red?
from node-red-contrib-home-assistant.
This seems to be the underlying issue:
26 Nov 21:01:12 - [info] Waiting for missing types to be registered:
26 Nov 21:01:12 - [info] - server
26 Nov 21:01:12 - [info] - api-call-service
I have installed the addon in node-red, and upon refreshing the page I get exactly the same types to be missing. Deployment fails after that.
If I then reboot node-red (as instructed) none of the addon types are available anymore. They are available in the addons page, so it is installed. But the nodes are not available from the workflow pallet nor are the recognized once embedded in a flow already.
Perhaps something is missing from the latest release ?
from node-red-contrib-home-assistant.
I've installed node-red today and have the same issue. After installing node-red I installed node-red-contrib-home-assistant and after starting node-red I got the following output;
3 Jan 17:11:51 - [info] Node.js version: v4.7.2
3 Jan 17:11:51 - [info] Linux 4.10.0-42-generic x64 LE
3 Jan 17:11:51 - [info] Loading palette nodes
3 Jan 17:11:52 - [warn] ------------------------------------------------------
3 Jan 17:11:52 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
3 Jan 17:11:52 - [warn] [api-call-service] SyntaxError: Unexpected token = (line:3)
3 Jan 17:11:52 - [warn] [api-current-state] SyntaxError: Unexpected token {
3 Jan 17:11:52 - [warn] [api-get-history] SyntaxError: Unexpected token = (line:2)
3 Jan 17:11:52 - [warn] [api-render-template] SyntaxError: Unexpected token = (line:2)
3 Jan 17:11:52 - [warn] [server] SyntaxError: Unexpected token =
3 Jan 17:11:52 - [warn] [server-events] SyntaxError: Unexpected token = (line:2)
3 Jan 17:11:52 - [warn] [server-state-changed] SyntaxError: Unexpected token {
3 Jan 17:11:52 - [warn] ------------------------------------------------------
3 Jan 17:11:52 - [info] Settings file : /home/node-red/.node-red/settings.js
3 Jan 17:11:52 - [info] User directory : /home/node-red/.node-red
3 Jan 17:11:52 - [info] Flows file : /home/node-red/.node-red/flows_HASS01.json
3 Jan 17:11:52 - [info] Creating new flow file
3 Jan 17:11:52 - [info] Starting flows
3 Jan 17:11:52 - [info] Started flows
3 Jan 17:11:52 - [info] Server now running at http://127.0.0.1:1880/
When I insert a Home Assistant node in the flow an configure the server I get an error in the webinterface Cannot GET /homeassistant/entities
.
In node-red I see:
3 Jan 17:13:46 - [info] Installed module: node-red-contrib-home-assistant
3 Jan 17:13:46 - [info] Added node types:
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:api-call-service : SyntaxError: Unexpected token = (line:3)
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:api-current-state : SyntaxError: Unexpected token {
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:api-get-history : SyntaxError: Unexpected token = (line:2)
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:api-render-template : SyntaxError: Unexpected token = (line:2)
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:server : SyntaxError: Unexpected token =
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:server-events : SyntaxError: Unexpected token = (line:2)
3 Jan 17:13:46 - [info] - node-red-contrib-home-assistant:server-state-changed : SyntaxError: Unexpected token {
And after trying to deploy the flow;
3 Jan 17:15:39 - [info] Stopped flows
3 Jan 17:15:39 - [info] Waiting for missing types to be registered:
3 Jan 17:15:39 - [info] - server
3 Jan 17:15:39 - [info] - server-state-changed
from node-red-contrib-home-assistant.
I migrated away from this addon to:
*) node-red-contrib-home-assistant-ws
no problems ever since.
from node-red-contrib-home-assistant.
I still can't reproduce this however I did release 0.2.1 today, only an NPE fix really however there is an automated dev/test environment that may prove useful here. Check the README.md
on master
if you're interested in giving it a go, details at the bottom. You'll need Docker and Docker Compose installed but after that should be a 1 command spin up of HA/Node Red all configured and working OOTB. If you can find steps to reproduce in that environment let me know and I'll troubleshoot. Going to close this for now, feel free to reference in a new issue with repro steps in the dev environment however and I'll check it out asap.
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.