Slow... (Everything)

I am working on a set of flows for an escape room controller dashboard, and I am noticing that as I edit nodes and redeploy through the day, the response keeps getting slower and slower until just double-clicking on a node to edit it takes 5 to 10 seconds just to open the node edit. And deploy takes up to a minute. Even MQTT nodes are taking seconds to respond to a published message.

Then, I reboot the Pi3 that is running Node Red and things are again normal.

I've gone through the "slow checklist": I've disabled all not-needed nodes, made certain there were no button loops, no graphs, nothing I am aware of that would make Node-Red run slow.

When Node-Red was running at its slowest, I ran top on the Raspberry Pi and was surprised to see Node-Red was running at 103% to 120% of CPU. I reboot, run top again, and now Node-Red is running 4 to 8% of CPU. And snappy as ever.

What could cause Node-Red to accumulate so much of the CPU time over a day of editing and deploying?

Alas I have been down this road many times.

Sorry, but the best I can say at this point is: You have a runaway loop.

Suggestions in finding/fixing:

Start node-red in safe mode.
node-red --safe

Look for any obvious loops and delete a wire that makes them a loop.
Add a comment node to remind you.

Do that as much as possible everywhere.

When done: DEPLOY.

See what happens.

If it fixes it, you are in luck and have found (or at least) stopped the runaway loop.

A bit of code I use to help with them is this:

(External nodes needed.)

[{"id":"a4a046d8.b4c9e8","type":"msg-speed","z":"381d953d.4cf092","name":"Speed check","frequency":"sec","estimation":false,"ignore":false,"x":3680,"y":210,"wires":[["a585a2e7.71a168"],[]]},{"id":"a585a2e7.71a168","type":"switch","z":"381d953d.4cf092","name":"> 30","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"30","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":3700,"y":140,"wires":[["e57b10e5.ddd668"]]},{"id":"e57b10e5.ddd668","type":"change","z":"381d953d.4cf092","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"CONTROL","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":3860,"y":140,"wires":[["3643459c.ddfa9a","c313cb61.5273a8"]]},{"id":"f554dc97.7f425","type":"inject","z":"381d953d.4cf092","name":"Stop","topic":"control","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":3860,"y":180,"wires":[["3643459c.ddfa9a"]],"icon":"node-red/alert.png"},{"id":"c816aa9.51237d8","type":"inject","z":"381d953d.4cf092","name":"Go","topic":"control","payload":"go","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"1","x":3860,"y":220,"wires":[["3643459c.ddfa9a"]]},{"id":"3643459c.ddfa9a","type":"gate","z":"381d953d.4cf092","name":"","controlTopic":"control","defaultState":"open","openCmd":"go","closeCmd":"stop","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":4035,"y":259,"wires":[["3bd612ac.533dde"]]}]

node-red-contrib-msg-speed
node-red-contrib-simple-gate

This is an example how I use it:

Putting aside where it is:

If catch all is getting too many messages coming out, speed check output goes > 30.
That then makes a message with STOP (topic: CONTROL) which is sent to the gate node and it closes (or stops) the messages getting through. Thus preventing 104% CPU load.

Hope that helps.

Thanks. you may be on to something. I have few loops in any of my flows, but it can't hurt to disable those flows to test.

Four hours after my last reboot, and only doing a couple of deploys, and according to top, my Node-Red is once again running 124% of the CPU.

I'll post my results.

I would suggest - at your choice - get those two nodes in your system then import the code I showed you.

Put that in all the loops, rather than just cutting them.

Use those nodes everywhere and then deploy.

The ones which are getting away on you will trip their gate nodes and it will be easy to see who is causing the problems.

Then comes the pain of actually looking at the problem.

But if you add that in them all, it will really help.

Thanks, I will use your debugging flow. (As soon as I identify my loops). I have a couple of dozen flows on this Node-Red server and on further examination, I am not finding any loops yet. Most of them are MQTT or Alaxa-in and do something discrete out, such as publish an MQTT message or change an indicator on the Dashboard.

I'll look at the flows that have switches that get their input from an MQTT-in node.

Steve

Errr,
That flow is to help you find the loops.

It won't fix anything.

It just helps you catch them before they lock up the CPU and you have to restart Node-Red.

Put them throughout the flow.

Look for the ones that are tipping quickly. They may be the problems.

Are you interfacing with any external hardware? Sensors and so on.

Where are you editing the flows - on a browser on the pi or a browser on a pc?

The browser is a very heavy bit of software to run on a pi and will only make the situation worse. If your pi is networked, you'd be far better off accessing the node-red editor via the pi IP address on a beefier machine (if you aren't already)

Could that cause node-red to show as hogging the processor in top? I would have expected that to show in browser processes.

I agree it may not be the cause but there is only a finite amount of processing power and it will amplify any issue.

@SteveMann when you deploy, which type o deploy are you doing? Full, Modified Flows or Modified Nodes?
Screen Shot 2020-07-28 at 5.46.34 AM

Are you willing to share your flows so other eyes can take a look?

The Pi3 running Node Red is only running Node-Red and Mosquitto Broker. There is no external hardware other than a USB thumbdrive for backups.

The Pi is headless. All editing and dashboard interface is done on the local network.

Full. When I deploy using modifies qualifier, it makes little difference in the deploy time.

When you do a 'Full' deploy, it stop all flows and restarts tehn. this means inject nodescould refire, context variables will be reset and flow and global variables could be reset (if they aren't persistent)

Using 'Modified Flows' is much faster, but that's another story

Again sharing your flow might get some eyes to look at it and see if they can spot anything

The slowness is cumulative. It is subtle. I have disabled every flow but the one I am working on and monitoring top at the same time. As I edit and deploy, the %CPU creeps up a bit. When I started this morning the %CPU was bouncing from 20-30%. After about ten edits and deploys, it is hovering around 50%. Yesterday at the end of the day it was 90-110% until I rebooted, then it went back to 20-30%. When I let the flows run with no editing taking place the %CPU doesn't creep up. It is only editing and deploying that seems to effect the increased %CPU.

While I do appreciate the responses, If I am the only one observing this, then let's not pursue it further.

I can't post the whole flow. "Body is limited to 32000 characters; you entered 49170" (That's the first time I saw this warning from the forum).

I first noticed the issue when the change node labeled "change 91 rules" was edited. (In fact, yesterday when I first detected the slowdown, I was adding a lot of those 91 rules to the node).

Here are the nodes where the 91 rule change node appears.

[{"id":"6c6e8a16.d11ee4","type":"ui_text","z":"93a8305d.e7f44","group":"c59073b4.4e6a4","order":2,"width":0,"height":0,"name":"Phone Number","label":"Phone Number:","format":"{{msg.payload}}","layout":"row-left","x":840,"y":3080,"wires":[]},{"id":"57ca3da4.384c74","type":"mqtt in","z":"93a8305d.e7f44","name":"","topic":"telephone/incoming","qos":"2","broker":"e10f2568.ba40c8","x":170,"y":3020,"wires":[["ecda6eee.49bdf","6c6e8a16.d11ee4","cd8c048d.144848"]]},{"id":"f9ffbef0.c80c2","type":"inject","z":"93a8305d.e7f44","name":"Startup","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"x":120,"y":3160,"wires":[["5cd3a332.b7809c","e07f5ffb.96e9b"]]},{"id":"9b437028.e313","type":"ui_text","z":"93a8305d.e7f44","group":"c59073b4.4e6a4","order":4,"width":0,"height":0,"name":"Message","label":"Message:","format":"{{msg.payload}}","layout":"row-left","x":800,"y":3040,"wires":[]},{"id":"ecda6eee.49bdf","type":"change","z":"93a8305d.e7f44","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"2538503298","fromt":"str","to":"The person you are calling knows you are waiting. Please hold the line.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7494416","fromt":"str","to":"Your call is important, plus music for four minutes.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"8352281","fromt":"str","to":"Hey Eddie – I am glad you called.  Remember that sweet little Beetle you had your eye on?  I am sorry to tell you that it was stolen!  But listen – I have got lots of other used cars you might be interested in.  Come on down.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7425125","fromt":"str","to":"Oh hi Eddie..  You asked to let you know if I noticed anything out of the ordinary.  Well there was this one man that called recently looking for a room.  I told him that we were full except for a room that had a small child’s bed.  And then he said the strangest thing, “don’t worry it's perfect for me.”  I’m not sure if this will help but I thought I would let you know.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"8962788","fromt":"str","to":"Oh Mr. Valiant, I’m so glad you called.  I’m happy to accept your job offer; I think that working for a P.I. will be so exciting.  ...","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"8732679","fromt":"str","to":"You wanted to talk to Daisy?  Well you can’t. She’s out with her stupid boyfriend again.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7496035","fromt":"str","to":"Oh I’m sorry Mr. Valiant.  I can’t take the job.  I’m getting married and my husband won’t want me to work.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7497658","fromt":"str","to":"The person you are trying to reach is not accepting calls at this time, please try your call again later.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"8462616","fromt":"str","to":"I’m sorry Mr. Valiant but I just got a different job.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"9821054","fromt":"str","to":"Thank you for calling the Baltimore automated tip line. If this tip results in an arrest, you will be contacted with information to collect your reward.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"9821045","fromt":"str","to":"Thank you for calling the Baltimore automated tip line. If this tip results in an arrest, you will be contacted with information to collect your reward.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7494392","fromt":"str","to":"Thank you for calliing… with music.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7422512","fromt":"str","to":"The time alloted for you to dial has been exceeded","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7493143","fromt":"str","to":"Thank you for calling, we are closed for the holidays. Please try again on the next business day.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7495159","fromt":"str","to":"Due to the earthquake in the area you are calling, your call cannot be completed at this time. Please try your call later.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7426591","fromt":"str","to":"Listen bud. You better stop calling Amy. She is my girl, so back off.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7496372","fromt":"str","to":"Alexander's Music Shop. We cater to the disabled. Our hours are by appointment only.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7497126","fromt":"str","to":"Busy Signal","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"725611","fromt":"str","to":"Lawson Brothers Cleaners. Oh, it's you Eddie.  Listen you asked me to be on the lookout for suspicious characters. Well, this one guy came in and his clothes were just covered with animal fur. This might be normal out in the country, but I thought it was a bit strange in the city.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"7672676","fromt":"str","to":"Time Service (POPCORN)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"801","fromt":"str","to":"Oh,,, there you are!  This is Jessica Rabbit and my poor sweet Roger has been kidnapped. ...","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"802","fromt":"str","to":"Thank you. Your tip led the police to,  Roger and he is safe. The kidnappers are in custody. Eddie, put the reward in his safe. The combination is,,21-23-33.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"803","fromt":"str","to":"Hey Eddie – I am glad you called.  Remember that sweet little Beetle you had your eye on?  I am sorry to tell you that it was stolen!  But listen – I have got lots of other used cars you might be interested in.  Come on down.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"804","fromt":"str","to":"Oh hi Eddie..  You asked to let you know if I noticed anything out of the ordinary.  Well there was this one man that called recently looking for a room.  I told him that we were full except for a room that had a small child’s bed.  And then he said the strangest thing, “don’t worry it's perfect for me.”  I’m not sure if this will help but I thought I would let you know.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"805","fromt":"str","to":"Hi Eddie, this is Clara from the Greenway Inn. Remember that strange call I got about a room?  Well when he came to pick up the key I noticed that he had a woman with him.  I’m not sure how she will fit in that child’s bed – but he certainly will.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"806","fromt":"str","to":"Lawson Brothers cleaners.  Oh it’s you Eddie.  Listen you asked me to be on the lookout for suspicious characters. ...","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"807","fromt":"str","to":"Oh Mr. Valiant, I’m so glad you called.  I’m happy to accept your job offer; I think that working for a P.I. will be so exciting.  ...","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"808","fromt":"str","to":"You wanted to talk to Daisy?  Well you can’t. She’s out with her stupid boyfriend again.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"809","fromt":"str","to":"Oh I’m sorry Mr. Valiant.  I can’t take the job.  I’m getting married and my husband won’t want me to work.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"810","fromt":"str","to":"I’m sorry Mr. Valiant but I just got a different job.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"812","fromt":"str","to":"Listen bud.  You better stop calling Amy.  She is my, girl, so back. off.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"813","fromt":"str","to":"Thank you for calling the Baltimore automated tip line. If this tip results in an arrest, you will be contacted with information to collect your reward.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"814","fromt":"str","to":"Alexander's Music Shop. We cater to the disabled. Our hours are by appointment only.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"815","fromt":"str","to":"Perhaps we can frighten away the ghost of so many years ago with a little illumination.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"816","fromt":"str","to":"Sometimes the written word can leave  quite an impression","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"817","fromt":"str","to":"Eddie wants the car of the month.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"818","fromt":"str","to":"Giving this clue is the Highlight of my day.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"820","fromt":"str","to":"Try to shed some illumination on the problem.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"821","fromt":"str","to":"I don't really like that lampshade","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"822","fromt":"str","to":"Sometimes the written word leaves quite an impression","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"823","fromt":"str","to":"Rubbing a pencil can bring out the ghost of the previous message.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"824","fromt":"str","to":"Be sure to check the pockets before taking in your dry cleaning","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"825","fromt":"str","to":"Now, is everything in it's correct place?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"826","fromt":"str","to":"Look at the photo.  Now look at the desk.  Is everything in its place?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"827","fromt":"str","to":"You should really check the time.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"828","fromt":"str","to":"Have you examined the clock?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"829","fromt":"str","to":"Does Eddie have any good music?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"830","fromt":"str","to":"Does Eddie have anything for kids to play with?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"831","fromt":"str","to":"Is there a primer for Braille in the room?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"832","fromt":"str","to":"Eddie really needs a new assistant.  I wonder if he has any candidates.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"833","fromt":"str","to":"Has Eddie hired a new assistant yet?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"834","fromt":"str","to":"Eddie will only hire an assistant with perfect stenography skills.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"835","fromt":"str","to":"Every map has a grid on it.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"836","fromt":"str","to":"All potential get-away locations have been circled.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"837","fromt":"str","to":"What are the grid coordinates of the location Eddie was taken to?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"838","fromt":"str","to":"Eddie is so proud of his education.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"839","fromt":"str","to":"Phone numbers are everywhere if you only look.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"840","fromt":"str","to":"I wonder which month featured Eddie's favorite car","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"841","fromt":"str","to":"I think that flashlights run on batteries","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"842","fromt":"str","to":"Everything you need is in this room","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"843","fromt":"str","to":"The binoculars are not only for bird watching","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"844","fromt":"str","to":"Are you sure that you have found the entire route?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"845","fromt":"str","to":"Maybe the highway signs will help you find the route taken to the location where Eddie is hidden.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"846","fromt":"str","to":"You might need to start where Roger was kidnapped","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"847","fromt":"str","to":"Did anyone mention that some roads are hard to follow?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"848","fromt":"str","to":"Every child learns how to dial a phone","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"849","fromt":"str","to":"Please check your mail.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"850","fromt":"str","to":"If I were a wall safe, where would I be?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"851","fromt":"str","to":"Can you eliminate any suspects using  the clues you have?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"852","fromt":"str","to":"I wonder if there is anything on that tape?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"853","fromt":"str","to":"It's not a bug, It's a feature.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"854","fromt":"str","to":"Bluto was on the right track.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"855","fromt":"str","to":"Silent treatment? Dial again.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"856","fromt":"str","to":"Dial the number again.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"857","fromt":"str","to":"How many batteries does a flashlight use?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"858","fromt":"str","to":"Please redial the number again","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"859","fromt":"str","to":"It's Eddies safe. Where do you think it would be?","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"860","fromt":"str","to":"Bluto broke the chalkboard","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"861","fromt":"str","to":"Take the monkey off the shelf, then put it back.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"311","fromt":"str","to":"Time service (POPCORN)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"411","fromt":"str","to":"What? It's nineteen-sixty. Four-one-one Directory Service doesn't exist yet. If you need help, that's what the telephone operators are there for. Hang up and call your local telephone company operator. Thank you for being a loyal customer. Good-bye.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"911","fromt":"str","to":"What? It's nineteen-sixty. Nine-one-one Emergency Service doesn't exist yet. If you need help, hang up the phone, open a window and yell, \"help\". Thank you for being a loyal customer. Good-bye.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"08","fromt":"str","to":"The person you are trying to reach is not accepting calls at this time, please try your call again later. Message 24, SQ1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"19","fromt":"str","to":"Your call is important, plus music for four minutes.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"20","fromt":"str","to":"Busy Signal","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"52","fromt":"str","to":"The time alloted for you to dial has been exceeded","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"25","fromt":"str","to":"Thank you for calling, we are closed for the holidays. Please try again on the next business day.  312, 8L","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"26","fromt":"str","to":"Due to the earthquake in the area you are calling, your call cannot be completed at this time. Please try your call later. 0922","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"41","fromt":"str","to":"The person you are calling knows you are waiting. Please hold the line.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"65","fromt":"str","to":"Thank you for calliing… with music.","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"str","to":"Giving up so easily? We will call you back with a clue.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":3000,"wires":[["9b437028.e313"]]},{"id":"49cc3ec6.2a9c7","type":"mqtt in","z":"93a8305d.e7f44","name":"","topic":"telephone/numberDialed","qos":"2","broker":"e10f2568.ba40c8","x":150,"y":3080,"wires":[["6c6e8a16.d11ee4","ecda6eee.49bdf","cd8c048d.144848"]]},{"id":"db968218.c7d3f","type":"ui_button","z":"93a8305d.e7f44","name":"Hang Up","group":"c68765a0.0d8b28","order":1,"width":0,"height":0,"passthru":false,"label":"Hang Up","color":"Black","bgcolor":"Yellow","icon":"","payload":"hangup","payloadType":"str","topic":"telephone/incoming","x":120,"y":3320,"wires":[["17fee010.2f887","5be4c969.7904e8"]]},{"id":"17fee010.2f887","type":"mqtt out","z":"93a8305d.e7f44","name":"","topic":"telephone/cmnd","qos":"","retain":"","broker":"e10f2568.ba40c8","x":380,"y":3340,"wires":[]},{"id":"5be4c969.7904e8","type":"change","z":"93a8305d.e7f44","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[Hang Up]","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":3300,"wires":[["9b437028.e313"]]},{"id":"73a79a4d.419904","type":"ui_text","z":"93a8305d.e7f44","group":"c59073b4.4e6a4","order":3,"width":0,"height":0,"name":"Code","label":"Code:","format":"{{msg.payload}}","layout":"row-left","x":770,"y":3000,"wires":[]},{"id":"cd8c048d.144848","type":"function","z":"93a8305d.e7f44","name":"Change phone numbers to a code","func":"//Change phone numbers to the code\nvar phone=msg.payload;\nvar code=\"...\";\n\nif (phone==\"8352281\")\n{\n    code=\"803\";\n}\n\nif (phone==\"7425125\")\n{\n    code=\"804\";\n}\n\nif (phone==\"725611\")\n{\n    code=\"806\";\n}\n\nif (phone==\"8962788\")\n{\n    code=\"807\";\n}\n\nif (phone==\"9821054\")\n{\n    code=\"813\";\n}\n\nif (phone==\"9821045\")\n{\n    code=\"813\";\n}\n\nif (phone==\"7672676\")\n{\n    code=\"311\";\n}\n\nmsg.payload=code;\nreturn msg;\n","outputs":1,"noerr":0,"x":480,"y":2960,"wires":[["73a79a4d.419904"]]},{"id":"5cd3a332.b7809c","type":"change","z":"93a8305d.e7f44","name":"Set msg=blank","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":3160,"wires":[["6c6e8a16.d11ee4","73a79a4d.419904","9b437028.e313"]]},{"id":"5068dec6.d457e","type":"ui_button","z":"93a8305d.e7f44","name":"Reset","group":"81c69206.6d6a6","order":1,"width":0,"height":0,"passthru":false,"label":"Reset","color":"Black","bgcolor":"pink","icon":"","payload":"3600000","payloadType":"str","topic":"monkey/t","x":130,"y":3460,"wires":[["2d2c598a.740256","c7cbdfbb.bdbf7"]]},{"id":"2d2c598a.740256","type":"change","z":"93a8305d.e7f44","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[Drawer Time=1-hour]","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":3460,"wires":[["9b437028.e313"]]},{"id":"b73b10b8.c29f5","type":"comment","z":"93a8305d.e7f44","name":"=== Drawer ===","info":"","x":100,"y":3420,"wires":[]},{"id":"7c264dda.db2634","type":"ui_button","z":"93a8305d.e7f44","name":"Drawer Unlock","group":"81c69206.6d6a6","order":3,"width":0,"height":0,"passthru":false,"label":"Unlock","color":"Black","bgcolor":"pink","icon":"","payload":"unlock","payloadType":"str","topic":"monkey/cmnd","x":100,"y":3500,"wires":[["c7cbdfbb.bdbf7"]]},{"id":"93ee0b44.d0d828","type":"ui_button","z":"93a8305d.e7f44","name":"Drawer Lock","group":"81c69206.6d6a6","order":2,"width":0,"height":0,"passthru":false,"label":"Lock","color":"Black","bgcolor":"pink","icon":"","payload":"lock","payloadType":"str","topic":"monkey/cmnd","x":110,"y":3540,"wires":[["c7cbdfbb.bdbf7"]]},{"id":"c7cbdfbb.bdbf7","type":"link out","z":"93a8305d.e7f44","name":"","links":["acd5db29.c0ed88"],"x":395,"y":3540,"wires":[]},{"id":"e07f5ffb.96e9b","type":"function","z":"93a8305d.e7f44","name":"Init timer","func":"flow.set(\"GameTime\",0);\nreturn;","outputs":1,"noerr":0,"x":360,"y":3200,"wires":[[]]},{"id":"c59073b4.4e6a4","type":"ui_group","z":"","name":"Message","tab":"7ff14e1a.f74df","order":1,"disp":false,"width":"18"},{"id":"e10f2568.ba40c8","type":"mqtt-broker","z":null,"broker":"192.168.1.124","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"c68765a0.0d8b28","type":"ui_group","z":"","name":"Incoming","tab":"7ff14e1a.f74df","order":4,"disp":true,"width":"1"},{"id":"81c69206.6d6a6","type":"ui_group","z":"","name":"Drawer","tab":"7ff14e1a.f74df","order":3,"disp":true,"width":"1"},{"id":"7ff14e1a.f74df","type":"ui_tab","z":"","name":"Game","icon":"dashboard","order":1}]

I see notheing in that flow tthat would be a problem in and of itself. But what about the link node and the mqtt-out? could one of thse be causing a loop?

What happens if you disable them?

There are 80 buttons on the dashboard and they simply publish a message to a prop telephone. The message is a code for a sound file. there is no feedback from the phone. It's a publish and forget.

I use the link nodes to keep from getting an indecipherable rats nest of connections.

Could you start node-red in a terminal and post the terminal output please. That may tell us something useful. Or it may not.