Value through switch permanently

The machine getting the messages that fast and having to parse the messages, process them and put the data on the chart.

That is a lot of work for the machine.

The one sending is doing that quite happily now already.

The flow:

[{"id":"e9b9dd78.e10f1","type":"ui_switch","z":"af61c022.bc96e","name":"","label":"{{msg.payload.MQTTWert1name}}","tooltip":"","group":"22029319.b38d4c","order":1,"width":"3","height":"1","passthru":false,"decouple":"false","topic":"ATESTEO/Wolfsburg/W16","style":"","onvalue":"true","onvalueType":"str","onicon":"","oncolor":"","offvalue":"false","offvalueType":"str","officon":"","offcolor":"","x":3800,"y":2310,"wires":[["fef7d669.96ce98","2c2043b2.4cb60c"]]},{"id":"fef7d669.96ce98","type":"change","z":"af61c022.bc96e","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"Wertcheck1","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":4000,"y":2310,"wires":[[]]},{"id":"80fe1189.5a0ff","type":"change","z":"af61c022.bc96e","name":"","rules":[{"t":"delete","p":"payload.MQTTWert1","pt":"msg"},{"t":"delete","p":"payload.MQTTWert2","pt":"msg"},{"t":"delete","p":"payload.MQTTWert3","pt":"msg"},{"t":"delete","p":"payload.MQTTWert4","pt":"msg"},{"t":"delete","p":"payload.Status","pt":"msg"},{"t":"delete","p":"payload.MQTTWert2name","pt":"msg"},{"t":"delete","p":"payload.MQTTWert3name","pt":"msg"},{"t":"delete","p":"payload.MQTTWert4name","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3560,"y":2310,"wires":[["e9b9dd78.e10f1"]]},{"id":"2c2043b2.4cb60c","type":"trigger","z":"af61c022.bc96e","op1":"true","op2":"off","op1type":"str","op2type":"str","duration":"0","extend":true,"units":"s","reset":"false","bytopic":"all","name":"","x":3810,"y":2370,"wires":[["e9b9dd78.e10f1"]]},{"id":"22029319.b38d4c","type":"ui_group","z":"","name":"Messwerte auswählen","tab":"ec7a53af.4ac29","order":1,"disp":true,"width":"29","collapse":false},{"id":"ec7a53af.4ac29","type":"ui_tab","z":"","name":"W16-Chart","icon":"dashboard","order":11,"disabled":false,"hidden":false}]

I am not happy with it because I am really not sure it will work for what you want.
Though, if it works: good.

What happend:

  1. only switch 1 is "on"
  2. inject (first msg object)
  3. switch 1 goes "off" on first inject
  4. second inject with all switches on "off" but payload goes through (second msg object)

So here is a Screenshot:

Ok, that is a bit hard to read the outputs.
EDIT sorry. Clicked on picture and looked.
There isn't really much showing me that you are getting the wrong value sent.
It looks like the right value. 25.1. Which is what I get.

But what "bugs" me is:
You have debug1 turned on.

The other function nodes (may) need to be turned off. Turn them on then off. Just to be sure. Though I have made them block by default, it would be nice to see the red dots below the nodes.

I am not saying what you say is wrong, but as I said, I can't really read the output.

Please turn off debug1 and turn on debug a, debug b, debug c and debug d.

What happens then?

I have debug a turned on and press the inject time and time again and only see 25.1 in/on debug a.

Please don't worry too much abut that. Look at the function node and see the colour of the dot below it.

Red or Green. This is really what is happening. I know it is a bit confusing, but please, trust me.

So i did like u asked

  1. only debug's a,b,c,d activ
  2. switches on / off and stayed on "off"
    1. inject - no pass through - ok
    1. inject with first switch on "on" - switch sets to "off" and payload passes through
    1. inject with now all switches "off" - payload passes through (funktion node is on pass)

Screenshot:

I want to check if this doing what you want?

Change the switch positions and press the inject node and see if only those messages get through.

this flow doesnt work for me, because it lets payload pass with switch on "off".

in around 2 Hours i will test my actual solution with 8 values and report back.

till then i wanna find a way to send values to the original Sender of the values

Where is it letting through messages when the switch is off?

on the debugs a,b,c,d

No, only a. Take another look

foo

Only a (or the first one) is passing messages.

Only one output is received per injection.
I am taking it you pressed the inject node twice when you took this picture.

Turn on all 4 and press the inject and you will see four messages.

There seems to be a serious confusion to what is wanted and what is being seen and expected.

Sorry wrong screen...

second payload set is while every switch is on "off"

(Bangs head against wall)
Ok, it happens.

Deep breath.

Ok. The switch says off. look at the function node state.

Go to the GUI (dashboard) and make sure the switches are set to the OFF position.
If they are, turn them on, the back to off and try again.

Do NOT use the indication of the switch node to determine what is going on.
The function node determines that. There may be a bit of a set up glitch so I strongly suggest you toggle the switches and make sure the graphical state of the switch matches the function node.

Mine is working fine. There is something happening somewhere which is causing a lot of grief.

I have tested it time and time again and it works.

By the way:
What do call ON and OFF on the graphic side of the switch node?

Screenshot from 2020-07-17 19-02-41

Screenshot from 2020-07-17 19-05-26

They match

I did it exactly like u wrote. But it works like i wrote.

on the graphic side i do not have any "on" or "off" like you have...

The on and off are there to show the difference and which I show as on and which is off.

So when you set the switches from the GUI side, what do the function nodes do?

They go on "Block" like intended i think…
ahh u inserted These on & off to the switches :slight_smile:
I didnt realized that...

Set the GUI switches as I had. (Take screen shot and post)
Then flip to the edit screen and show the state of the 4 function nodes.

Similar to what I did, but you can have the 4 switches are you want.

Oh, the screen shots. Please don't post JPG type. They are bad if I need to load, edit and re-post. Try PNG format please.

For you to do if you want, have two windows open. One is the GUI and one is the EDIT screen.

Then as you move the GUI switches you can see the function nodes change their state.
In fact you could have the two window on the screen shot if you want.

Something like:

As you move the switches you see the function nodes change their state.

Ok so here are the proofing screenshots :slight_smile:

  1. All to "off" as starting Point


    Switchtestall off switches

  2. After Setting two switches to "on"


    Switchtest 2xon 2xoff switches

  3. After the first inject (doesnt change with more injects)


    Switchtest after first inject switches

Debugs a & c keep going getting values.

Yes they will because the switches are still ON.

(What am I missing?)

The switches are ON, they allow the message. They are OFF the block the message.

That is what is happening.

the switches are off? i dont see switches at "on"