Node red flows seem to be slowing down

Hello all,
Node red newbie here. I have two flows that are working and control an esp8266 spa controller(client) and an esp32 fishtank/grow area aquaponic(client).
This used to have very low latency.... dashboard has a few switch nodes for troubleshooting l turning on and off of pumps etc. So when I would use the dashboard switch to turn on or off a pump etc it would happen almost instantly.... I have been fiddling around with the flows to make some small changes and now I notice it takes almost 7 seconds for the client to make it happen after the .
not sure if this is normal..... using raspberry pi 4 for node red and Mosquitto and the flows have a total of about 125 varying type nodes. Is this normal? or is something going astray?

The clients are cycling every 10 seconds.... is this too much?
Thanks for any help

Check to see that you haven’t created any loops. Especially mqtt loops where you send something out but you are subscribing to the same topic.

I’d disable parts of the flow to see if things speed up.

hi zenofmud,

Total newbie.... not sure what this means..... I know what you mean by subscribing (i think this is done in the code at each of the clients.... not sure what you mean by sending something out on the same topic?

I can disable stuff to see if it speeds up but I am not sure where I make the breaks.

Troy

What he means is...

You may have created a loop that is causing ode-red to get bogged down.

consider this...


-->   SUBSCRIBE TO "#"  or "sensors/#"  
^     process some logic              
|     PUBLISH to "sensors/state"       -->
|                                        |
|                                        |
<----------------------------------------<
//round and round it goes, like nobody knows!

The same can happen if a button links to something that publishes then a subscription links back into the button input.

Essentially, what your describing is NOT normal (I run some pretty heavy flows & they are lightening fast

did you make backups?

1 Like

To check for MQTT loops add an MQTT In node subscribed to # so it will show all the data being published. Feed that into a debug node and see what happens. If you have an MQTT loop then it will get flooded with messages.

Have you got a charts on the dashboard? They can slow things down if you have not thought enough about how to configure them.

Hi Colin and Steve,
Yep did the mqtt in node and debug and it has soo much traffic .

So how to fix. So I should go through my two clients and check my publish and subscribe for same topics?

Or do I do this in node red itself.(not sure)?

Thanks for your help and sorry I am not getting it.

Troy

Are you subscribing to #?
If so, everytime you publish something it comes right back to you

Look at this...

-->   1. SUBSCRIBE TO "#"  or "sensors/#"  
^     2. do something             
|     3. PUBLISH TO "sensors/state"       -->
|                                           |
|                                           |
<-------------------------------------------<

When you subscribe to '#' (1) then you might do some logic processing or update something (2) then finally publish out to (for example) sensors/state (3) - that message comes straight back in to # (1) - and so the cycle goes on again and again.

Try narrowing your subscribes to sensors/thing1/value (or whatever it is you are watching)

Of course, much of this is assumption as you haven't posted your flows. Pretty difficult to help other than offer abstract advice.

Hi Steve,
I am not sure what it is that you are suggesting.... I can publish my flow.... but I am still unclear on a bunch of things all at the same time..... think of speaking with a two year old.... some of the words you are using describing are not understood..... first off what you are asking me to look at showing the 3 lines.... are these supposed to be code that is used by my clients (arduino ide)? or are these supposed to represent nodes in node red? the use of # I am guessing is a wild card? and I understand (i think) the suggestion of adding the msqtt input node and then the debug to see what is coming through but your next post loses me.
here is one of my flows

[{"id":"7e7b3985.dc65","type":"tab","label":"BREED TANK","disabled":false,"info":""},{"id":"11043e78.c0a8fa","type":"mqtt in","z":"7e7b3985.dc65","name":"esp32breed/humidity","topic":"esp32breed/humidity","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":130,"y":20,"wires":[["2c968a42.7b90a6"]]},{"id":"161f70e7.735657","type":"mqtt in","z":"7e7b3985.dc65","name":"esp32breed/temperature","topic":"esp32breed/temperature","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":130,"y":120,"wires":[["b955e54d.a139b8"]]},{"id":"b67f1c2d.6577d8","type":"mqtt in","z":"7e7b3985.dc65","name":"esp32breed/fish tank temperature","topic":"esp32breed/fishtemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":150,"y":260,"wires":[["392c4446.f49abc"]]},{"id":"ce4db356.b05df","type":"ui_gauge","z":"7e7b3985.dc65","name":"fish tank temperature","group":"cb0cc1f4.71e7b8","order":1,"width":0,"height":0,"gtype":"gage","title":"TEMPERATURE","label":"*F","format":"{{value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":620,"y":200,"wires":[]},{"id":"f00fd23d.1c9e18","type":"mqtt in","z":"7e7b3985.dc65","name":"esp32breed/inches","topic":"esp32breed/inches","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":110,"y":380,"wires":[["1dda2a81.4ef6f5","75460ec6.eccde"]]},{"id":"5a3c5fe5.589af8","type":"ui_gauge","z":"7e7b3985.dc65","name":"water level from top of tank","group":"cb0cc1f4.71e7b8","order":2,"width":0,"height":0,"gtype":"gage","title":"inches","label":"inches","format":"{{value}}","min":"0","max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":420,"y":360,"wires":[]},{"id":"519d7bae.26099c","type":"function","z":"7e7b3985.dc65","name":"fish tank level too low","func":"if(msg.payload >= 9){\n   msg.payload = \"water too low in fish tank\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":120,"y":500,"wires":[["95023b36.badf6"]]},{"id":"95023b36.badf6","type":"delay","z":"7e7b3985.dc65","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":320,"y":540,"wires":[["1e25015b.ebb6cf"]]},{"id":"a0176fe4.53d9","type":"mqtt in","z":"7e7b3985.dc65","name":"fishpump","topic":"esp32breed/fishpump","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":80,"y":620,"wires":[["390f467c.7a054a","8834c33f.eea488","1bb96e03.e7519a"]]},{"id":"390f467c.7a054a","type":"ui_text","z":"7e7b3985.dc65","group":"cb0cc1f4.71e7b8","order":4,"width":0,"height":0,"name":"Fish Pump","label":"Fish Pump","format":"{{msg.payload}}","layout":"row-spread","x":290,"y":640,"wires":[]},{"id":"64c21805.f0b658","type":"mqtt in","z":"7e7b3985.dc65","name":"Grow Light A","topic":"esp32breed/glighta","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":90,"y":700,"wires":[["b4c85b0a.e3bdb"]]},{"id":"b4c85b0a.e3bdb","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":4,"width":0,"height":0,"name":"Grow Light A","label":"Grow Light A","format":"{{msg.payload}}","layout":"row-spread","x":290,"y":700,"wires":[]},{"id":"54c3377b.3785b8","type":"mqtt in","z":"7e7b3985.dc65","name":"Fish Light","topic":"esp32breed/flight","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":100,"y":1160,"wires":[["291ea52e.a4c91a"]]},{"id":"291ea52e.a4c91a","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":3,"width":0,"height":0,"name":"Fish Light","label":"Fish Light","format":"{{msg.payload}}","layout":"row-spread","x":260,"y":1160,"wires":[]},{"id":"8834c33f.eea488","type":"change","z":"7e7b3985.dc65","name":"fishpmpon to 10","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":580,"wires":[["15f06ee8.0498a9"]]},{"id":"1bb96e03.e7519a","type":"change","z":"7e7b3985.dc65","name":"fishpumpoff","rules":[{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":620,"wires":[["15f06ee8.0498a9"]]},{"id":"15f06ee8.0498a9","type":"ui_chart","z":"7e7b3985.dc65","name":"Water Level & Fpumpon","group":"cb0cc1f4.71e7b8","order":3,"width":"6","height":"5","label":"Water Level & Fpumpon","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"0","ymax":"10","removeOlder":"1","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":730,"y":420,"wires":[[]]},{"id":"1c4247ab.d6ba78","type":"mqtt in","z":"7e7b3985.dc65","name":"cab temp","topic":"esp32breed/cabtemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":100,"y":1220,"wires":[["e7e9b698.1d1388"]]},{"id":"e7e9b698.1d1388","type":"ui_gauge","z":"7e7b3985.dc65","name":"CABINATE temperature","group":"fd9674bc.7fc8e","order":1,"width":0,"height":0,"gtype":"gage","title":"CAB TEMPERATURE","label":"*F","format":"{{value}}","min":"50","max":"100","colors":["#00ffff","#00ff00","#ca3838"],"seg1":"75","seg2":"85","x":310,"y":1220,"wires":[]},{"id":"b0ed553.e7bc628","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":2,"width":0,"height":0,"name":"Heat","label":"Cab heater","format":"{{msg.payload}}","layout":"row-spread","x":690,"y":1000,"wires":[]},{"id":"56d05bb5.38a8fc","type":"mqtt in","z":"7e7b3985.dc65","name":"cab temp","topic":"esp32breed/cabtemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":120,"y":1040,"wires":[["a2e0a81a.206d7"]]},{"id":"53815adc.360b7c","type":"function","z":"7e7b3985.dc65","name":"heat on or off a","func":"if(msg.payload < 78 )\n{\n    msg.payload = 'on';\n}\nelse{\nif( msg.payload > 85 )\nmsg.payload = 'off';  \n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":1040,"wires":[["6c5ae59b.885bfc"]]},{"id":"6c5ae59b.885bfc","type":"change","z":"7e7b3985.dc65","name":"change topic heat","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp32breed/heat' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":940,"wires":[["719d0ada.09085c","b0ed553.e7bc628"]]},{"id":"719d0ada.09085c","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":870,"y":920,"wires":[]},{"id":"8aa42ebd.805eb8","type":"function","z":"7e7b3985.dc65","name":"grow area temp too high","func":"if(msg.payload > 105){\n   msg.payload = \"grow area temp too high\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":630,"y":140,"wires":[["3c8decec.d2001c"]]},{"id":"3c8decec.d2001c","type":"switch","z":"7e7b3985.dc65","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"grow area temp too high","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":850,"y":160,"wires":[["fde13d85.9a9d28"]]},{"id":"fde13d85.9a9d28","type":"delay","z":"7e7b3985.dc65","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1000,"y":220,"wires":[["f6977f75.611b88"]]},{"id":"f6977f75.611b88","type":"e-mail","z":"7e7b3985.dc65","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":1260,"y":240,"wires":[]},{"id":"4ea57e5f.9dd51","type":"function","z":"7e7b3985.dc65","name":"fish tank  temp too high","func":"if(msg.payload > 86){\n   msg.payload = \"fish tank temp too high\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":780,"y":240,"wires":[["888a2f95.778d18"]]},{"id":"888a2f95.778d18","type":"switch","z":"7e7b3985.dc65","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"fish tank temp too high","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":910,"y":280,"wires":[["fde13d85.9a9d28"]]},{"id":"fa81971a.112ca","type":"function","z":"7e7b3985.dc65","name":"cabinate temp too high","func":"if(msg.payload > 95){\n   msg.payload = \"cabinate temp too high\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":390,"y":1100,"wires":[["e52da6ef.363698"]]},{"id":"e52da6ef.363698","type":"switch","z":"7e7b3985.dc65","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"cabinate temp too high","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":670,"y":1060,"wires":[["3b04a2c7.83a3ee"]]},{"id":"6701f88d.dc7b78","type":"mqtt in","z":"7e7b3985.dc65","name":"Grow Light B","topic":"esp32breed/glightb","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":90,"y":780,"wires":[["e5ee2ea9.a0f8f8"]]},{"id":"e5ee2ea9.a0f8f8","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":5,"width":0,"height":0,"name":"Grow Light B","label":"Grow Light B","format":"{{msg.payload}}","layout":"row-spread","x":310,"y":780,"wires":[]},{"id":"4599de8f.75dc2","type":"mqtt in","z":"7e7b3985.dc65","name":"Grow Light C","topic":"esp32breed/glightc","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":90,"y":860,"wires":[["953db518.b5d7f8"]]},{"id":"953db518.b5d7f8","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":6,"width":0,"height":0,"name":"Grow Light C","label":"Grow Light C","format":"{{msg.payload}}","layout":"row-spread","x":310,"y":860,"wires":[]},{"id":"6d9930b.067655","type":"mqtt in","z":"7e7b3985.dc65","name":"Grow Light D","topic":"esp32breed/glightd","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":90,"y":920,"wires":[["5c9a790.f3a8808"]]},{"id":"5c9a790.f3a8808","type":"ui_text","z":"7e7b3985.dc65","group":"fd9674bc.7fc8e","order":7,"width":0,"height":0,"name":"Grow Light D","label":"Grow Light D","format":"{{msg.payload}}","layout":"row-spread","x":250,"y":920,"wires":[]},{"id":"d0e8c5bd.22ee18","type":"stoptimer2","z":"7e7b3985.dc65","duration":"10","durationType":"num","units":"Minute","payloadtype":"str","payloadval":"off","name":"on duration","x":650,"y":1240,"wires":[[],["57a689d4.43e308"]]},{"id":"d07e508f.70bc8","type":"inject","z":"7e7b3985.dc65","name":"fish cycle","topic":"esp32breed/fishpump","payload":"on","payloadType":"str","repeat":"1200","crontab":"","once":true,"onceDelay":0.1,"x":530,"y":1180,"wires":[["e4c5e7dd.ee5f1","d0e8c5bd.22ee18","f2138184.a71cf"]]},{"id":"e4c5e7dd.ee5f1","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":770,"y":1160,"wires":[]},{"id":"57a689d4.43e308","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":850,"y":1260,"wires":[]},{"id":"fe5e74e0.adaf18","type":"bigtimer","z":"7e7b3985.dc65","outtopic":"esp32breed/flight","outpayload1":"on","outpayload2":"off","name":"fish lights","comment":"","lat":"38.2324","lon":"122.6367","starttime":"390","endtime":"1320","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":1120,"y":1000,"wires":[["661b0733.7135e"],[],[]]},{"id":"21d75d43.aa8752","type":"bigtimer","z":"7e7b3985.dc65","outtopic":"esp32breed/glighta","outpayload1":"on","outpayload2":"off","name":"grow light A","comment":"","lat":"38.2324","lon":"122.6367","starttime":"960","endtime":"780","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":1110,"y":380,"wires":[["14570b69.8cee05"],[],[]]},{"id":"661b0733.7135e","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1310,"y":1000,"wires":[]},{"id":"14570b69.8cee05","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1290,"y":340,"wires":[]},{"id":"547c1ffb.abe1","type":"bigtimer","z":"7e7b3985.dc65","outtopic":"esp32breed/glightb","outpayload1":"on","outpayload2":"off","name":"grow light B","comment":"","lat":"38.2324","lon":"122.6367","starttime":"960","endtime":"780","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":1110,"y":520,"wires":[["dc9acedc.9127a8"],[],[]]},{"id":"dc9acedc.9127a8","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1290,"y":500,"wires":[]},{"id":"e3751db9.5b51c","type":"bigtimer","z":"7e7b3985.dc65","outtopic":"esp32breed/glightc","outpayload1":"on","outpayload2":"off","name":"grow light C","comment":"","lat":"38.2324","lon":"122.6367","starttime":"960","endtime":"780","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":1130,"y":700,"wires":[["dcb3e67a.b631b"],[],[]]},{"id":"dcb3e67a.b631b","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1290,"y":660,"wires":[]},{"id":"912062fb.ea3b3","type":"bigtimer","z":"7e7b3985.dc65","outtopic":"esp32breed/glightd","outpayload1":"on","outpayload2":"off","name":"grow light D","comment":"","lat":"38.2324","lon":"122.6367","starttime":"960","endtime":"780","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":1110,"y":860,"wires":[["3f315dd3.6e0f6a"],[],[]]},{"id":"3f315dd3.6e0f6a","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1290,"y":820,"wires":[]},{"id":"a2e0a81a.206d7","type":"rbe","z":"7e7b3985.dc65","name":"filter odd reads","func":"narrowband","gap":"50","start":"","inout":"out","property":"payload","x":120,"y":1100,"wires":[["53815adc.360b7c","fa81971a.112ca"]]},{"id":"b955e54d.a139b8","type":"rbe","z":"7e7b3985.dc65","name":"filter odd reads","func":"narrowband","gap":"50","start":"","inout":"out","property":"payload","x":160,"y":180,"wires":[["d7db4788.fa2f28","8aa42ebd.805eb8"]]},{"id":"392c4446.f49abc","type":"rbe","z":"7e7b3985.dc65","name":"filter odd reads","func":"narrowband","gap":"50","start":"","inout":"out","property":"payload","x":500,"y":260,"wires":[["4ea57e5f.9dd51","ce4db356.b05df"]]},{"id":"3b04a2c7.83a3ee","type":"delay","z":"7e7b3985.dc65","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":880,"y":1040,"wires":[["c4b2b119.3348a8"]]},{"id":"c4b2b119.3348a8","type":"e-mail","z":"7e7b3985.dc65","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":1160,"y":1080,"wires":[]},{"id":"1e25015b.ebb6cf","type":"e-mail","z":"7e7b3985.dc65","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":500,"y":520,"wires":[]},{"id":"d7db4788.fa2f28","type":"ui_gauge","z":"7e7b3985.dc65","name":"grow area temperature","group":"fd9674bc.7fc8e","order":1,"width":0,"height":0,"gtype":"gage","title":"grow area temp","label":"*F","format":"{{value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":400,"y":100,"wires":[]},{"id":"1dda2a81.4ef6f5","type":"smooth","z":"7e7b3985.dc65","name":"","property":"payload","action":"low","count":"6","round":"0","mult":"single","reduce":false,"x":120,"y":440,"wires":[["519d7bae.26099c","5a3c5fe5.589af8","15f06ee8.0498a9"]]},{"id":"75460ec6.eccde","type":"trigger","z":"7e7b3985.dc65","op1":"","op2":"timout ultra","op1type":"nul","op2type":"str","duration":"25","extend":true,"units":"s","reset":"","bytopic":"all","name":"watchdog","x":620,"y":320,"wires":[["4d791f93.84443"]]},{"id":"2c968a42.7b90a6","type":"ui_gauge","z":"7e7b3985.dc65","name":"grow area Humidity","group":"fd9674bc.7fc8e","order":1,"width":0,"height":0,"gtype":"gage","title":"grow area humidity","label":"%","format":"{{value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":570,"y":40,"wires":[]},{"id":"4d791f93.84443","type":"link out","z":"7e7b3985.dc65","name":"link out to a","links":["1036fcb4.a88013"],"x":840,"y":340,"wires":[]},{"id":"1036fcb4.a88013","type":"link in","z":"7e7b3985.dc65","name":"link from a","links":["4d791f93.84443","451437e4.901038"],"x":95,"y":1420,"wires":[["10214297.9eb09d","abb86dfc.6a778"]]},{"id":"10214297.9eb09d","type":"delay","z":"7e7b3985.dc65","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":260,"y":1420,"wires":[["821c6a7b.f24048"]]},{"id":"821c6a7b.f24048","type":"e-mail","z":"7e7b3985.dc65","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":520,"y":1440,"wires":[]},{"id":"34004f76.87a22","type":"mqtt out","z":"7e7b3985.dc65","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":770,"y":1520,"wires":[]},{"id":"abb86dfc.6a778","type":"change","z":"7e7b3985.dc65","name":"change topic restart","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp32breed/restart' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":230,"y":1500,"wires":[["c44f339.e9b74d"]]},{"id":"f2138184.a71cf","type":"trigger","z":"7e7b3985.dc65","op1":"","op2":"timout fishcycle","op1type":"nul","op2type":"str","duration":"22","extend":true,"units":"min","reset":"","bytopic":"all","name":"watchdog","x":980,"y":1200,"wires":[["451437e4.901038"]]},{"id":"451437e4.901038","type":"link out","z":"7e7b3985.dc65","name":"link out to a","links":["1036fcb4.a88013"],"x":1200,"y":1220,"wires":[]},{"id":"c44f339.e9b74d","type":"change","z":"7e7b3985.dc65","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1520,"wires":[["34004f76.87a22"]]},{"id":"562eb1ef.1c2f1","type":"mqtt-broker","z":"","name":"","broker":"192.168.250.8","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"cb0cc1f4.71e7b8","type":"ui_group","z":"","name":"fish tank","tab":"c9caba51.57ee3","order":2,"disp":true,"width":"6","collapse":false},{"id":"fd9674bc.7fc8e","type":"ui_group","z":"","name":"outputs","tab":"c9caba51.57ee3","order":3,"disp":true,"width":"6","collapse":false},{"id":"c9caba51.57ee3","type":"ui_tab","z":"","name":"breed cab","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Hopefully I did this correctly... sorry if I am dense about this stuff but seem to be learning but slowly
Troy
1

OK, so first off, it doesnt appear to me that you have subscribed to a topic that is causing a loop. It may be your devices are pushing too much data to MQTT.

1st place I'd start is adding debug nodes EVERYWHERE and see what is generating all the noise.

example...

Steve,
Ok did that for that flow and all seemed as I would expect with all of the nodes for sensors sending message every 5 to 6 seconds..... nothing sending msg every second etc.

So my guess is that I should do that for the flow I did not post which is below and check it the same way?

[{"id":"c2e87ad9.9a3fe8","type":"tab","label":"esp8266 spa","disabled":false,"info":""},{"id":"23d5d59.8e88c2a","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/inches","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":190,"y":120,"wires":[["cd4e198.f677fe8","f893be68.894eb"]]},{"id":"cd4e198.f677fe8","type":"ui_gauge","z":"c2e87ad9.9a3fe8","name":"spa water level","group":"dc08521.6b0dab","order":0,"width":0,"height":0,"gtype":"gage","title":"water level in spa","label":"inches","format":"{{value}}","min":"0","max":"25","colors":["#00b500","#e6e600","#ca3838"],"seg1":"15","seg2":"20","x":470,"y":100,"wires":[]},{"id":"5738e593.bb4fac","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/spatemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":200,"y":280,"wires":[["d4c7e023.60088","799500f.7c5c6","b5060a91.7fd078"]]},{"id":"d4c7e023.60088","type":"ui_gauge","z":"c2e87ad9.9a3fe8","name":"spa water Temparature","group":"dc08521.6b0dab","order":0,"width":0,"height":0,"gtype":"gage","title":"spa temperature","label":" ° F","format":"{{value}}","min":"50","max":"105","colors":["#00b500","#e6e600","#ca3838"],"seg1":"80","seg2":"102","x":490,"y":260,"wires":[]},{"id":"799500f.7c5c6","type":"ui_chart","z":"c2e87ad9.9a3fe8","name":"Spa Temp","group":"70c44ff3.93741","order":2,"width":0,"height":0,"label":"hot tub temperature","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"60","ymax":"108","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":660,"y":300,"wires":[[]]},{"id":"1609f58c.0903da","type":"bigtimer","z":"c2e87ad9.9a3fe8","outtopic":"esp8266spa/pump","outpayload1":"on","outpayload2":"off","name":"pump clean cycle","comment":"","lat":"38.2324","lon":"122.6367","starttime":"1185","endtime":"1230","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":210,"y":460,"wires":[["fdd23dd8.874ee","ece08c0e.89828","76a0d4cf.ae3a9c","42f21e87.2c33a"],[],[]]},{"id":"fdd23dd8.874ee","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"turn on pump","topic":"esp8266spa/pump","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":450,"y":440,"wires":[]},{"id":"ece08c0e.89828","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"turn on uv","topic":"esp8266spa/uv","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":440,"y":500,"wires":[]},{"id":"76a0d4cf.ae3a9c","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"turn on heat","topic":"esp8266spa/heat","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":450,"y":560,"wires":[]},{"id":"1578b59f.b7c77a","type":"ui_switch","z":"c2e87ad9.9a3fe8","name":"uv","label":"UV","tooltip":"","group":"965995d7.246998","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"esp8266spa/uv","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":810,"y":100,"wires":[["7800f7d.8514c08"]]},{"id":"7800f7d.8514c08","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1010,"y":40,"wires":[]},{"id":"ed37bfff.b0e1","type":"ui_switch","z":"c2e87ad9.9a3fe8","name":"Heat","label":"HEAT","tooltip":"","group":"965995d7.246998","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"esp8266spa/heat","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":810,"y":160,"wires":[["97f18cfa.f4a0a"]]},{"id":"97f18cfa.f4a0a","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1000,"y":160,"wires":[]},{"id":"5508aa60.483f84","type":"ui_switch","z":"c2e87ad9.9a3fe8","name":"pump","label":"PUMP","tooltip":"","group":"965995d7.246998","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"esp8266spa/pump","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":810,"y":220,"wires":[["9dd88cbe.a5be5"]]},{"id":"9dd88cbe.a5be5","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1000,"y":220,"wires":[]},{"id":"322657f6.ba0458","type":"change","z":"c2e87ad9.9a3fe8","d":true,"name":"change topic pump","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp8266spa/pump' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":900,"wires":[["250af6f7.0f480a","38e7d384.85367c"]]},{"id":"d76b9f01.261c6","type":"change","z":"c2e87ad9.9a3fe8","d":true,"name":"change topic heat","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp8266spa/heat' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":760,"wires":[["5385c400.9492fc","897b6f5a.16bdf"]]},{"id":"897b6f5a.16bdf","type":"stoptimer2","z":"c2e87ad9.9a3fe8","d":true,"duration":"115","durationType":"num","units":"Minute","payloadtype":"str","payloadval":"off","name":"","x":830,"y":800,"wires":[[],["c12e856f.81e7d8"]]},{"id":"250af6f7.0f480a","type":"stoptimer2","z":"c2e87ad9.9a3fe8","d":true,"duration":"2","durationType":"num","units":"Hour","payloadtype":"str","payloadval":"off","name":"","x":870,"y":880,"wires":[[],["38162556.423f1a","6dbfce8.2669d3"]]},{"id":"5385c400.9492fc","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"heat on","topic":"esp8266spa/heat","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":940,"y":740,"wires":[]},{"id":"c12e856f.81e7d8","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"heat off","topic":"esp8266spa/heat","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1020,"y":800,"wires":[]},{"id":"38162556.423f1a","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"pump off","topic":"esp8266spa/pump","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1080,"y":920,"wires":[]},{"id":"38e7d384.85367c","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"pump on","topic":"esp8266spa/pump","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":900,"y":940,"wires":[]},{"id":"adec415a.8d83b","type":"ui_button","z":"c2e87ad9.9a3fe8","d":true,"name":"warmup","group":"dc08521.6b0dab","order":4,"width":0,"height":0,"passthru":true,"label":"start warmup cycle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"on","payloadType":"str","topic":"esp8266spa/warm","x":380,"y":820,"wires":[["d76b9f01.261c6","322657f6.ba0458","be767c9a.79877","651a6b6e.3b0324"]]},{"id":"3182b549.e157ba","type":"function","z":"c2e87ad9.9a3fe8","name":"spa too hot","func":"if(msg.payload >= 104){\n   msg.payload = \"off\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":310,"y":1220,"wires":[["bc6abc40.4ba21"]]},{"id":"bc6abc40.4ba21","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"heat off","topic":"esp8266spa/heat","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":540,"y":1220,"wires":[]},{"id":"be767c9a.79877","type":"change","z":"c2e87ad9.9a3fe8","d":true,"name":"change topic uv","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp8266spa/uv' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1000,"wires":[["25cc1e57.4aae12","b0825884.35b3b8"]]},{"id":"b0825884.35b3b8","type":"stoptimer2","z":"c2e87ad9.9a3fe8","d":true,"duration":"2","durationType":"num","units":"Hour","payloadtype":"str","payloadval":"off","name":"","x":830,"y":1000,"wires":[[],["38e7f75c.1b0e48"]]},{"id":"25cc1e57.4aae12","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"uv on","topic":"esp8266spa/uv","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":730,"y":1080,"wires":[]},{"id":"38e7f75c.1b0e48","type":"mqtt out","z":"c2e87ad9.9a3fe8","d":true,"name":"uv off","topic":"esp8266spa/uv","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1030,"y":1020,"wires":[]},{"id":"624d7aff.6aed54","type":"function","z":"c2e87ad9.9a3fe8","name":"spa level too low","func":"if(msg.payload >= 15){\n   msg.payload = \"water too low in spa\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":450,"y":20,"wires":[["ae9e53e8.bb47b"]]},{"id":"ae9e53e8.bb47b","type":"delay","z":"c2e87ad9.9a3fe8","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":640,"y":60,"wires":[["f76c5d42.cbcb9"]]},{"id":"f893be68.894eb","type":"smooth","z":"c2e87ad9.9a3fe8","name":"","property":"payload","action":"low","count":"4","round":"0","mult":"single","reduce":false,"x":260,"y":60,"wires":[["624d7aff.6aed54"]]},{"id":"f76c5d42.cbcb9","type":"e-mail","z":"c2e87ad9.9a3fe8","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":820,"y":20,"wires":[]},{"id":"c1f43f9c.55c2a","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/pump","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":870,"y":320,"wires":[["4b18c302.ee06fc"]]},{"id":"bf0167b.c4ef998","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/uv","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":860,"y":440,"wires":[["b715ebaf.308e98"]]},{"id":"4b18c302.ee06fc","type":"ui_text","z":"c2e87ad9.9a3fe8","group":"965995d7.246998","order":2,"width":0,"height":0,"name":"main Pump","label":"main PUMP","format":"{{msg.payload}}","layout":"row-spread","x":1120,"y":320,"wires":[]},{"id":"2b7ecad8.0100c6","type":"ui_text","z":"c2e87ad9.9a3fe8","group":"965995d7.246998","order":1,"width":0,"height":0,"name":"Heat","label":"Heat","format":"{{msg.payload}}","layout":"row-spread","x":1120,"y":360,"wires":[]},{"id":"b715ebaf.308e98","type":"ui_text","z":"c2e87ad9.9a3fe8","group":"965995d7.246998","order":3,"width":0,"height":0,"name":"Uv","label":"Uv","format":"{{msg.payload}}","layout":"row-spread","x":1140,"y":400,"wires":[]},{"id":"64dfe7f2.043138","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/heat","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":850,"y":380,"wires":[["2b7ecad8.0100c6"]]},{"id":"651a6b6e.3b0324","type":"ui_text","z":"c2e87ad9.9a3fe8","d":true,"group":"965995d7.246998","order":3,"width":0,"height":0,"name":"Warmup","label":"Warmup Cycle On/Off","format":"{{msg.payload}}","layout":"row-spread","x":1100,"y":1200,"wires":[]},{"id":"42f21e87.2c33a","type":"change","z":"c2e87ad9.9a3fe8","name":"change topic clean cycle","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp8266spa/clean' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":640,"wires":[["37bf7a21.7678d6"]]},{"id":"37bf7a21.7678d6","type":"ui_text","z":"c2e87ad9.9a3fe8","group":"965995d7.246998","order":3,"width":0,"height":0,"name":"Clean cycle","label":"Clean Cycle On/Off","format":"{{msg.payload}}","layout":"row-spread","x":570,"y":640,"wires":[]},{"id":"6dbfce8.2669d3","type":"change","z":"c2e87ad9.9a3fe8","d":true,"name":"change topic warm","rules":[{"t":"set","p":"topic","pt":"msg","to":"'esp8266spa/warm' ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":860,"wires":[["28dd0234.4a5b7e"]]},{"id":"28dd0234.4a5b7e","type":"switch","z":"c2e87ad9.9a3fe8","d":true,"name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1380,"y":880,"wires":[["651a6b6e.3b0324"]]},{"id":"16d7c072.8b7b9","type":"ui_button","z":"c2e87ad9.9a3fe8","d":true,"name":"warmup off","group":"dc08521.6b0dab","order":4,"width":0,"height":0,"passthru":true,"label":"stop warmup cycle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"off","payloadType":"str","topic":"esp8266spa/warm","x":590,"y":700,"wires":[["c12e856f.81e7d8","38e7f75c.1b0e48","2c898025.da314"]]},{"id":"2c898025.da314","type":"delay","z":"c2e87ad9.9a3fe8","d":true,"name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":700,"wires":[["38162556.423f1a","6dbfce8.2669d3"]]},{"id":"d5b9bc13.95f57","type":"delay","z":"c2e87ad9.9a3fe8","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":420,"y":1400,"wires":[["784d58bb.6a99c8"]]},{"id":"784d58bb.6a99c8","type":"e-mail","z":"c2e87ad9.9a3fe8","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":560,"y":1460,"wires":[]},{"id":"bf99ae25.1a9f2","type":"function","z":"c2e87ad9.9a3fe8","name":"spa just right hot","func":"if(msg.payload >= 103){\n   msg.payload = \"water temp in hot tub is 103\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":320,"y":1320,"wires":[["d5b9bc13.95f57"]]},{"id":"35eb12e7.97397e","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/solartemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":140,"y":1600,"wires":[["771b169a.be1128","4844112a.fdaaa","9ad07fc5.02808"]]},{"id":"771b169a.be1128","type":"ui_gauge","z":"c2e87ad9.9a3fe8","name":"solar panel water Temparature","group":"dc08521.6b0dab","order":0,"width":0,"height":0,"gtype":"gage","title":"solar temperature","label":" ° F","format":"{{value}}","min":"50","max":"130","colors":["#00b500","#e6e600","#ca3838"],"seg1":"80","seg2":"102","x":390,"y":1560,"wires":[]},{"id":"4844112a.fdaaa","type":"ui_chart","z":"c2e87ad9.9a3fe8","name":"Solar  Temp","group":"70c44ff3.93741","order":2,"width":0,"height":0,"label":"solar panel temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"60","ymax":"108","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":580,"y":1620,"wires":[[]]},{"id":"8ce940d8.6c82d","type":"function","z":"c2e87ad9.9a3fe8","name":"esp8266spa/spatemp","func":"msg.payload=Number(msg.payload);\nmsg.topic = \"esp8266spa/spatemp\";\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":1160,"wires":[["b5a2acc.f03905"]]},{"id":"9ad07fc5.02808","type":"function","z":"c2e87ad9.9a3fe8","name":"esp8266spa/solartemp","func":"msg.payload=Number(msg.payload);\nmsg.topic = \"esp8266spa/solartemp\";\nreturn msg;","outputs":1,"noerr":0,"x":360,"y":1520,"wires":[["b5a2acc.f03905"]]},{"id":"b5a2acc.f03905","type":"function","z":"c2e87ad9.9a3fe8","name":"Comparatore","func":"// this is passed a payload which is an object with\n// properties outside_temp and inside_temp\n\ncontext.set(msg.topic,msg.payload);\n\nvar solartemp = context.get(\"esp8266spa/solartemp\") || 0;\nvar spatemp = context.get(\"esp8266spa/spatemp\") || 0;\n\nnode.warn(\"Solar \" + solartemp);\nnode.warn(\"Spa   \" + spatemp);\n\n\n\nif (solartemp > (spatemp+10)) {\n    msg.payload = \"on\";\n} else\n{\n    msg.payload = \"off\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":1480,"wires":[["911db7aa.710c58"]]},{"id":"911db7aa.710c58","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"turn on pump","topic":"esp8266spa/solon","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1170,"y":1600,"wires":[]},{"id":"f53617c9.55f378","type":"mqtt in","z":"c2e87ad9.9a3fe8","name":"","topic":"esp8266spa/solon","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":870,"y":500,"wires":[["4bfbd7eb.d5b758"]]},{"id":"4bfbd7eb.d5b758","type":"ui_text","z":"c2e87ad9.9a3fe8","group":"965995d7.246998","order":2,"width":0,"height":0,"name":"solar pump","label":"Solar PUMP","format":"{{msg.payload}}","layout":"row-spread","x":1120,"y":500,"wires":[]},{"id":"b01132f1.217f9","type":"ui_switch","z":"c2e87ad9.9a3fe8","name":"sol pump","label":"solar PUMP","tooltip":"","group":"965995d7.246998","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"esp8266spa/solon","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":840,"y":280,"wires":[["2de15508.c97c9a"]]},{"id":"2de15508.c97c9a","type":"mqtt out","z":"c2e87ad9.9a3fe8","name":"","topic":"","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1020,"y":280,"wires":[]},{"id":"b5060a91.7fd078","type":"link out","z":"c2e87ad9.9a3fe8","name":"link from spatemp","links":["94aadfe7.528e6"],"x":440,"y":360,"wires":[]},{"id":"94aadfe7.528e6","type":"link in","z":"c2e87ad9.9a3fe8","name":"","links":["b5060a91.7fd078"],"x":120,"y":1120,"wires":[["3182b549.e157ba","bf99ae25.1a9f2","8ce940d8.6c82d"]]},{"id":"562eb1ef.1c2f1","type":"mqtt-broker","z":"","name":"","broker":"192.168.250.8","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"dc08521.6b0dab","type":"ui_group","z":"","name":"spa summerize","tab":"586d995e.971c58","order":1,"disp":true,"width":"6","collapse":false},{"id":"70c44ff3.93741","type":"ui_group","z":"","name":"sensors","tab":"586d995e.971c58","order":2,"disp":true,"width":"6","collapse":false},{"id":"965995d7.246998","type":"ui_group","z":"","name":"Diagnostics","tab":"586d995e.971c58","order":3,"disp":true,"width":"6","collapse":false},{"id":"586d995e.971c58","type":"ui_tab","z":"","name":"esp8266spa","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

Would you mind looking at this one to see if I have an obvious looping error.
And thanks so much for your help

Hi Steve,
Did that for my other flow and there is one node sending 2 msg every second ..... function node named comparatore.

Hi Steve, disabled the node named comparatore and now the latency dissapeared..... so this node must have any issue. I will spend some time looking at it.

Could you have a look at that node to see if you see anything.
Like the debug trick ..... good troubleshooting technique.... at least I am learning

Thanks
Troy

You should be able to see from the debug what topic is being published too often. The topic is shown in the first line of each debug output.

Hi Colin,
would you mind looking at the node in this part of my flow.

I disabled the node " comparatore" and the latency was back to what I thought was normal.

I cant see what it is doing that would cause the latency to increase to over 15 seconds when it is enabled.

this is also a node someone helped me with so I dont fully understand what it is doing.
Troy

[{"id":"b54671ec.cdd17","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"715025ca.d83d0c","type":"function","z":"b54671ec.cdd17","name":"spa too hot","func":"if(msg.payload >= 104){\n   msg.payload = \"off\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":350,"y":200,"wires":[["704f387.1e866c8","7e694490.d378ac"]]},{"id":"704f387.1e866c8","type":"mqtt out","z":"b54671ec.cdd17","name":"heat off","topic":"esp8266spa/heat","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":580,"y":200,"wires":[]},{"id":"918729d0.160228","type":"delay","z":"b54671ec.cdd17","name":"email limit","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":460,"y":380,"wires":[["96e9be01.3d749"]]},{"id":"96e9be01.3d749","type":"e-mail","z":"b54671ec.cdd17","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"troypearce@gmail.com","dname":"email to noderedpearc","x":600,"y":320,"wires":[]},{"id":"bb915f7a.4404e","type":"function","z":"b54671ec.cdd17","name":"spa just right hot","func":"if(msg.payload >= 103){\n   msg.payload = \"water temp in hot tub is 103\";\n\nreturn msg;\n}","outputs":1,"noerr":0,"x":360,"y":300,"wires":[["918729d0.160228"]]},{"id":"5df1c2e1.b4784c","type":"mqtt in","z":"b54671ec.cdd17","name":"","topic":"esp8266spa/solartemp","qos":"2","datatype":"auto","broker":"562eb1ef.1c2f1","x":220,"y":540,"wires":[["7c35c735.2e1d48","91dfbb60.a57cd8","ecbd7c70.e82ef","64bdb8b1.d13748"]]},{"id":"7c35c735.2e1d48","type":"ui_gauge","z":"b54671ec.cdd17","name":"solar panel water Temparature","group":"dc08521.6b0dab","order":0,"width":0,"height":0,"gtype":"gage","title":"solar temperature","label":" ° F","format":"{{value}}","min":"50","max":"130","colors":["#00b500","#e6e600","#ca3838"],"seg1":"80","seg2":"102","x":470,"y":500,"wires":[]},{"id":"91dfbb60.a57cd8","type":"ui_chart","z":"b54671ec.cdd17","name":"Solar  Temp","group":"70c44ff3.93741","order":2,"width":0,"height":0,"label":"solar panel temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"60","ymax":"108","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":630,"y":560,"wires":[[]]},{"id":"4508db52.809ac4","type":"function","z":"b54671ec.cdd17","name":"esp8266spa/spatemp","func":"msg.payload=Number(msg.payload);\nmsg.topic = \"esp8266spa/spatemp\";\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":140,"wires":[["61c0cb91.88afd4"]]},{"id":"ecbd7c70.e82ef","type":"function","z":"b54671ec.cdd17","name":"esp8266spa/solartemp","func":"msg.payload=Number(msg.payload);\nmsg.topic = \"esp8266spa/solartemp\";\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":460,"wires":[["61c0cb91.88afd4"]]},{"id":"61c0cb91.88afd4","type":"function","z":"b54671ec.cdd17","d":true,"name":"Comparatore","func":"// this is passed a payload which is an object with\n// properties outside_temp and inside_temp\n\ncontext.set(msg.topic,msg.payload);\n\nvar solartemp = context.get(\"esp8266spa/solartemp\") || 0;\nvar spatemp = context.get(\"esp8266spa/spatemp\") || 0;\n\nnode.warn(\"Solar \" + solartemp);\nnode.warn(\"Spa   \" + spatemp);\n\n\n\nif (solartemp > (spatemp+10)) {\n    msg.payload = \"on\";\n} else\n{\n    msg.payload = \"off\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":400,"wires":[["740fb7f3.707da8","4175d8b8.00dde8"]]},{"id":"740fb7f3.707da8","type":"mqtt out","z":"b54671ec.cdd17","name":"turn on pump","topic":"esp8266spa/solon","qos":"","retain":"","broker":"562eb1ef.1c2f1","x":1250,"y":440,"wires":[]},{"id":"424e18af.c08e48","type":"link in","z":"b54671ec.cdd17","name":"","links":["b5060a91.7fd078"],"x":160,"y":100,"wires":[["715025ca.d83d0c","bb915f7a.4404e","4508db52.809ac4"]]},{"id":"7e694490.d378ac","type":"debug","z":"b54671ec.cdd17","name":"55","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":570,"y":260,"wires":[]},{"id":"64bdb8b1.d13748","type":"debug","z":"b54671ec.cdd17","name":"56","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":330,"y":600,"wires":[]},{"id":"4175d8b8.00dde8","type":"debug","z":"b54671ec.cdd17","name":"57","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1230,"y":380,"wires":[]},{"id":"562eb1ef.1c2f1","type":"mqtt-broker","z":"","name":"","broker":"192.168.250.8","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"dc08521.6b0dab","type":"ui_group","z":"","name":"spa summerize","tab":"586d995e.971c58","order":1,"disp":true,"width":"6","collapse":false},{"id":"70c44ff3.93741","type":"ui_group","z":"","name":"sensors","tab":"586d995e.971c58","order":2,"disp":true,"width":"6","collapse":false},{"id":"586d995e.971c58","type":"ui_tab","z":"","name":"esp8266spa","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

You have used the wrong button for formatting the flow, but assuming it is the same comparateur function as in an earlier flow then it is not that directly causing the problem. If you re-enable it and subscribe to just its topic how often does it publish? It will publish once for each input, so you could see what is going into it and see how often they are.
Does anything subscribe to the topic that node publishes to?

Hi Colin,
Again I am having some difficulty with nomenclature.... When I look at that particular node it is comparing two temp probe outputs.... so it is subscribing to esp8266spa/solar temp and to esp8266spa/spatemp comparing the two and if solar temp is ten degrees more than spatemp it passes a payload "on" otherwise it passes a payload "off".
The next node is an mqtt which applies this payload to esp8266spa/solon which is subscribed to by the client and turns the solar pump on to circulate the water hotter than the spa water.

I am not sure if this means that "anything subscribes to the topioc the node pushes to" The client does subscribe to solon which is how the relay gets activated (i think) so kinda lost here.

But figured if the latency problem goes away when I disable this node it must have something to do with the issue? just not sure how...... I am missing something I think at least in my knowledge or logic.

Troy

I meant is anything in node-red subscribing to it so there might be a hidden loop somewhere. Disabling that node breaks the flow, but the problem might be on one of its inputs. You could try disabling the nodes feeding it.
You said that node is subscribing to the temp probes, it isn't, only MQTT In nodes subscribe to things. They pass on the messages they receive.
Add a debug node subscribing to esp8266spa/solon, feed it into a debug and see how often the comparateur node is sending an output. Presumably you know how often the temperature probes are sampled and the comparateur node run once for each time either of those samples.
In fact I assume that for long periods of time the value published to esp8266spa/solon will be the same, so it would probably be a good idea to put an RBE node in the output of the comparateur so it only sends on change. Indeed that might fix it.

Hi Colin,
Ok I need to break this down some.

I have already surrounded all mqtt nodes with debugs (includes the spatemp and solartemp inputs. They cycle on 1 second intervals which is controlled in the code for the client..... i can make the interval longer in the client if necessary or use a rbe node to limit it to only data that changes.... i think i understand that.

If I disable any of the nodes in the flow it breaks the flow and therefore stops the latency problem but does little for me that I understand how to fix the problem.

so for my thinking disabling any part of the flow interrupts the flow and therefore and the latency problem goes away.

so the debugs at the mqtt input nodes show the msg every second the function node comparatore compared those inputs and output to a mqtt output node and the debug at that node show a msg that in turn show a frequency of 1 msg a second.

I also see the comparatore function node outputting in the debug window that shows orange and has "function :(warn) on it with " Solar 68" and the next debug window msg show "Spa 69" and both of these cycle every second as well.

so not sure what this all means and even not sure I answered the questions you asked in the last message.

I know I have something wrong but still confused about what it could be.

Thanks again for all of the newbie help and hopefully I am not too frustrating.
Troy

I thought you said that when you added an MQTT node subscribed to # that it showed more mqtt traffic than you expected, is that so?

yep but without any experience of how much is a lot.

since our last email I added an rbe node after the comparatore function node in the esp8266spa flow and it seems to have restored what seems like normal latency. the rbe node mode is set to block unless value changes... so my guess is that this function was flooding the server with messages.

Again not saying I know exactly what it was doing but without the rbe node it took more than 30 seconds to have a switch node actually trip the relay to turn off or on.

I also changed a delay from 1 to 10 seconds on the esp8266spa client so traffic now seems much less.

My guess again in ignorance is that sending messages every second for the input sensors is more than my set up likes and may have been causing problems..... I also would think that I should add an rbe node to all of my flow sections that take in sensor inputs?

I guess if this all is true there is a threshold for how often I need or can even have sensor updates without causing problems and probably the more flows and nodes I have the longer the update should be to limit traffic which seems what the RBE node is designed to do?

Again not sure my problems are all taken care of but at least the time between manually pressing the switch on the dashboard and seeing it trip the relay is not so long that it really confuses troubleshooting.
Now I hit the switch and about 12 seconds go by till the relay is switched.... (the client cycles about every 11 seconds due to delay of 10 seconds in the client programming.

Still really not sure of all of this... does it hold together logically or am I way off base?

Really appreciate your help
Troy