Node-RED as a rule/script engine for openHAB

Have you seen the “File” nodes in the storage section ?

Hi

This just popped up in an email, I thought you might like to review it.

2 Likes

Thanks. I will check out both suggestions!
:grinning:

I installed the node flogger, stopped node red and started it again.
All my flows are gone!

Is there any way to get them back?

EDIT:
Got them in home/.node-red/flows_Homer.json
:smiley:

1 Like

I’m glad you’ve found some files to restore.

I did a quick search and found this, if I’m reading it correctly, NodeRed saves a backup of the files each time flows are deployed.

Search for the word “deploy” to see what I saw.

flows_*.json & flows_*_cred.json

These define the flows and any credentials stored for the flows. The * indicates that the actual file is named after the machine name you are running on. If you have transferred from another machine name, you might have multiple files though only one set will be active. In addition, there are *.backup versions of these files. Node-RED copies the old active flow/cred files each time you deploy.

Thanks a lot. I will check it out.
I though I need to start from scratch.

There is still a way to go to migrate 6000+ LOC of my rules into nodeRED… :wink:

i was lucky enough to find node red before i started any rules on my setup, i was in the early stages of understanding OH, and then node-red came , and this got me real amped up

from controlling just some MQTT devices ,my entire house is node-red based
i use OH dont get me wrong OH is the best for
,DB, logging , cloud ,site map , for the great REST API, and it is so stable!
but my all logic is there and i love the simplicity

i can tell you i switched my setup many times but with Node somehow its fun! and worth it
if you need help i am here…

also dont forget if it dosent work in OH you can always try the Node red way, it provided me some flexibility, and allot of workarounds !

1 Like

I agree, that it’s a lot of fun to create flows with node RED.
Even though my (text) rules are running fine and some might be too complex to transfer them into node RED (at least on my current knowledge level of node RED) I am considering to move over as much as possible.

However, I just recognized that the CPU load went up after changing some rules to node red and I wonder if my entire code in node RED (~ 6000 LOC) might cause problems on my raspberry pi 3…

Another issue:
I am using node-red-contrib-telegrambot and listen to this Bot using the receiver.

This kind of works and I can receive messages from my chat.

However, as soon as I add another Telegram node (notify), this notify node works, but the receiver shows “polling error”

For both nodes I need to create a separate Telegram Bot config - one for receiver - one for notify.

Googling did not help yet…
There must be an option to be using more than one instances of telegram related nodes!?

the telegram bot is not that simple!

i advise to watch this video , take the code and try by yourself
thats what i did and its working great!

i can send commands
i can reccive updates
the bot can ask me Qs like turn of the boiler?
i share it with my wife

cosongor also did a accses level , so not every user can use all actions
to explain it i cant sorry!

I use the bot itself since a few years with the Telegram binding, so the main task is done ( I thought).

Thanks for sharing - I will check it out

I am strugling with temperature comparison:
I have Number:Temperature item and would like to compare this in nodeRED:
grafik

I tried different syntac for the temperature:
20.0
20.0 °C
and the one above, none of this works.
As soon as I use a temperature item which is just number (not declared as temperature in the items file), the comparison works as expecte.
How does the comparison need to look like to work here?

Would removing the number type from your Item in OH help?

(Then put the suffix and formatting back on for each UI)

That’s how I have to do it when working with a lovely Thermostat widget in HabPanel that can’t cope with Number:Temperature types.

there is plate that is called string …
it can help you turn any value to any value you need it to be

1 Like

That would certainly help - I tried it with another numer item.
However, i would prefer to use the dimension, to avoid formating a lot in the UIs.

I will look into this.
thanks