Home Assistant Community Add-on: Node-RED

i am having the same issue

I have the same issue. After install HA and nodered, when use node serial, nodered bad gateway. I use RFLink…
How downgrade version of addon nodered?

in case anyone needs to add custom python modules and persist them after add-on updates :

Add-on configuration:

init_commands:
  - /config/node-red/init-air.sh

init-air.sh

# Philips Air Purifier

python3 -m ensurepip --default-pip
python3 -m pip install -U pip
python3 -m pip install py-air-control
python3 -m pip install -U git+https://github.com/rgerganov/CoAPthon3

Hi @frenck and Home Assistant Community,
Glad to see awesome Node-RED add-on!

This is Elaine from Seeed Studio(an open-source AIoT hardware platform). Recently we are also developing a No-code Edge AI Vision Tool based on Node-RED. Please check out our project GitHub - Seeed-Studio/node-red-contrib-ml: Get started with AI vision at the edge with no coding experience at all!

Here is a demo video of deploying warehouse security IP cameras with people detection.

With just a few simple commands, the environment can be downloaded and deployed, and the process of monitoring, identifying, and outputting results from a live screen can’t be simpler than three blocks.

Combining home assistant, hope we can bring more AIOT possibilities!
We would like to also invite developers to have a try on our no-code edge AI tool and join our project development. Hope to align with community experts for co-delivering AI + IoT at the Edge!

Let us know if you find it interesting! Please contact [email protected] or DM me(twitter@iamelainewu) if you need more information!

1 Like

Good afternoon everyone when updating node-red to the latest version I found this error and I’m not able to start can someone help me?

Follow the error

The node-red add-on need particular system and npm packages and init commands to let the so useful node-red-contrib-chatbot install and work.

Please be aware of the trick. I let you appreciate if it is a case to improve the add-on or not.

Sorry for the beginner question, but the debug log didnt help. I just want to trigger a light to switch on on specific time but it always says “invalid property”


s

That is not going to work.
Property is state or an attribute.

So if property is state then the node will trigger on any state change of switch.hangelampe.

Ill advice you to start a new thread in the node red forum with a more clear description of what you want it to do.

1 Like

Maybe I’m missing something but how do I create a dimmer without looptimer (removed in the new version of the addon)? the way I used to do it, is to loop brightness change message until button release, every 500 ms, which worked pretty well with looptimer. I know I can still add it, but if noone used it… is there a better way?

Do you get a release event from the remote?

The way I do it is use the message hold to enter a loop that just decrease the brightness for each iteration and then I have a switch node as a condition to see if a flow variable is true.
This flow variable is set to true from the release event, delay, then back to false.

I’m currently using my phone so I can’t export the sequence.

I found some exports of such dim loops here on the forum.

This is one of the threads where I posted an image of the sequence.

And another

Yeah, my switch sends one message on hold event and one on release. So I just loop the hold message until a release message is received. Thanks for the examples, will check it out later after I get off work. Still find it strange looptimer was not used more…

Here is an export:

Keep in mind this changes the color temperature.

[{"id":"32b28db994678e72","type":"api-call-service","z":"a787a77.9c16458","name":"Köket off","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.kokslampa"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":1160,"wires":[[]]},{"id":"d2fcd6e1a6abc0ec","type":"api-call-service","z":"a787a77.9c16458","name":"Köket on","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.kokslampa"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":1000,"wires":[[]]},{"id":"e3cccd4158d914d9","type":"api-call-service","z":"a787a77.9c16458","name":"Hallen on","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.hallen"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":940,"wires":[[]]},{"id":"07cea14578610314","type":"ha-device","z":"a787a77.9c16458","name":"Click down","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_short_press","subtype":"turn_off"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":1140,"wires":[["0f62da852a7ff1ca"]]},{"id":"b31db815b45e4574","type":"api-call-service","z":"a787a77.9c16458","name":"Hallen off","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.hallen"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":1100,"wires":[[]]},{"id":"3ebb7b1e28e1b0c4","type":"ha-device","z":"a787a77.9c16458","name":"Click up","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_short_press","subtype":"turn_on"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":980,"wires":[["369f09d5301f8e12"]]},{"id":"7c6c3b834945bbd1","type":"api-call-service","z":"a787a77.9c16458","name":"","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.kokslampa"],"data":"{\t    \"color_temp\": msg.data.attributes.color_temp+15\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":1500,"wires":[["56aef9bbc63db595"]]},{"id":"04413f16f4097883","type":"api-current-state","z":"a787a77.9c16458","name":"","server":"4bbca37b.1700ec","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kokslampa","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":710,"y":1500,"wires":[["7c6c3b834945bbd1"]]},{"id":"e34e4e76bcf78caa","type":"debug","z":"a787a77.9c16458","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":1400,"wires":[]},{"id":"dfd1e4aafc64495e","type":"api-call-service","z":"a787a77.9c16458","name":"","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.kokslampa"],"data":"{\t    \"color_temp\": msg.data.attributes.color_temp-15\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":1340,"wires":[["42ccfe1f89f9211a"]]},{"id":"3ec4b50588ff519c","type":"api-current-state","z":"a787a77.9c16458","name":"","server":"4bbca37b.1700ec","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kokslampa","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":710,"y":1340,"wires":[["dfd1e4aafc64495e"]]},{"id":"42ccfe1f89f9211a","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1150,"y":1340,"wires":[["3f6b726c41247c6f"]]},{"id":"81423ebd234c4b9d","type":"change","z":"a787a77.9c16458","name":"","rules":[{"t":"set","p":"hold_down","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":1340,"wires":[["3ec4b50588ff519c"]]},{"id":"3f6b726c41247c6f","type":"switch","z":"a787a77.9c16458","name":"","property":"hold_down","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":650,"y":1260,"wires":[["3ec4b50588ff519c"]]},{"id":"56aef9bbc63db595","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1150,"y":1500,"wires":[["45dad87fa3ac107e"]]},{"id":"45dad87fa3ac107e","type":"switch","z":"a787a77.9c16458","name":"","property":"hold_up","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":650,"y":1420,"wires":[["04413f16f4097883"]]},{"id":"a390899f6dcda103","type":"change","z":"a787a77.9c16458","name":"","rules":[{"t":"set","p":"hold_down","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":1280,"wires":[[]]},{"id":"5bc0c5760fc9fab5","type":"change","z":"a787a77.9c16458","name":"","rules":[{"t":"set","p":"hold_up","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1440,"wires":[[]]},{"id":"b595e505de63eafd","type":"change","z":"a787a77.9c16458","name":"","rules":[{"t":"set","p":"hold_up","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1500,"wires":[["04413f16f4097883"]]},{"id":"e0aad0a1bd56cfa2","type":"inject","z":"a787a77.9c16458","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":1560,"wires":[[]]},{"id":"3766cbecf2bb2202","type":"comment","z":"a787a77.9c16458","name":"Hallen","info":"","x":230,"y":880,"wires":[]},{"id":"737c153902bb4c13","type":"ha-device","z":"a787a77.9c16458","name":"Hold down","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_long_press","subtype":"dim_down"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":1340,"wires":[["81423ebd234c4b9d"]]},{"id":"e5d94e2f2ba9fd6e","type":"ha-device","z":"a787a77.9c16458","name":"Hold down release","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_long_release","subtype":"dim_down"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1280,"wires":[["a390899f6dcda103"]]},{"id":"303a43314799ef69","type":"ha-device","z":"a787a77.9c16458","name":"Hold up","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_long_press","subtype":"dim_up"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":1500,"wires":[["b595e505de63eafd"]]},{"id":"fcfe8a36dc73be30","type":"ha-device","z":"a787a77.9c16458","name":"Hold up release","server":"4bbca37b.1700ec","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"770b0eca92df31064acad1ab9a76ec51","event":{"device_id":"770b0eca92df31064acad1ab9a76ec51","domain":"zha","platform":"device","type":"remote_button_long_release","subtype":"dim_up"},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1440,"wires":[["5bc0c5760fc9fab5"]]},{"id":"51720d8a61266e89","type":"debug","z":"a787a77.9c16458","name":"output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":710,"y":1560,"wires":[]},{"id":"369f09d5301f8e12","type":"function","z":"a787a77.9c16458","name":"Count clicks","func":"var count = context.get(\"count\") || 0;\n\nif(msg.count === count && count !== 0){\n    context.set(\"count\",0);\n    if(msg.count == 1){\n        return [null,msg];\n    }else if(msg.count == 2){\n        return [null,null,msg];\n    }\n}\n\nif(count < 3){\n     if(msg.delay === undefined){\n        count++\n        context.set(\"count\",count);\n     }\n     msg.delay = true;\n     msg.count = count;\n     return [msg,null];\n}\n\n","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":980,"wires":[["ae82c7370bb69a8d"],["e3cccd4158d914d9"],["d2fcd6e1a6abc0ec"]]},{"id":"ae82c7370bb69a8d","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":390,"y":920,"wires":[["369f09d5301f8e12"]]},{"id":"0f62da852a7ff1ca","type":"function","z":"a787a77.9c16458","name":"Count clicks","func":"var count = context.get(\"count\") || 0;\n\nif(msg.count === count && count !== 0){\n    context.set(\"count\",0);\n    if(msg.count == 1){\n        return [null,msg];\n    }else if(msg.count == 2){\n        return [null,null,msg];\n    }\n}\n\nif(count < 3){\n     if(msg.delay === undefined){\n        count++\n        context.set(\"count\",count);\n     }\n     msg.delay = true;\n     msg.count = count;\n     return [msg,null];\n}\n\n","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":1140,"wires":[["8c039729a4805df5"],["b31db815b45e4574"],["32b28db994678e72"]]},{"id":"8c039729a4805df5","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":390,"y":1080,"wires":[["0f62da852a7ff1ca"]]},{"id":"4bbca37b.1700ec","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

I assume the device nodes will be empty when you import it so here you can see what the nodes should be.

1 Like

Thanks, man I imported it, will try it out. Mine looks like this, for on,off,dim (zigbee IKEA E1743 switch with whatever bulb):


I kinda look like the same simplicity in the end. It has to be possible otherwise why would they remove looptimer… :slight_smile:

That is the same remote that sequence is made for, I just have added a double click on it.

Hi Can you please add the Stoptimer node again, i use it in many flows and it stop me from update to an newere version of node-red :slight_smile:

Template field has disappeared from render template node (see picture)

The field was always there up to version 12.0.2. It is gone in version 13

the existing logic still works but the node can no longer be modified or newly introduced (actually it can be dragged in but there is no way to input a template)

Strange behavior in Safari since updating to 13.0.0. I get the following error in the browser console whereas Chrome is running just fine without any issue. It gets stuck on a grey screen:

Tried to clear the cache as well, no luck…

The add-on log also does not show any hint. Anyone else having those issues with Safari?

[Error] SyntaxError: Unexpected token ';'. Expected an opening '(' before a method's parameter list.
	(anonyme Funktion) (editor.js:2)
[Error] ReferenceError: Can't find variable: monaco
	init (red.min.js:18:620460)
	init (red.min.js:18:565529)
	init (red.min.js:18:529868)
	(anonyme Funktion) (red.min.js:16:20287)
	success (red.min.js:16:25343)
	c (vendor.js:2:28300)
	fireWith (vendor.js:2:29041)
	l (vendor.js:2:79812)
	(anonyme Funktion) (vendor.js:2:82256)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (purify.min.js.map, line 0)

EDIT:
I found a solution to at least let the UI start by reverting the editor back to ACE, but most of the flows are displayed corrupted, nodes from other flows are shown, connections disappear etc… No idea what I can do to fix this :slight_smile:

editorTheme: {
        codeEditor: {
        lib: "ace",
    },
  },

I’m running latest HA and I just installed Node-Red. First after installation the addon configuration tab said “add-on doesn’t expose configuration”. After some time with restarts etc (10 minutes perhaps, each time add-on just silently stopping and nothing obvious in the logs I could find) then configuration did show up and I could set the credentials. Then I ran into problems that SSL was enabled by default, but no self-signed certificate was created.

I don’t know if it’s always been this way, this was my first install of Node-RED, but I found this to be a problematic add-on install and just wanted to give feedback, if perhaps something has changed in the latest HA version that might have caused this extra struggle.

I recently updated my docker-based Node Red to 3.0.X, and can no longer connect to Home Assistant with the “use add on” box checked. My workaround was to use the key-based connection and that worked fine until overnight it stopped connecting. I’m not sure if NR updated, but I had also updated HA at some point yesterday. On the nodered side, I get an endless string of “Connecting to http://my.hsserver.com:8123” messages, and on the HA side I get:

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140570535126080] Error handling message: Unauthorized (unauthorized)

This was all working well for at least a year, and I’m not sure what caused the breaking change. Anyone experience this or have any ideas? I’ve done extensive searching to no avail.

Thanks!

So I’ve tried downgrading to NR 2.0.2 to no avail, and I’m still getting the authentication messages in both NR and HA which leads me to believe my authentication credentials were somehow corrupted. Any idea how I can reset/rebuild theses credentials? I’ve tried reboots, reinstalls of the NR integration, and just about everything I can think of and it’s very frustrating since all of my automation is in NR.