XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Node-RED Forum - Latest posts

Latest posts

:tada: Node-RED 5.0.9 and 4.1.17 released

I wonder why this issue still hasn't been adressed. It looks like it affects all Mac users no matter which browser they are using. It's really annoying to have this transparent context menue... I know that it is an issue of the monaco editor itself but it could be fixed by just adding the option "fixedOverflowWidgets: false" when loading the editor in NodeRED. Or are there other issues related to this approach? I just find it strange that every Mac user has to do their own research to come…

Letting other nodes do stuf while one function node is working on a recursive search

What are you exactly looking (searching) for files or directories ? Nothing beats find on a linux filesystem. Or locate - if it is being updated via some cronjob. Find example; find "/somepath" | grep -iE 'term1.*term2|term2.*term1' You can use -type d and/or -type f if only searching for directory or filenames. Nothing to abort either as it will be 20x faster than a readdir

Letting other nodes do stuf while one function node is working on a recursive search

svefro: yes using await Promise.all(promises); was faster but it most likley consumed the entire VM Well, I'm glad this thread came up because it made me realise that I've made the same mistake! Fortunately, the folder structures likely to be reviewed are somewhat smaller. But still, I've some work to do to improve both my watcher function and the build/rebuild of my internal index. Another rabbit hole to go down.

Letting other nodes do stuf while one function node is working on a recursive search

yes using await Promise.all(promises); was faster but it most likley consumed the entire VM Thanks for all the pointers and suggestions. Added filter for 'node_modules' and '.git' That was a good idea Tested with an exec node and used find. But i get large strings that sometimes are split right in the middle of a line. I can make it work. But for now i'll use the code i posted. it works fast enough. also many files are on a samba share so it is limited by that.

🌐 UIBUILDER FAQ: The simplest possible way to show some Node-RED data on a page

PS: Stand-by for UIBUILDER v8 where the processing for the uib-topic, uib-var custom attributes and the <uib-var> custom component has all been rationalised and extensively reworked. More flexibility, with features being unified. There will also be a new example flow showing both the easy method and the extended ones.

Letting other nodes do stuf while one function node is working on a recursive search

svefro: await Promise.all(promises); I believe this is your issue. that promise.all can exhaust V8's thread pool and cause memory spikes when doing multi-folder searches. So even though using a worker would certainly help, you would still need to work around that unless you use a different approach. Are you pre-filtering for only specific file types, excluding irrelevant folders (.git for example) and avoiding a call to stat for each file? All of those can make things a lot more efficient. Here…

Letting other nodes do stuf while one function node is working on a recursive search

Do you need this to work on different platforms? It's hard to imagine getting close to the performance of OS commands for searching a directory tree. On linux that might be file globbing or find / grep. No doubt other operating systems offer similar tools. On a multi-core computer, running a search via exec, Node-red should not be impacted by the search?

Letting other nodes do stuf while one function node is working on a recursive search

i'm sorry i did not provide my code. i was already using resursing inside my function i did searches in subfilders with await Promise.all const promises = subfolders_to_search.map((item) => searchRecurse(item)); await Promise.all(promises); Solution: When i changed to just awaiting each subfolder i was able to abort like intended. i set a 'global' variable when abort is detected so i do not need to propagate the abort back. but i wonder why it works when doing: await searchRecurse(item) and not…

How to certify my KNX node?

Hi @Supergiovane, how you are well. Supergiovane: Could someone point me to a link where I can learn how to “certify” See here : Curated Node-RED Integrations: FlowFuse Certified Nodes 2.0 • FlowFuse Blog Which has the submission form also I have also moved this to the FlowFuse Category.

Letting other nodes do stuf while one function node is working on a recursive search

One cancellation detail in the sample: return msg only exits the current walkDir call. The caller ignores that result, and the code after await walkDir(...) then overwrites the status: omrid: msg.status = "OK"; Have walkDir return a boolean: false when aborted and true when finished. Propagate false from a child back to its caller, for example: if (!(await walkDir(fullName))) return false; Then set the final status once, at the outermost level: const completed = await walkDir(rootDirectory);…

Letting other nodes do stuf while one function node is working on a recursive search

Why not use recursive JS within your function node, using await for each readdir() call (to ensure it does not suffocate the JS engine), and checking the abort flag? for example: // In the node configuration, import fs.promises as "fs" from "node:fs", and path from "node:path" await walkDir("path-to-tree-root"); msg.status = "OK"; return msg; async function walkDir(dir) { const list = await fs.readdir(dir, { withFileTypes: true }); for (const entry of list) { if (flow.get("abort") === true) {…

Letting other nodes do stuf while one function node is working on a recursive search

I think the first part is correct, using a flow variable as a gate flag. svefro: It seemed that Node-RED was unable to update the flow variable while the Function node was busy executing the recursive search. This is the issue I think, you've sent the main node.js loop into an impenetrable loop I suspect. The node.js "way" to do this would, I think, be to create a worker thread, though even with that, you should make sure that you are using node's promise-based filing system methods and not…

Letting other nodes do stuf while one function node is working on a recursive search

Hi @svefro How are you executing your search, maybe a code example will help here? it is important to note, Node JS (and therefore Node RED) is single threaded. So if you are not making use of promises, you're choking the event loop - stopping your "escape" variable from actually getting updated, therefore witnessed by the loop.

Letting other nodes do stuf while one function node is working on a recursive search

I'm implementing a recursive search in a Function node in Node-RED. The idea is to load directory listings in a loop and recursively search through all subfolders by calling the same function for each directory. However, since the search can involve a large number of files and folders, I'd like to be able to abort it while it's running. I initially tried using a flow variable for this. Another node would set the variable to true, and the recursive function would check its value on each call. If…

Node-RED Dashboard 3.6.6 – Mobile sidebar: multiline labels, font-size issue and working workaround

Thank you for taking such a close look at my workaround! You've analysed it very well and pointed out something I hadn't considered. I think I may have focused a little too much on getting the mobile device display right when developing the workaround, and overlooked what happens when switching back to a desktop layout. Your suggestions make perfect sense, especially using matchMedia() to handle viewport changes and limiting the MutationObserver to the sidebar. I'll take a closer look at these…

Rise in AI generate replies

He's using Home Assistant - which you don't really code - but does require everything configuring via YAML files - (or via UI panels) - and he does know how to do that - just the AI has taken it to the next level. So yes has knowledge of HA and how to use ChatGPT, but yes it's a YouTube channel so always looking for clicks.

Clicking the far right of the editor window closes node config

krotname: a click there can accept the edit. Well that is true but it alleviates the problem rather than adding to it imho. I did test if the changes already made were saved and they are. I'm ok with that, on the rare occasion when i made a change but don't want to save it there is Ctrl z. Yoh can probably see I use an editor CSS file to make the scrollbars more visible. I feel that there ought to be a CSS way to fix this issue but so far I have not discovered it.

Clicking the far right of the editor window closes node config

@jbudd thanks for the feedback - not something that had been highlighted before. I'll raise an issue to capture it and we can consider how to reduce your frustration. @krotname your reply reads very much like an AI response that doesn't actually add value to the conversation. You are confirming what jbudd says without contributing anything to help address it.

Node-RED Dashboard 3.6.6 – Mobile sidebar: multiline labels, font-size issue and working workaround

One detail in the workaround: the @media (max-width: 959px) rule scopes the CSS, but it does not scope the separate script. The script currently sets an inline font-size: 13px !important on matching sidebar labels at every viewport width, and that inline value also remains after resizing out of the mobile layout. If 13px is intended only below 960px, gate the update with matchMedia('(max-width: 959px)').matches, listen for its change event, and remove the inline font-size when the query stops…

Clicking the far right of the editor window closes node config

There is a concrete code path for this in 5.0.9: tray.js, lines 234–240 binds a click on #red-ui-editor-shade to the tray's primary button. For the normal node editor, that primary button is Done (editor.js). That makes the gap more than a dismissal problem: a click there can accept the edit. Your screenshot already identifies the hit area. A useful regression test for a layout fix would be to change a field, click that strip, and check whether the edit is accepted, including after resizing the…

Node-RED Dashboard 3.6.6 – Mobile sidebar: multiline labels, font-size issue and working workaround

Node-RED Dashboard 3.6.6 – Mobile sidebar: multiline labels, font-size issue and working workaround Hello Node-RED community, I would like to share an issue I encountered while customising the mobile sidebar menu in Node-RED Dashboard 3.6.6. After some debugging and testing,I found a working workaround that might also be useful for other users. 1. Environment Node-RED Dashboard 3.6.6 Mozilla Firefox Google Chrome Raspberry Pi installation Mobile dashboard view The same behaviour was initially…

Rise in AI generate replies

dceejay: This guy is fully invested "Alexa, the baby is asleep ... OK John, I have purchased 5000 disposable nappies from Amazon for you using your iPhone that you foolishly let me control." dceejay: And then it just gets weird.... Is he from Florida by any chance? Man uses AI to run his business and social media, then complains when AI does things that are obviously stupid (pours epoxy on their feet!) quite possibly breaking the Meta terms and conditions. Then compounds it by letting the AI…