#node-red-archived

1 messages ยท Page 108 of 1

faint ravine
tidal sundial
#

In my flow, that's why I have the events:state node watching the bathroom lights. If anything turns on the lights, that portion of the flow will run. So, Alexa, HA UI, even the lights turning on via the switch and reconnecting to HA.

low rock
#

Seems like I remember seeing someone post a flow that would increment/decrement a number and pass that as a brightness setting over a certain period of time to the bulbs. @golden breach

tidal sundial
low rock
tidal sundial
#

I also have a function that I wrote that watches the alarm on my phone and will ramp up the brightness of my bedside lamp 30 minutes prior to the alarm. Part of the code posted. https://pastebin.com/dgeKh2aT (Still a work-in-progress but it is functional.)

tidal sundial
golden breach
#

thanks for the ideas!

low rock
tribal vortex
tribal vortex
#

Doing some more digging, I found that apparently $entities only work in the HA nodes so it looks like this will not work. Is there any other way to access the content of a HA entity in a 'change' node in node red?

faint ravine
lean spear
#

Hello, I set this sensor, but it gets unavailable on HA

#

what am I doing wrong?

tribal vortex
# faint ravine on the left you paste your data structure. on the right you paste your expressio...

Ahh, that actually makes sense now. I have abandoned my plan on how to compare two values and will go with the 'combining both values in a single message' concept that I previously thought was quite convoluted. I still think that it is odd that there isn't an easier way to compare two numbers against each other. I am comparing the maximum temperature of a sensor over the last 24 hrs against a setpoint (fixed value in a helper entity).

golden axle
#

i compare numbers using .msg

#

like "is basement warmer than living room, if so turn on circulating fan"

#

@tribal vortex

faint ravine
#

BTW, it helps to keep in mind that arthmetic in JS is done via float, so these crazy "bugs" are quite common. Compare to the one with $round()

upper sonnet
#

i made a binary sensory for workdays and want to have an automation to run if that sensor is true ie if weekdays lower my bed in the morning after x time

#

anyone know how i can do that?

tribal vortex
# golden axle

Thanks @golden axle, that is essentially the same thing I am doing and the way you are doing it was the way I was trying to do it but for some reason or other I could not do what you are doing. I will give it another shot with your method as an example because it makes way more sense then using the join method.

golden axle
#

cheers, good luck

faint ravine
tidal sundial
lean spear
#

I think my issue was that I was sending timestamp in seconds and it expect milliseconds.

lean spear
tidal sundial
# lean spear I just need to timestamp x1000 and ir worked

You should be able to send whatever you want. When I was testing the node, it worked fine for me with various data but when I set the device class to timestamp (like in your screenshot) it became unavailable. And, technically, the default device class is sensor so leaving it blank would accomplish the same thing.

upper sonnet
#

Hi i am still learning Node red and I want to set a condition where if motion is detected upstairs after a certain hour to flash a light in my living room.

#

The current motion works but how do i add a conditional time?

faint ravine
upper sonnet
faint ravine
upper sonnet
#

yeah im still lost lol

#

man this is way harder then i thought it would be

faint ravine
# upper sonnet yeah im still lost lol
  1. install chronos
  2. set up your location (for proper TZ)
  3. insert time switch node
  4. only use one interval, between required times

outside of the times specified the node won't output anything.

upper sonnet
#

so would i put it inbetween my current routine or at the end?

faint ravine
#

just prior to the action node. e.g., motion -> check time -> send signal to your light.

upper sonnet
#

but if i want that to run but ALSO trigger a light to flash downstairs whee would i put this?

faint ravine
#

ah, you just want a signal, not to interfere with the on/off processing?

#

then just add another flow, 1 sec

upper sonnet
#

so basically if my kid goes to sleep i want to flash the light downstairs and also turn the lights on upstairs.

#

sorry this is simple i know but trying to wrap my head around it

#

if she gets up sorry if she wakes up lol

faint ravine
#

so when motion happens, two nodes are activated - your "upstairs lights on" and this new time_switch.

upper sonnet
#

ah nvm i manually added a time zone in my chronos config

#

took that out and it "looks" to be corect gonna test it.

winged plinth
#

Anyone had any issues with NR with recent HA upgrades? I've noticed that I have multiple entries in my server field has four entries, and when I type anything in the "area" field, there's no autocomplete anymore.

#

Also, the device was a string of seemingly random characters, presumably the UUID or something? Anyway, it seems to have literally just fixed itself.

#

I've cranked logging up to debug, guess I'll just wait for it to happen again.

#

After restarting, the issue is back..

cobalt dock
#

You've probably imported peoples code that had server node in them

winged plinth
#

ah, I have imported a new flow recently...

#

Alright, all cleaned up, restarted and functioning properly again...Thanks @cobalt dock

tidal sundial
#

Probably my fault if you imported some of my stuff. I forgot to run it through the scrubber before pasting.

golden breach
#

When using zha events I get multiple "on" events from my IKEA Shortcut buttons. How can I process only the first one and ignore the other events for the next x seconds?

faint ravine
tidal sundial
# faint ravine what's a "scrubber"?

It removes the configuration settings that are in my flow. If you import my flow without being scrubbed, NR will be looking for my stuff. I think it can have around even after you've made changes to accommodate your devices. Just something that needs to be cleared periodically.

golden breach
faint ravine
faint ravine
tidal sundial
fleet lintel
#

Hi all. i have this sequence that i created (with @golden axle awesome help!) to simulate presence inside the house but randomly launching a script (some audio recordings) every X minutes. i was wondering if there is a way to make it also alternate (randomly) between the 2 scripts?

golden axle
#

node-red-node-random should work

faint ravine
fleet lintel
#

thx guys

#

@faint ravine , not sure i understand the example with the $floor command?

#

and how does the 0/1 connects to the scripts

faint ravine
fleet lintel
#

got it thx so much !!

tidal sundial
#

Or... make the two scripts into one bigger, better, more powerful script... ๐Ÿ˜„

#

I went from a couple of smaller scripts (screenshot 1) to just a single script that contains everything.

faint ravine
trail bobcat
#

is there a way to reuse some of the nodes?

#

i have a node called "Away mode", which basically just returns true if we're away.. and false if we're present

#

i want to use this for several different flows

tidal sundial
# trail bobcat is there a way to reuse some of the nodes?

Take a look at the Link In/Out nodes. Basically, they create a connection without having to run an actual wire. You may also consider looking into a subflow if you're running the Away Mode flow a bunch. The concepts are basically the same between the two.

#

But... now that I re-read your question, I don't think that's what you're looking for. You should be able to "call" the Away Mode variable. I'm not sure how to do that but lemme see if I can figure it out.

faint ravine
tidal sundial
#

I think option 2 is more like what he is looking for. Probably several flows that check if he's away to allow or prevent it from flowing.

faint ravine
#

otherwise you'd need to intercept events like left/returned.

or better yet - monitor state change and get entities on every change, store variable.

desert pike
#

Hi guys. Im completely new to Node Red. Im running Home assistant from my Synology NAS, so no supervised mode. How do I then install Node Red on HACS?

solemn summit
#

Hi all, I need some guidance on a flow to control lighting when motion is detected

#

I have a room with 2 sets of lights, let's call them near and far

#

If neither set of lights is already on, I want them both to turn on for 30 seconds when motion is detected and then turn off

#

If motion is detected again within the 30 sec period, then I want the timer to start again (or extend by another 30 secs, I dunno which one is easier to implement)

#

However, if lets say the far light is already on when motion is detected, then the flow should only apply to the near light i.e. motion detection logic shouldn't be applied to any lights already on

#

I've got this as a base:

golden axle
#

install the NR companion via HACS and the NR companion integration via integrations page also

faint ravine
muted garnet
#

Could someone explain to me how to compare value form message.payload to the value from sensor?

#

If it's even possible

#

Idk, because I'm beginner

neat olive
#

The documentation for the link call node says "The flow connected to that node must end with a link out node configured in 'return' mode."

I can't find any way to configure a link out node to be in "return mode". Any idea what this is about?

#

Oh wait how did I miss that. Found it...

red fox
#

Hi may i know how do i solve fail to load node catalogue ?

tribal vortex
#

Do you have any blockers installed? Ad blocks, no script apps etc. You can also try opening your node red installation in a different browser. I used to use Chrome for that because my regular browser was too locked down.

red fox
#

And also my modbus flex node shows connected but there is no value been shown , the value should be in dec or hex

#

And im sure the modbus is working

muted garnet
crisp oak
#

just getting started in node red, is it better to have a flow with many actions or quite a few, far more simple flows? I feel like i am running into async issues.

golden axle
#

I use flows (tabs) for organization, no harm in having multiple functions there

#

eg, 1st floor lighting, 2nd floor lighting, HVAC, media center

crisp oak
#

i wrote a flow for each motion sensor/light pair and then refactored it to be a single flow for all the pairs. it still works but with weirdness when more than one is triggered while another is running

faint ravine
crisp oak
golden axle
#

flows are technically the tabs themselves, i think. ultimately it's up to you how you want to handle it. some people get a little too caught up trying to make ~~the flows ~~ an action as small as possible, in my opinion

crisp oak
#

i think i fell victim to that last bit, and made it unnecessarily complex

golden axle
#

that said, if you enjoy it, then go for it!

#

starting out though, i recommend getting your core stuff settled. there's a lot to learn here

crisp oak
golden axle
#

and you'll probably refactor again when you figure out there's a node out there that does everything for you

faint ravine
crisp oak
#

it looks so cool though. yes 100% so much to learn, its exciting

golden axle
#

agreed

#

with both of you

crisp oak
#

thanks alot ya'll, appreciate the quick help

golden axle
#

cheers, good luck

#

don't forget the sercret code of NR "node red thing you want to integrate/action you want to perform"

#

def will want to check some of this out

crisp oak
#

oh nice, that looks super helpful. thanks!

golden axle
#

for sure

trail bobcat
#

it should then go into away mode

#

i don't have device tracking at the cabin, so we do it manually instead

golden axle
#

@trail bobcat you can also use subflows to make your own nodes that are reusable

#

going back to the original question

faint ravine
leaden jay
#

Suggestion needed. I have live data of time stamps of multiple people coming online (which i fetch via http nodes).
I want to make this data visually easy to view, like how many times a day, who was online, for how long etc. I was advised Graphana & influxdb (is it right? I also heard they are pro tools ).
I am new to them but i have just successfully setup addons on HASS. Can someone help me setup basic charting first time, i am new to both of them.
Thanks in advance

trail bobcat
#

because i have several automations that should check if some appliance should turn on.. all of them should first check if we are on the cabin.. if not, then don't turn on

#

and vice versa if we are

neat olive
#

I have a trigger state that listens for binary_sensor's, then filters further by domain for motion sensors, then gets the area that sensor is in, then calls the light.turn_on service on that area

#

I've since added some more nodes in that action for more complex behavior, but that's the core logic

#

Also on the topic of your original question about organizing. I started off and still have flows for generally similar things, like a "lighting" flow, but I think @golden axle makes a good point of not getting caught up in the size of your action. I think because I have a bunch of actions per flow I tend to try to keep them smaller probably to my detriment

neat olive
#

Also on the topic of organizing things, do you guys share event/state change nodes for all actions or create a bunch of state change listeners that have unrelated actions.

For instance, I have a listener for my motion sensors to turn on lights. I also have other actions like turning on TVs/monitors when there's motion. Would you keep that all in the same action or create a bunch of different actions even though the state change node would essentially be duplicated?

crisp oak
neat olive
#

I think there's some way to paste here and it shows up as a picture? But I was just wondering at least at like a high level how yours works

#

Did you just take a picture?

crisp oak
#

aye, working on a better pic now

crisp oak
#

super rough drawing. wasn't sure how best to present the info but I tried. please ask questions, i love to learn. also, this is not working as intended in this pic as i am working on it right now

cobalt dock
compact lake
#

I have a state event node that uses this jsonata $number($entity().state) >= 5 and $number($entity().state) <= 5.15 this checks if the value is inside that range. How would I adapt it to check 2 other ranges as well (no overlap in the ranges) thx

cobalt dock
#

(...) and (...)

#

wait that's wrong

compact lake
#

so ($number($entity().state) >= 5 and $number($entity().state) <= 5.15) or ($number($entity().state) >= 11 and $number($entity().state) <= 11.15) or ($number($entity().state) >= 16 and $number($entity().state) <= 16.15) ??

cobalt dock
#

so you want to to be true if it's in any of the ranges? then yes what you pasted

compact lake
#

yes and unless I'm doing it wrong

#

what I am trying to do is this

#

I have a "runtime" sensor for the day (today)

#

I want to trigger something when it hits 5hrs, 11hrs, and 16hrs.

#

(sometimes it does not hit 5.00 and will go from 4.99 to 5.01 or 10.96 and then 11.04)

#

I don't mind if it re-triggers, I have it ignoring duplicate state, and I also have a check that comes after it that would prevent double triggers.

neat olive
neat olive
#

Oh I see, I just imported it. I feel like I should browse around more for nodes to see what's out there that might some of my actions more succinct

#

I also feel like I should be using the trigger node more, cuz I don't use it at all and I see people using it all the time

#

I use the "wait until" node for my light timeouts, but maybe I should be using trigger instead?

neat olive
#

@cobalt dock That's really slick with the light timeout using the trigger node. I think I get how it works now. There's one big problem with using it for light timeouts though. It seems like it looses state when node-red is deployed. That means my lights that are currently timing out won't until there's more activity

compact lake
#

I'm trying to iron out what I think is a wifi congestion problem. I have devices constantly (any random device will become "unavailable" a few times per day. Sometimes as many as 10. Not all at the same time. Is there a way I can use Events:all to filter for any time something becomes unavailable, and just send myself a notification? (I don't necessarily need to know which device)

#

this is what it looks like (in this case it was the most recent WAP reboot but its the same randomly)

winged plinth
#

Hey folks, I've got a function node that returns the brightness of a light into a trigger node which returns some JSON to a call-service node. How do I reference the msg data in the JSON?

#
    "service": "turn_on",
    "data": {
        "brightness": INPUT_FROM_FUNCTION
    },
    "target": {
        "entity_id": "light.front_foyer_lights"
    }
}```
winged plinth
#

nm, got it working with a template node

crisp oak
normal parrot
#

updated to HAWS 0.43.1 and all my template (data json) node -> call service node, have stopped working.

#

no error in debug.

#

its like the data json is being ignored.

#

this one actually errors out, because it thinks the data is empty.

#

was this functionality of passing in json data removed at some point?

#

the above is a flow that used to work and now does not.

normal parrot
#

also, i'm on NR 3.0.0 if that matters.

devout sage
#

Node-Red 3.0 is out

devout sage
#

apart of having to chown 1000:1000 -R the data directory, no hiccups

#

node-red-contrib-dockerode is breaking with "System Error: [undefined] undefined"

#

just a heads-up if you use it

#

seems it's related to the dropped privileges, can't access the docker socket any longer

faint ravine
desert pike
#

Hi Guys. I'm completely new to Node-Red. I just tried a basic setup which should let me read the status of my light in the debug console. The entity's shows up in Node Red from Home assistant, it even says running, but when I flick the light, nothing happens in the debug console. Any idea of what might be wrong? Thanks for the help ๐Ÿ™‚

faint ravine
desert pike
#

"hei" is just hello in Norwegian

#

While "Taklampe" is ceiling lamp

desert pike
#

And this is my npm version

#

Btw I tried running an inject node to debug, that worked. So the problem has to be between Home assistant and Node Red

compact lake
faint ravine
faint ravine
# desert pike

remove "Hei" and it should start working.

Currently it's testing the state against "Hei" and obviously it never matches.

compact lake
#

@faint ravine I'm not triggering based on time of day, I'm triggering based on a sensor value of runtime_today

#

the "conditions" are time values right around the "trigger" time. since it does not always hit "5.00" hrs

#

sometimes it skips it and hits 5.04

#

does that change your suggestion?

#

it will also never be more than 1 of the 3

faint ravine
compact lake
#

oh

#

in your example condition2 will not be tested if condition 1 is not true correct?

faint ravine
compact lake
#

ok so how would it apply to the specific logic you are suggesting it for?

#

oh you were basing it on the "and" discussion. we had clarified it is "or" that was needed. sorry for any confusion

#

now i get what you were saying

faint ravine
compact lake
#

thank you

#

i agree with that

faint ravine
#

It's a philosophical question, really. I love the visual part of "visual flow programming" and hate writing actual code. So my flows are descriptive and banal/obvious. Some people prefer to get very concise flows with lots of function nodes.

neat olive
neat olive
# crisp oak if you click show original you can zoom ๐Ÿ˜‰

Ah, it still looks like you're doing a lot of manual mapping between different things which I wanted to avoid. I guess once I get my devices all in place it doesn't matter as much, but I can just add a new motion sensor or light to an area and it just starts working

devout sage
neat olive
#

Yeah that's a great strategy too. For some reason naming schemes have always bothered me, maybe cuz I'm a developer, so I try to use metadata to do the associations (e.g. the entities area)

#

I wish there was a way to add custom attributes to entities

#

Or just better data structures as helpers in HA or something like that

leaden jay
neat olive
normal parrot
#

HAWS 0.43.1 and NR 3.0.0 doesn't seem to work.

#

call service nodes are ignoring json {data} passed to them.

#

half my flows are not working.

#

i reverted to NR 2.2.2 and it still not working, so this is clearly an issue with HAWS 0.43.1

#

my whole house is down, cuz all i did was update to 0.43.1, thanks alot.

normal parrot
#

pretty much anywhere i am using a template node to build a {data} json, then pass it to a call service node is broken. which is, like, everywhere.

fathom dove
#

i'm not having that issue with 0.43.1 and NR 3.0

#

all of my flows work just fine

unique mortar
#

I got a weird issue that I can not resolve in regards to Node-red on HA. I'm dynamically sending an input_text state to a "call-service" node but only the message field gets formatted correctly while the actionable button in notify looks weird like in this picture. Is this a bug I found or expected? This is my JSON code inside the call-service node if it helps anyone "
{
"title": "OmniPod",
"message": "{{payload.omnipod}}",
"data": {
"actions": [
{
"action": "URI",
"title": "{{payload.omnipod}}",
"uri": "{{payload.omnipod}}"
}
]
}
}
"

normal parrot
#

if you build the json inside the call service it works.

#

so now i gotta spend a whole day, cuz its gonna take a whole day, retrofitting all this.

fathom dove
#

i'm using a function node to build the json and not building it in the call service node

#

how were you building the json before?

normal parrot
#

in a template node

cobalt dock
normal parrot
#

thats not it either.

#

the call service node is ignoring the payload sent from the template node.

unique mortar
normal parrot
#

if i use a function to make the {data} it works.

#

use a template node, and it doesn't work.

crisp oak
neat olive
#

So you can just do area_id('entity_id')

boreal briar
#

I use z2m for my Philips hue lights (and a few other types) is there a way to create effects, colour loop, blinking a specific colour etc? Also is it possible to sync them in any way to Spotify (or tidal)?

winged plinth
winged plinth
#

How are people outputting time? All the code I'm seeing around Date.now() seem overly complex and I'm wondering if I've missed the memo on simple time formatting.

#

I'm currently in the process of converting my remaining YAML automations to NR and I'm trying to get the NR equivalent of:

payload_template: 'Time: {{ as_timestamp(now()) | timestamp_custom(''%H:%M:%S'') }}'

winged plinth
#

hmm...created a sensor for time...much better

normal parrot
#

moment node.

winged plinth
#

funny....when asking a web dev friend of mine about JS time formatting he mentioned he uses the moment library.

boreal briar
faint ravine
winged plinth
# boreal briar Ah thanks! Is there a way to make breathe continue indefinitely? If I use the ef...

Well, you're going to have to do a loop of some sort, that's just how it works.

Go watch this: https://www.youtube.com/watch?v=SML9yQjlD_s

Tutorial on how to recreate hue labs lighting effects in node red! Who needs the hue app any more!

Intro: 0:00
Guided Breathing: 2:11
Briefly Bright: 3:32
Workout: 5:37

Flows: https://github.com/willbob8/willsurridgetech/blob/master/HueLabs.json
Alexa Media Player: https://github.com/custom-components/alexa_media_player

As an Amazon Associa...

โ–ถ Play video
tight dagger
#

Hello,

How can i use a entity in the if state field

tight dagger
#

Ty!

true drift
#

Node-red stops responding and the only thing I can see in the logs is this entry in the log: "Received event for unknown subscription 3. Unsubscribing."

#

have googled but can't find anything related.

#

have tried uninstalling the addon and re-install

cobalt dock
#

do you run ubiquiti products?

true drift
#

yes

cobalt dock
true drift
#

looks like it.. so there's a bug that they are looking at? doesn't seem to be a fix?

true drift
#

not sure I understand the relationship with Ubiquiti

cobalt dock
#

it's just my assumption at this point. I need to find some time to look into it

true drift
#

OK no worries. Happy to test anything if it helps!

cobalt dock
true drift
#

turned logging on and will post on GH, thanks

tribal trail
#

when i try to install my pallet it tells me node red doesn't have permisions

clever plazaBOT
devout maple
#

Why are mustaches not working within certain service calls?

this for example will produce an "invalid value" error:
{ "dev_id": "auto", "location_name": "not_home", "gps": [ "{{latitude}}", "{{longitude}}"] }

Am I missing something?

devout sage
#

but if you insist on using mustache, I think the issue is that coordinates have to be floats, but you are escaping them as strings

#

so lose all the quotes

devout maple
#

@devout sage Already tried removing the quotes, but that produced a syntax error.

I was already using JOSNata, did not know variables can just be inserted without using mustaches. Thanks.

devout sage
#

oh wow that's a first. I managed to create a flow that cause nodered to go into a boot loop

#

better stay away from trying to create complex jsonatas on the state changed node, it will probably evaluate those until it dies

#

$entities("sensor.scooter_charger_energy") <= 10 or $entities("sensor.scooter_charger_energy") <= $entities("input_number.scooter_charger_cutoff")

#

the <=10 was a mistake, it will always return true if it's not charging

#

<= [1..10] would work probably?

faint ravine
compact lake
#

I have an issue, I think being caused by my WAP where devices become "unavailable" - I'd like to use nodered to watch for any device that becomes unavailable and have it notify me which device and when it happens. I have plenty of use of nodered to do this when one specific device does something, but not sure how to 1 - watch for the "unavailble" situtation 2 - remember the item and pass it to a (variable?) and then how to use that variable in my notify node. Thanks for any assistance ๐Ÿ™‚

faint ravine
# compact lake I have an issue, I think being caused by my WAP where devices become "unavailabl...

Make a global var, a hash, where the "key" is the device_id. Store last_seen (milliseconds) there, and reported (boolean), initially false.

Then periodically use JSONata to find devices that haven't been repoteded and have last_seen older than something (say, now miunus an hour). Don't forget to set the reported flag ๐Ÿ˜‰

something like:

https://pastebin.com/ypKg86E6

compact lake
#

they only go offline for 10 - 20 seconds I think that approach would never see it

faint ravine
compact lake
#

most of these devices report every 10 seconds

#

but it seems to be noticing them going unavailble in the device logs

#

im gonna try this out (just found) its based on state being 'unavailable' https://community.home-assistant.io/t/looking-for-a-unavailable-trigger-into-notification/286523/3

faint ravine
#

haha, how do you think they come up with this state? ๐Ÿ™‚

compact lake
#

I just want to watch for the state, your suggestion (I probably misunderstood it) made me think i was just going to poll for lack of reported data

#

I was hoping it was a direct trigger

faint ravine
#

if the device doesn't report, it's considered lost. I can't think of any other way ๐Ÿ™‚

compact lake
#

HA knows its 'unavailable' it's a state, not my human description of it being missing

faint ravine
#

yep. how do you think HA "knows" this?

compact lake
#

ok true but HA is watching in nanoseconds, you mentioned above checking once per hour?

faint ravine
#

it's configurable, duh ๐Ÿ™‚

compact lake
#

ok but can't i just watch for the state the way I would watch for/trigger for 'on' ? not sure why I would manually poll ?

faint ravine
#

there's no polling as such. just periodically checking the values of a global variable. something has to do it ๐Ÿ™‚ HA or yourself

neat olive
#

New version with NR 3 out!

tidal sundial
tidal sundial
#

I like this: Before & After

#

And you can connect through them

neat olive
#

I might hold off a few days in case some bugs are uncovered, or as long as I can at least haha

leaden jay
neat olive
#

I haven't yet but I've only used it 6 months or so. It's just a major version upgrade so it seemed like a good idea

leaden jay
#

โ€ผ๏ธ SOS: silly fingers deleted a flow. Even did more changes in other flows & deployed after that (so cant do CTRL+Z). But quickly saved the nodered directory flows.backup.json file. Remember the flow name too, but how do i extract it out of so many pages of json (700kB)?
Any syntax check to extract it out?

faint ravine
devout sage
#

I had one issue related to running as root, in docker so I don't do that anymore. just added the nodered user as a member of the docker group in the compose file

wary bolt
#

welp, my node red keeps crashing since the update D:

#

Ah reverted to the previous version and it's still crashing...

fervent smelt
#

I need something that sends the current payload as msg.payload and the previous one as msg.payload2. So I made this function node for it
`var buffer= context.get('buffer');
buffer.unshift(msg.payload);
msg.payload = buffer[0];
msg.payload2 = buffer[1];
buffer.length = 2;
context.set('buffer', buffer);

return msg;`

Does it seem like a good way to do it?

#

Cause I'm getting huge RAM and CPU usage and I'm not sure if it comes from the upgrade to 3.0 or if my function is not doing what I'm expecting it to

#

Nevermind, turns out diffing images with node-red-contrib-image-tools uses a ton of resources.

clever talon
#

howdy, i'm having issues where i can't edit function nodes

#

this error pops up in developer console when i try to edit.

#

i reverted to 2.2.2 from 3.0 and it is now editable

tidal sundial
#

function editor seems to be working on 3.0 for me although I notice the dark mode isn't working for it anymore.

void swift
#

Did you ever get this to work (sorry for the wake up post ๐Ÿ™‚ )

devout maple
winged plinth
#

Does anyone have a flow they're willing to share that takes the output of an IKEA remote that successfully incorporates dimming? I've got a flow that on/off work fine, dimming however "works", but it seems to jump to 255 (up held) or 0 (down held) near instantly. So alternatively, if someone could look at my flow here: https://pastebin.com/c9YEdnQm that would be very much appreciated.

faint ravine
winged plinth
#

Hmm, good to know. Unfortunately, while the dimming in the flow on Pastebin only targets two Hue bulbs, the on/off also targets two Lutron switches and my plan was to extend the dimming to all 4 lights once I sorted out the proof of concept on the Hue bulbs.

So has anyone found a good NR-based solution?

faint ravine
winged plinth
devout maple
# winged plinth Does anyone have a flow they're willing to share that takes the output of an IKE...

Mine looks like this and probably is the same basic concept, but using a different node: https://pastebin.com/axVtzC5y
Not sure if this works better/ worse than yours.

Besides that I'm not setting the light brightness directly, but increcment/ decrement an input number. Light brightness changes when the number changes

clever plazaBOT
void swift
#

Does anyone have a node red flow that adjusts blinds to the Suns azimuth?

tidal sundial
# winged plinth Does anyone have a flow they're willing to share that takes the output of an IKE...

I made a function that handles my IKEA remotes. Dimming is supported along with cycling RGB colors. Code is a bit rough around the edges (was a learning experience that has been updated as I learned new stuff) but it works well and includes comments.
https://pastebin.com/hDsd9V1k

winged rose
#

is there a way to have NR treat an unavailable result as not matching the criteria?

drowsy coyote
#

try setting if state is not unavailable in that current state node

winged rose
#

thats what im hoping to achieve but it seems to error out if that entity is offline

opal ferry
#

I have a screen that covers my solar panels with shade and i would like to open that cover once the shade hits the solar panels

#

Would it be possible to compare 2 solar panels and have it lift up the cover once there is a 5-10% difference in generated watts?

subtle mango
#

I have 503-errors showing in gui for NR, and was tempted to reinstall Node-red. How do I best preserve my flows and nodes and put them back after reinstall?

faint ravine
void abyss
#

In 3.0.0 when I paste code into a function node, it formats the code in a different style than what I like, is there a way to turn it off so it just pastes it in as before, without changing anything?

rare holly
#

I'm trying to set the state of person.Tinman to store
but I can't make a call service node work if the domain is set to person

rare holly
#

also tried the update entity service, and nothing happens

neat olive
#

What's the best way to gate some action from continuing based on ORing together a bunch of different conditions from different entities?

#

So basically an action triggers, then for example I want to check if the bedroom light is on, or the back door is open or the dishwasher is on and if so have the flow continue on

#

Right now I'm funneling them back through a delay node with a rate limiter, but that's kinda hacky and error prone

#

Seems like it should be simple enough, but I can't figure it out

cobalt dock
#

switch nodes in series

neat olive
#

Yeah maybe I couldn't use a current state node here?

cobalt dock
#

either

winged plinth
neat olive
# cobalt dock switch nodes in series

Not sure how this would work. If one condition failed it wouldn't continue onto the next, right? That would work for ANDing some conditions, but not OR

#

I think what I could do is get the state of all the entities, then feed it into a single switch, and then configure that switch to "stop after first match"

neat olive
#

Ah right just short circuit

#

Didn't think of that and I like that better

rare holly
#

still can't figure out anything
is a call service even the correct node to use if trying to manually update the state of a device_tracker ?

cobalt dock
#

no

#

you'll have to use the api node making a call to the rest api

rare holly
#

well thats gonna be a party

#

thanks!

quaint jasper
#

Anybody know if it's possible to run an npm script with multiple files? Doesn't have to be through node-red

neat olive
#

Not sure what you mean by multiple files

quaint jasper
#

Just a node project containing multiple .js files

neat olive
#

You'd run one file and import the others I assume?

quaint jasper
#

Yes

neat olive
#

That doesn't work?

quaint jasper
#

I just don't know of a way to do so

neat olive
#

Well I think that's outside the scope of this channel. You might just want to read up on how importing works

quaint jasper
#

I just thought that since node-red is built upon node this would be the way to go

#

Also wym how importing works? Just by doing import { thing } from 'package'?

red fox
#

hi anyone know how to connect bacnet using node-red on HA >??

#

i always get the error time out error

cerulean cradle
#

Are delay nodes supposed to "override" each other? In the attached image I only get a resulting delay of 250ms:

sly musk
#

Hi, does anyone have a node red flow for arming and disarming a Konnected alarm please ?

Got the door sensor to chime on open on node red via echo

devout sage
#

hmm, seems the moment library used in Node-RED is lacking the duration method

fair cosmos
#

Hey, is it possible to do an automation including a CCwGTV with node red? I want to use CCwGTV, for examle when I turn it on, then all lights in room should go off and curtains close

#

I'm new to node red so I'm still watching guides and learning nodes

#

But I can't find an appropriate node to assign CCwGTV

#

The whole automation would be like this: if CC is turned on, then turn off lights and close curtain. If cc is off, and it's 10pm, then turn on lights and close curtain

#

So I'd use those states of CC

#

I was able to do something like that using the HA automation, but I want to use node red completely

tidal sundial
fair cosmos
#

Hmmm, I'm not sure that that's what I'm looking for

cobalt dock
fair cosmos
#

Yeah, looking at the new one too

fair cosmos
cobalt dock
#

if you already have it as a media player just use that to do your automations in NR

fair cosmos
#

That's what I'm asking, how would I use it. I added the events:state node, selected the appropriate CC, connected that to debug node, to see what's the exact state name when I turn on the device

tidal sundial
fair cosmos
#

But it doesn't give out anything

cobalt dock
#

what does the state show in HA dev tools?

fair cosmos
#

Oh good, there it says off

#

How do I find out then the other possible states of an entity?

#

Wait, it's actually not off

#

Lmao, this is so complicated for a noob like me ๐Ÿ‘๐Ÿ‘„๐Ÿ‘

#

I guess I do need other integrations

ionic parcel
#

Do people use nodered to turn their lights on?

#

(hue connected to sonoff stick)

red fox
#

HI any one know how to solve this error ?