i have 2 rpi’s one with hassio witch has mosquito and node red installed on it and everything looks like its working everything connects no errors in the logs. on my second pi i have a scrip to control the gpio pin for the relay via mqtt thats also connects fine. my problem is when i send the message to turn on or off the relay nothing happens although it says the message has been sent i have tried from pc hassio node red my phone and all say they have sent and have been connected to the server.
even in node red if i set a mqtt up to the debug nothing shows it has been sent
any help would be great
this is my script i am running https://pastebin.com/JfYTAxUd
also have rpi gpio and paho mqtt installed