Home Assistant Community Add-on: Node-RED

Anyone run across this?

I rolled back to a snapshot today, a snapshot I made this morning

After the rollback, my Node-RED flows are from a week ago, absolutely positively not the current state of NR when I made the Home Assistant snapshot

Not sure how to recover all the work I did on flows this week

I have just installe the node-red with the supervisior in HassOS:

Add-on version: 7.0.0
 You are running the latest version of this add-on.
 System: HassOS 4.12  (armv7 / raspberrypi3)
 Home Assistant Core: 0.114.1
 Home Assistant Supervisor: 234

However, when I try my first flow with an entity node, I get:

 [error] [ha-entity:test] Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.

I did set a credential_secret and I did set ssl and require_ssl to false.

Thanks in advance to any help :slight_smile:

this is the full log after a restart of the add-on:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 7.0.0
 You are running the latest version of this add-on.
 System: HassOS 4.12  (armv7 / raspberrypi3)
 Home Assistant Core: 0.114.1
 Home Assistant Supervisor: 234
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
patching file nodes/ui_base.html
Hunk #1 succeeded at 1177 (offset 646 lines).
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 1.51s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing... 
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:33:25] INFO: Starting Node-RED...
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
15 Aug 17:33:30 - [info] 
Welcome to Node-RED
===================
15 Aug 17:33:30 - [info] Node-RED version: v1.1.0
15 Aug 17:33:30 - [info] Node.js  version: v12.17.0
15 Aug 17:33:30 - [info] Linux 4.19.127-v7 arm LE
15 Aug 17:33:31 - [info] Loading palette nodes
15 Aug 17:33:43 - [info] Dashboard version 2.22.1 started at /endpoint/ui
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
15 Aug 17:33:45 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
15 Aug 17:33:45 - [info] Settings file  : /etc/node-red/config.js
15 Aug 17:33:45 - [info] Context store  : 'default' [module=memory]
15 Aug 17:33:45 - [info] User directory : /config/node-red/
15 Aug 17:33:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Aug 17:33:45 - [info] Flows file     : /config/node-red/flows.json
15 Aug 17:33:45 - [info] Server now running at http://127.0.0.1:46836/
15 Aug 17:33:45 - [info] Starting flows
15 Aug 17:33:45 - [info] Started flows
[17:33:45] INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
15 Aug 17:33:50 - [info] [server:Home Assistant] WebSocket Connecting http://supervisor/core
15 Aug 17:33:50 - [info] [server:Home Assistant] WebSocket Connected to http://supervisor/core
15 Aug 17:34:15 - [error] [ha-entity:test] Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.
15 Aug 17:36:15 - [error] [ha-entity:test] Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.
15 Aug 17:38:15 - [error] [ha-entity:test] Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.
15 Aug 17:40:15 - [error] [ha-entity:test] Node-RED custom integration needs to be installed in Home Assistant for this node to function correctly.

Did you configure server node?

ha

Thanks @Vlad, but I just hadn’t realised that I should install both the add-on in the supervisor and the integration in HACS. After I did that, it works. Thanks to @Paul_sinclair at the discord channel (not that I would advise anybody to visit discord with questions about node red).

Is it possible to use persistent flow values. So restore the value of a flow variable after restart?
like discussed here: link

Yes, it works right now

I use Hass.io with this add-on. After reboot, i keep getting lots of these in my log:

2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:27 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:32:30 WARNING (MainThread) [homeassistant.setup] Setup of webostv is taking over 10 seconds.
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1808155504] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:33:54 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 373, in consumer_handler
    while not closeout_task.done():
UnboundLocalError: local variable 'closeout_task' referenced before assignment
2020-08-23 22:37:32 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1769766144] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:37:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1769766144] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:37:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1769766144] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:37:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1769766144] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2020-08-23 22:37:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1769766144] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 265, in handle_render_template
    state_listener()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 253, in state_listener
    msg["id"], {"result": template.async_render(variables)}
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 230, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 3, in top-level template code
TypeError: '<' not supported between instances of 'NoneType' and 'int'

I’m pretty sure Node-RED is causing it, but not 100%. This is my configuration:

credential_secret: XsSHXb6Xvv8DJ5hF #I've changed this one, but it's similar 
dark_mode: false
http_node:
  username: secret nodered_username
  password: secret nodered_password
http_static:
  username: secret nodered_username
  password: secret nodered_password
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: true
system_packages: []
npm_packages: []
init_commands: []

From Googleing, i think maybe the solution could be a long lived token? But i can’t figure out how to apply that. Or am I on the wrong track?

I am having issues with NodeRed where it will use UTC timezones for things like sunrises and sunsets.

I added:

process.env.TZ = "America/Los_Angeles";

to my /config/node-red/settings.js on the line above:
module.exports = {

but still it shows incorrect times for sunset:

I am running Node Red via the Addon in Home Assistant, hosted on HAAS.

this works perfect
I had to format it like this:
curl -d '{"devicetype": "Node-RED"}' -H '"Content-Type: application/json"' -X POST http://192.168.2.8:40850/api

After banging my head against a wall for a good few hours I stumbled upon your advice, it worked perfectly, thanks!

ssl in, grab a key, pop it into the box and stop smashing the magick button!

Error connecting to dbus: Error: connect ENOENT /var/run/dbus/system_bus_socket

Can anyone help me with this error
Operating System Ubuntu 18.04.5 LTS
Docker version 19.03.13

after last update Node red stopped.
the error is “1 out of 1 hunk FAILED - saving rejects to file nodes / ui_base.html.rej”. files that are non-existent in my configuration

2 Likes

Same problem here. Had to restore last node red backup.

yes also for me

They already released version 7.2.10 which fixes the problem :slight_smile: .

It works fine now

I’m facing the same issue after installing node-red-contrib-generic-ble:

20 Nov 10:12:27 - [red] Uncaught Exception:
20 Nov 10:12:27 - Error: connect ENOENT /var/run/dbus/system_bus_socket
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the addon-node-red@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Can we access dbus via node-red? I know that addons can be configured to passthrough dbus from the host:

‘host_dbus bool’ - Default false . Map the host D-Bus service into the add-on.

I am having trouble getting a couple nodes to install from the palette. Currently running the Node-RED add-on 7.2.10 on Hass.io 0.117.6 on a Raspberry Pi 3b. I keep getting the below error:

[15:45:22] INFO: Starting installation of custom NPM/Node-RED packages...
> [email protected] install /opt/node_modules/bufferutil
> node-gyp-build
make: Entering directory '/opt/node_modules/bufferutil/build'
  CC(target) Release/obj.target/bufferutil/src/bufferutil.o
../src/bufferutil.c:2:10: fatal error: assert.h: No such file or directory
    2 | #include <assert.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [bufferutil.target.mk:105: Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory '/opt/node_modules/bufferutil/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

I’ve added the below system packages to my Node-RED addon’s config:

system_packages:
  - make
  - gcc

Is this a npm dependency issue? I know bufferutil is part of the npm addon “websocket” but if I add that to npm_packages, the Node-RED addon won’t boot.
Or could it be that the custom node won’t run on ARM based systems?

Any ideas? One of the nodes is https://www.npmjs.com/package/node-red-contrib-sony-audio in case anyone else is willing to try.

Tap the hamburger (3 lines stacked on top of each other) at top right with phone in landscape mode , then tap and hold view and slide your finger (don’t lift from screen) to the option that you want. Be sure to tap and hold or it will disappear. Also , i am able to slide in from the right to open the right sidebar but left will require the hamburger. And @TensE is right, while node red is very navigable from a large screen phone , the safest way is a pc. Most options are in a window when you tap and hold. Good luck