Your setpoint feeding in to switch node either needs a join or use context storage (example below)
still not understand this part, sorry
looking at your example i see inside switch node:
$$.payload.idx in [254,255,256,257] and
$number($$.payload.svalue) > $flowContext("probes.setpoint" & $$.topic)
what is the $flowContext("probes.setpoint" & $$.topic)
?
Your change nodes are not required.
yes, i understand this.
You will also need to filter the telegram messages, to eliminate repeated messages as temp changes. ( see my original flow example, this uses the rbe, unique topic, trigger node and the msg.payload.idx value.) If message has been sent fora probe, it has to wait 60 seconds before a message can be sent again, you can edit the 60 seconds in the trigger node.
yes understand, i not thought about that, but you are fully right.
still here not understand properly how you implement this.
proposal.
i try to simplify things and create this flow:
[{"id":"b77f2a0b.c84bf","type":"tab","label":"BBQ-thermometer","disabled":false,"info":""},{"id":"6c17e033.20d628","type":"mqtt in","z":"b77f2a0b.c84bf","name":"","topic":"domoticz/in","qos":"2","datatype":"json","broker":"f0a64cae.6413e","x":160,"y":220,"wires":[["651f07e0.4e57b","bb4e3ad2.c51b5"]]},{"id":"bb4e3ad2.c51b5","type":"debug","z":"b77f2a0b.c84bf","name":"debug temperature","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":370,"y":140,"wires":[]},{"id":"651f07e0.4e57b","type":"switch","z":"b77f2a0b.c84bf","name":"","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"254","vt":"num"},{"t":"eq","v":"255","vt":"num"},{"t":"eq","v":"256","vt":"num"},{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":369,"y":240,"wires":[["94b97715.0b1368","8fbadb99.49313","fdb3e14.a30a32","d7553c8a.7f52a8","851b9152.de8db"],["d4096aff.92c95","aed49622.e0d7e8","407781cb.9c1088"],["2d6b4203.40cc1e","be33518d.9c90b8"],[]]},{"id":"104ff164.c56b37","type":"inject","z":"b77f2a0b.c84bf","name":"idx254=probe1","topic":"","payload":"{\"idx\":254,\"RSSI\":7,\"nvalue\":0,\"svalue\":\"45.3\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":280,"wires":[["651f07e0.4e57b"]]},{"id":"196d5471.ee538c","type":"inject","z":"b77f2a0b.c84bf","name":"idx255=probe2","topic":"","payload":"{\"idx\":255,\"RSSI\":7,\"nvalue\":0,\"svalue\":\"25.0\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":320,"wires":[["651f07e0.4e57b"]]},{"id":"97c8e463.97828","type":"inject","z":"b77f2a0b.c84bf","name":"idx256=probe3","topic":"","payload":"{\"idx\":256,\"RSSI\":7,\"nvalue\":0,\"svalue\":\"25.0\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":360,"wires":[["651f07e0.4e57b"]]},{"id":"94b97715.0b1368","type":"debug","z":"b77f2a0b.c84bf","name":"debug probe1","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.idx","targetType":"msg","x":680,"y":100,"wires":[]},{"id":"d0ffe4ca.e1071","type":"comment","z":"b77f2a0b.c84bf","name":"from ESPeasy to webpage","info":"","x":210,"y":100,"wires":[]},{"id":"8fbadb99.49313","type":"debug","z":"b77f2a0b.c84bf","name":"debug total msg","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":680,"y":60,"wires":[]},{"id":"fdb3e14.a30a32","type":"ui_gauge","z":"b77f2a0b.c84bf","name":"temp1","group":"ed3bcfc9.b655","order":0,"width":"0","height":"0","gtype":"gage","title":"temp1","label":"°C","format":"{{payload.svalue | number:1}}°C","min":"0","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"40","seg2":"50","x":1150,"y":280,"wires":[]},{"id":"d4096aff.92c95","type":"ui_gauge","z":"b77f2a0b.c84bf","name":"temp2","group":"54c51514.aa17bc","order":0,"width":"0","height":"0","gtype":"gage","title":"temp2","label":"°C","format":"{{payload.svalue | number:1}}°C","min":"0","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"40","seg2":"50","x":1150,"y":360,"wires":[]},{"id":"2d6b4203.40cc1e","type":"ui_gauge","z":"b77f2a0b.c84bf","name":"temp3","group":"ddc48bd4.edee38","order":0,"width":"0","height":"0","gtype":"gage","title":"temp3","label":"°C","format":"{{payload.svalue | number:1}}°C","min":"0","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"40","seg2":"50","x":1170,"y":440,"wires":[]},{"id":"2890498f.a066e6","type":"ui_numeric","z":"b77f2a0b.c84bf","name":"Setpoin1","label":"Setpoint1","tooltip":"","group":"ed3bcfc9.b655","order":3,"width":"0","height":"0","wrap":false,"passthru":true,"topic":"stepoint1","topicType":"msg","format":"{{value}}","min":"15","max":"100","step":"0.1","x":900,"y":480,"wires":[[]]},{"id":"2bacf0ab.8ab81","type":"ui_numeric","z":"b77f2a0b.c84bf","name":"Setpoin2","label":"Setpoint2","tooltip":"","group":"54c51514.aa17bc","order":3,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"stepoint2","topicType":"msg","format":"{{value}}","min":"15","max":"100","step":"0.5","x":900,"y":520,"wires":[[]]},{"id":"5f14ac1c.f9202c","type":"ui_numeric","z":"b77f2a0b.c84bf","name":"Setpoin3","label":"Setpoin3","tooltip":"","group":"ddc48bd4.edee38","order":3,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"stepoint3","topicType":"msg","format":"{{value}}","min":"15","max":"100","step":"0.5","x":900,"y":560,"wires":[[]]},{"id":"4e3eb479.d62a44","type":"debug","z":"b77f2a0b.c84bf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.svalue","targetType":"msg","x":960,"y":40,"wires":[]},{"id":"d7553c8a.7f52a8","type":"ui_text","z":"b77f2a0b.c84bf","group":"ed3bcfc9.b655","order":5,"width":0,"height":0,"name":"","label":"Probe 1 is = ","format":"{{payload.svalue | number:1}}°C","layout":"row-center","x":1150,"y":240,"wires":[]},{"id":"851b9152.de8db","type":"switch","z":"b77f2a0b.c84bf","name":"test stepoint1","property":"payload.svalue","propertyType":"msg","rules":[{"t":"gte","v":"setpoint1","vt":"msg"},{"t":"lt","v":"setpoint1","vt":"msg"}],"checkall":"true","repair":false,"outputs":2,"x":680,"y":180,"wires":[["e66703a4.4fbc58","1cba799e.ffcbc6","4e3eb479.d62a44","349aff2f.dffa18"],["fe12507b.a101c8"]]},{"id":"e66703a4.4fbc58","type":"debug","z":"b77f2a0b.c84bf","name":"debug total msg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":920,"y":120,"wires":[]},{"id":"d892157c.fd5058","type":"trigger","z":"b77f2a0b.c84bf","op1":"","op2":"{\"idx\":9999}","op1type":"pay","op2type":"json","duration":"4","extend":false,"units":"s","reset":"","bytopic":"topic","name":"reset rbe after x seconds","x":490,"y":720,"wires":[["95840a0f.916f98"]]},{"id":"95840a0f.916f98","type":"rbe","z":"b77f2a0b.c84bf","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload.idx","x":710,"y":720,"wires":[["3903ee57.1a7962"]]},{"id":"3903ee57.1a7962","type":"switch","z":"b77f2a0b.c84bf","name":"filter reset","property":"payload.idx","propertyType":"msg","rules":[{"t":"neq","v":"9999","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":870,"y":720,"wires":[[]]},{"id":"ae3e1141.87704","type":"change","z":"b77f2a0b.c84bf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"\"Probe \" & $$.topic & \" is over \" & $flowContext(\"probes.setpoint\" & $$.topic) & \". The temp is \" & $$.payload.svalue","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":720,"wires":[[]]},{"id":"349aff2f.dffa18","type":"debug","z":"b77f2a0b.c84bf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.idx","targetType":"msg","x":940,"y":80,"wires":[]},{"id":"1cba799e.ffcbc6","type":"ui_text","z":"b77f2a0b.c84bf","group":"ed3bcfc9.b655","order":2,"width":0,"height":0,"name":"arrived","label":"temp1 reach the setpoint1 !!","format":"{{msg.payload}}","layout":"row-left","x":1000,"y":160,"wires":[]},{"id":"fe12507b.a101c8","type":"ui_text","z":"b77f2a0b.c84bf","group":"ed3bcfc9.b655","order":2,"width":0,"height":0,"name":"not reached","label":"setpoint1 not reached","format":"{{msg.payload}}","layout":"row-left","x":1010,"y":200,"wires":[]},{"id":"aed49622.e0d7e8","type":"switch","z":"b77f2a0b.c84bf","name":"test stepoint2","property":"payload.svalue","propertyType":"msg","rules":[{"t":"gte","v":"setpoint2","vt":"msg"},{"t":"lt","v":"setpoint2","vt":"msg"}],"checkall":"true","repair":false,"outputs":2,"x":560,"y":380,"wires":[["9d9b1556.46b968"],["fb5abb7c.d7a8e"]]},{"id":"9d9b1556.46b968","type":"ui_text","z":"b77f2a0b.c84bf","group":"54c51514.aa17bc","order":2,"width":0,"height":0,"name":"arrived","label":"temp1 reach the setpoint1 !!","format":"{{msg.payload}}","layout":"row-left","x":720,"y":340,"wires":[]},{"id":"fb5abb7c.d7a8e","type":"ui_text","z":"b77f2a0b.c84bf","group":"54c51514.aa17bc","order":2,"width":0,"height":0,"name":"not reached","label":"setpoint1 not reached","format":"{{msg.payload}}","layout":"row-left","x":730,"y":420,"wires":[]},{"id":"407781cb.9c1088","type":"ui_text","z":"b77f2a0b.c84bf","group":"54c51514.aa17bc","order":5,"width":0,"height":0,"name":"","label":"Probe 2 is = ","format":"{{payload.svalue | number:1}}°C","layout":"row-center","x":1150,"y":320,"wires":[]},{"id":"be33518d.9c90b8","type":"ui_text","z":"b77f2a0b.c84bf","group":"ddc48bd4.edee38","order":5,"width":0,"height":0,"name":"","label":"Probe 3 is = ","format":"{{payload.svalue | number:1}}°C","layout":"row-center","x":1150,"y":400,"wires":[]},{"id":"f0a64cae.6413e","type":"mqtt-broker","name":"mosquitto","broker":"192.168.0.105","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"ed3bcfc9.b655","type":"ui_group","z":"","name":"Probe#1","tab":"d263bd1.9c431c","order":1,"disp":true,"width":"6","collapse":false},{"id":"54c51514.aa17bc","type":"ui_group","z":"","name":"Probe#2","tab":"d263bd1.9c431c","order":2,"disp":true,"width":"6","collapse":false},{"id":"ddc48bd4.edee38","type":"ui_group","z":"","name":"Probe#3","tab":"d263bd1.9c431c","order":3,"disp":true,"width":"6","collapse":false},{"id":"d263bd1.9c431c","type":"ui_tab","z":"","name":"Home BBQ","icon":"dashboard","disabled":false,"hidden":false}]
the idea is: with 1st switch node i filer only idx messages that i need => works
with swich named as "test setpoint1" i test if payload.svalue >= msg.setpoint1 => if yes i display the label arrived
if not i display label not reached.
that's should be the aim, but it not works, i see both labels simmultaneously
and sencond issue, the control of temperature vs setpont will be made only if i modify by clicking the setpoint value in the UI.
that's the result:
you can see that both label are been displayed in same time.
if you can pls have a look we can pls procced on fixing this and then use you solution that is much more elegant (i need to repeat the nodes for every idx (every sensor)
but starting with your functions it's a bit complicate for me that i0m a new bie
thanks