Sensor nodes identify themself to HA by a combination of the server-config node id and the node id of the sensor node. So when that changes in NR Home Assistant thinks it’s a brand new sensor.
A possible solution is to go into the entity registry and delete the original sensor entity_id then rename the entity_id of the new sensor.
Thanks but that is unfortunately not the problem. I’ve tried and it always returns false, furthermore, the configuration node is by default set-up like this:
Drop a debug right before the current state node. Does it contain a msg.payload.entity_id? If so it’s overwriting the current state nodes entity id and is actually looking up that entity’s state.
Check the Block Input Overrides box in the current state node.
Edit:
I can pretty much say that’s your issue based off the screenshot of the debug window.
But there is a problem with API node, which is unable to connect to Hass.io.
It show me this log:
5 Jan 23:12:27 - [info] [server:http://hassio/homeassistant] WebSocket Connected to http://hassio/homeassistant
5 Jan 23:12:35 - [error] [ha-api:3b52fbe5.c96594] Error Message: Request failed with status code 404
When I set Path (in API node) to /api/states/msg.payload and correct function node as you describe it works ok.
It create in Hass.io new entity msg.payload.
But when I want to rename it (i.e. on onewire2ha_temperature_livingroom) it doesnt work
I simply change the Path to /api/states/onewire2ha_temperature_livingroom…
I’ve been running an old version and recently tried upadating to the most current. I’m running in Docker and ran the following commands to updated within the docker
node-red@07eccede3280:/data$ npm install node-red-contrib-home-assistant-websocket
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm http fetch GET 304 https://registry.npmjs.org/node-red-contrib-home-assistant-websocket 769ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/axios 155ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/debug 309ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ws 326ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-buffer 119ms (from cache)
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm info lifecycle [email protected]~postuninstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN [email protected] requires a peer of moment@>= 2 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
+ [email protected]
updated 1 package in 13.204s
npm info ok
Unfortunately this has caused the websocket to stop working. Is there something new that needs to be installed which I seem to be missing?
Okay, so I upgraded to the latest ARM variant of Node-Red, but I’m not receiving the following errors upon boot.
Welcome to Node-RED
===================
11 Jan 08:58:15 - [info] Node-RED version: v1.0.3
11 Jan 08:58:15 - [info] Node.js version: v10.17.0
11 Jan 08:58:15 - [info] Linux 4.19.66-v7+ arm LE
11 Jan 08:58:16 - [info] Loading palette nodes
11 Jan 08:58:36 - [warn] ------------------------------------------------------
11 Jan 08:58:36 - [warn] [node-red-node-serialport/serialport] Error: The module '/data/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
11 Jan 08:58:36 - [warn] [node-red-contrib-home-assistant-websocket/server] Error: Cannot find module 'home-assistant-js-websocket'
11 Jan 08:58:36 - [warn] ------------------------------------------------------
11 Jan 08:58:36 - [warn] Missing node modules:
11 Jan 08:58:36 - [warn] - node-red-node-email (1.6.3): e-mail, e-mail in
11 Jan 08:58:36 - [warn] - node-red-node-feedparser (0.1.14): feedparse
11 Jan 08:58:36 - [warn] - node-red-node-twitter (1.1.5): twitter-credentials, twitter in, twitter out
11 Jan 08:58:36 - [warn] - node-red-node-base64 (0.1.3): base64
11 Jan 08:58:36 - [warn] - node-red-node-msgpack (1.1.3): msgpack
11 Jan 08:58:36 - [warn] - node-red-node-suncalc (0.0.11): sunrise
11 Jan 08:58:36 - [warn] - node-red-node-sentiment (0.1.4): sentiment
11 Jan 08:58:36 - [info] Removing modules from config
11 Jan 08:58:36 - [info] Settings file : /data/settings.js
11 Jan 08:58:36 - [info] Context store : 'default' [module=memory]
11 Jan 08:58:36 - [info] User directory : /data
11 Jan 08:58:36 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jan 08:58:36 - [info] Flows file : /data/flows_home_assist.json
11 Jan 08:58:36 - [info] Server now running at http://127.0.0.1:1880/
11 Jan 08:58:36 - [warn]
Is there something else that I need to install that’s now missing?
I’ve tried adding the custom components, but for some reason the integration is not showing from the drop-down list. I’m guessing this is where I’m having issues?
From the logs it appears that it is loading, but it’s still not present on the integrations page.
2020-01-11 10:02:44 INFO (SyncWorker_3) [homeassistant.loader] Loaded nodered from custom_components.nodered
2020-01-11 10:03:26 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for nodered which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
Okay, well after several restarts, and trying to copy everything over it seems as though I’m now able to get the Integrations to show, but unfortunately node-red is still giving me the following errors:
11 Jan 22:23:37 - [info] Waiting for missing types to be registered:
11 Jan 22:23:37 - [info] - server
11 Jan 22:25:47 - [info] Stopping modified nodes
11 Jan 22:25:47 - [info] Stopped modified nodes
11 Jan 22:25:47 - [info] Waiting for missing types to be registered:
11 Jan 22:25:47 - [info] - server
11 Jan 22:26:22 - [info] Stopping modified nodes
11 Jan 22:26:22 - [info] Stopped modified nodes
11 Jan 22:26:22 - [info] Waiting for missing types to be registered:
11 Jan 22:26:22 - [info] - server
11 Jan 22:26:41 - [info] Stopping modified nodes
11 Jan 22:26:41 - [info] Stopped modified nodes
11 Jan 22:26:41 - [info] Waiting for missing types to be registered:
11 Jan 22:26:41 - [info] - server
Is there a step that I’m missing to get the - server registered?