If you assume that everything you’ve listed is working, then the easiest test is either a multimeter. You are looking to see if 12V appears on the pin pair when you execute an M106 P2 and disappears with an M107 P2. If you don’t have a multimeter, you can plug most lower current, 12V items into the fan plugs to test with a M106…a 12V fan for example.
If you have a commercial IoT relay, then they take input from 3V to 48V (or at least the common one does). One thing you can do is connect up the signal lines of the IoT relay to any 5V or 12V pin (plus ground), to see if the IoT relay will come on. If it does not, I would suspect a break in the wire before I’d consider a broken IoT relay.
Are you saying it is working now? If you made no changes since it was last working, then the wire and the connections on each end of the wire between the control board and the IoT relay would be on the top of my list as the culprit. My IoT relay has screw terminals on the connector at the IoT relay. They are notorious for failing unless ferrules are used. Dupont connectors at the board can loosen if stressed. Cold solder joints can create an intermittent connection. If you used solid core wire, then bending can create a break with an intermittent connection.
No I’m saying that every time I send M106P2 instead of triggering fan2 the screen shows the message "click to resume " clicking doesn’t trigger anything either.
If I had to guess, I’d day you are using M1O6 rather than M106 where the ‘O’ is the letter rather than the number. M1 is the g-code for stop. This may not be the exact problem. There might be a non-printing character in your string for example that is after the 1 but before the ‘0’. My guess is that Marlin is parsing out an ‘M1’ from your string rather than a M106/M107.
Hmm I’m definitely not using “O” just did a sanity check. I can send just M106 and the fan icon on the screen activates and 100% shows below it. It’s just when I send M106P2…
As I’m typing this I come to the painful realization of what I’m doing wrong… not M106P2 but M106"SPACE"P2…