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
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”
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.
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.
Thanks, man I imported it, will try it out. Mine looks like this, for on,off,dim (zigbee IKEA E1743 switch with whatever bulb):
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
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
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.
Not sure if I should open a ticket (which I’m happy to do just didn’t know if this is a Node-Red issue or a HA Node-Red issue) but my Node-Red is crashing. Below is all i was able to get from logs.
11 Aug 07:10:14 - [info] [server:Home Assistant] Connection closed to http://supervisor/core
11 Aug 07:11:00 - [red] Uncaught Exception:
11 Aug 07:11:00 - [error] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".
[07:11:03] WARNING: Node-RED crashed, halting add-on
[07:11:03] INFO: Node-RED stoped, restarting...
s6-rc: info: service legacy-services: stopping
[07:11:03] INFO: Node-RED stoped, restarting...
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
[07:11:04] INFO: nginx stoped, restarting...
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Yo Community
I’ve been trying to get this working for a number of weeks with an hour or two now and again as I have other commitments.
Hardware
I have a pi3 v1.2
Attached to this is a SequentMicrosystems 8 port daughter card because I want to monitor an alarm system, This has 8 ports which can take a 12v input and show a state of the input. I’m using 5 of them.
Software
HA core 2022.7.7
HassOS I2C Configurator from @adamoutler (big shout out to Adam) and have devices to drive i2c
crw------- 1 root root 89, 0 Mar 11 07:33 /dev/i2c-0
crw------- 1 root root 89, 1 Mar 11 07:33 /dev/i2c-1
crw------- 1 root root 89, 10 Mar 11 07:33 /dev/i2c-10
crw------- 1 root root 89, 11 Mar 11 07:33 /dev/i2c-11
Node-red add-on + config - I then added in a number of rpm modules to get the i2c working + the modules for the sequent card:
- i2c-bus
- node-red-contrib-i2c --omit=optional
- node-red-contrib-sm-8inputs --verbose
ssl: false
system_packages:
- linux-headers
- python3
- npm
- make
- g++
This all works (it takes an age to start up but that isn’t an issue)
BUT
If I try to use the i2c card, I get
"Error: EPERM: operation not permitted, open '/dev/i2c-1'"
I read a number of (now closed) threads involving @frenck about security issues with the HA and only making the i2c devices read only, but Id like to be able to override it.
I new to docker but has worked with unix for decades. If I look at the HA os from the console (keyboard+screen or use the @adamoutler HassOS SSH port 22222 Configurator plugin), I could theoretically change the perms of the devices to 666, but I think there is a config.yaml change needed for the node-red container to allow me to use the devices etc etc. It feels too hacky for stability.
Is there a way to overcome the being able to write to the i2c device driver and get this to work?
Many Thanks
L
It depends on the setup. If using AppArmor, then you’ll need to specify the rules in the apparmor file. If using an HA Addon, then you’ll need to specify the devices to which you need access. I’m not sure about the setup you’re running this on, but there’s certainly a way to do it.
After running the i2c addon, the main /dev folder has access to the i2c hardware. Now you need to get that hardware into the app, which means you need it to be available and accessible in the container.
Thanks @adamoutler.
I’m using an HA Add-on
I forgot to include it with he original post
Add-on: Node-RED
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 13.3.0
There is an update available for this add-on!
Latest add-on version: 13.3.1
Please consider upgrading as soon as possible.
System: Home Assistant OS 8.4 (aarch64 / raspberrypi3-64)
Home Assistant Core: 2022.7.7
Home Assistant Supervisor: 2022.08.3
I tried adding
device:
- /dev/ic2-1
but the add-on wouldn’t start