There are a bunch of potential failure points to be checked. First, the g-code is case sensitive and needs the right syntax. The sample you provide in your question would not work. Second, verify that the router works and is on. Make sure you are using the correct switched plug on the IoT relay. Next carefully test the pins at the board with multimeter by using g-code to switch them on and off. If that checks out, remove the connection from the IoT, and test the wiring just before the IoT. Note that the plug into most IoT relay solutions is polarity sensitive, so it must be plugged in the right way.
If you are using a relay module and not a commercial IoT relay solution, then you need to check power and ground to the relay module as well.
If you go through this list and don’t find your problem, I’d open a new topic with more information. Include the exact g-code you are using, pictures of your wiring, etc.