Nodered communication and logo 8 siemens

Hello everybody,

I am new to node red and my situation is: a voice command through thé app TASKER to node red, through HTTP post, to close an exit contact on logo 8 Siemens, and when i say the voice command again, the exit contact opens, its closses the exit contact when i say the command, but i don't Know how to program it, when i say it again, thé contact must open, can somebody help me? Please

I'd try using a flow context variable

Then every time you get a message - invert its state e.g.

Thanks for the program, i have put it in my program and it works,

I'm very greatfull

If it is not te much to ask, but can you explain it in text, how the program works, step by step?
Are there books of node red, for learning, i have found none, do you know any?


There are no books but there are resources on this site - check out

So the basic thing that my flow uses is the thing called flow context

It is a storage place that you can use to save/load from that is accessible to all the nodes on a tab.

Unlike msg.payload which is only available in a set of nodes connected together

So my flow checks to see if the a flow context variable called flow.state (state could be anything - could have called it flow.fred) is true and direct the message to be passed to output 1 or send it to output 2 if its not true (e.g false or doesn't exist)

Then in the change nodes - I just set msg.payload to true or false and set flow.state to false or true.

Then the next messsage that comes along will be sent to the opposite switch output than the last time.

Can I ask what is this TASKER app that can convert voice to HTTP posts?

thank you for the information,

With te TASKER app, you can do many things, including SENDING HTTPS POST (but many more) to node red, you can buy it in the play store.

With that you can send commands with google assistant (in my case) to logo siemens (plc controller) for my home.

And it works great, when i say to my smartphone, Bathroom On, my light are on.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.