Mp2 , Soc and node red

Yes you can control the relay in node red. Of course you will have to modify the code a bit.