Sorry been a busy few days, I honestly did not know about the wifi relays and would of probably been the better route to take for me. I would still really like to finish what i started tho.I have managed to get the fans working and an led status for on/off on the dashboard. But my plan all along was for a switch so i want a switch
my current flow using 2 buttons instead
[{"id":"a5e2be61.e18a2","type":"pythonshell in","z":"a5a4c878.efcb48","name":"relay 1 on","pyfile":"/home/pi/relay1on.py","virtualenv":"","continuous":false,"stdInData":false,"x":360,"y":220,"wires":[[]]},{"id":"18a18085.1dcfff","type":"ui_button","z":"a5a4c878.efcb48","name":"","group":"42ec51ce.866f6","order":3,"width":1,"height":1,"passthru":false,"label":"on","tooltip":"","color":"black","bgcolor":"green","icon":"","payload":"0","payloadType":"num","topic":"","x":180,"y":220,"wires":[["a5e2be61.e18a2","4ae8f6a9.072b38"]]},{"id":"4c3bce45.5a496","type":"ui_button","z":"a5a4c878.efcb48","name":"","group":"42ec51ce.866f6","order":5,"width":1,"height":1,"passthru":false,"label":"off","tooltip":"","color":"black","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":190,"y":340,"wires":[["46eceef8.f5205","4ae8f6a9.072b38"]]},{"id":"46eceef8.f5205","type":"pythonshell in","z":"a5a4c878.efcb48","name":"relay 1 off","pyfile":"/home/pi/relay1off.py","virtualenv":"","continuous":false,"stdInData":false,"x":360,"y":340,"wires":[[]]},{"id":"4ae8f6a9.072b38","type":"ui_led","z":"a5a4c878.efcb48","group":"42ec51ce.866f6","order":4,"width":1,"height":1,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"1","valueType":"num"},{"color":"green","value":"0","valueType":"num"}],"allowColorForValueInMessage":false,"name":"","x":430,"y":280,"wires":[]},{"id":"42ec51ce.866f6","type":"ui_group","z":"","name":"main","tab":"61e0a8ed.2916f8","order":1,"disp":true,"width":8,"collapse":false},{"id":"61e0a8ed.2916f8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]