How Can I Make Logic 1 and Logic 0 graphical with Node red and RPi 3

Here is an example only with the buttons:

pump-dsm2

[{"id":"2805c87d.5001a8","type":"dsm","z":"895bbff8.0e6c4","name":"state right","sm_config":"{\n    \"triggerInput\": \"payload\",\n    \"currentState\": \"running\",\n    \"states\": {\n        \"stopped\": {\n            \"0\": \"running\"\n        },\n        \"running\": {\n            \"1\": \"stopped\"\n        }\n    },\n    \"methods\": {\n        \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n        \"0\": \"sta.fill='green';msg.background='green';msg.label='Everything is OK';\",\n        \"1\": \"sta.fill='red';msg.background='grey';msg.label='grey text';\"\n    }\n}","x":370,"y":720,"wires":[["e350df56.a272"]]},{"id":"1590ebfe.27c864","type":"rpi-gpio in","z":"895bbff8.0e6c4","name":"Raspberry PI 3","pin":"3","intype":"tri","debounce":"25","read":false,"x":162,"y":721,"wires":[["2805c87d.5001a8","bae279de.e744b8"]]},{"id":"bae279de.e744b8","type":"dsm","z":"895bbff8.0e6c4","name":"state left","sm_config":"{\n    \"triggerInput\": \"payload\",\n    \"currentState\": \"running\",\n    \"states\": {\n        \"stopped\": {\n            \"0\": \"running\"\n        },\n        \"running\": {\n            \"1\": \"stopped\"\n        }\n    },\n    \"methods\": {\n        \"0\": \"sta.fill='green';msg.background='grey';msg.label='grey text';\",\n        \"1\": \"sta.fill='red';msg.background='red';msg.label='Warning!';\"\n    }\n}","x":370,"y":800,"wires":[["eebed04e.44dab"]]},{"id":"e350df56.a272","type":"ui_button","z":"895bbff8.0e6c4","name":"","group":"c70e5b9f.5344e8","order":2,"width":0,"height":0,"passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":550,"y":720,"wires":[[]]},{"id":"eebed04e.44dab","type":"ui_button","z":"895bbff8.0e6c4","name":"","group":"2a642b4c.f284b4","order":0,"width":0,"height":0,"passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":550,"y":800,"wires":[[]]},{"id":"c70e5b9f.5344e8","type":"ui_group","z":"","name":"Test 1","tab":"bd8aa435.42cfb8","order":1,"disp":true,"width":"6","collapse":false},{"id":"2a642b4c.f284b4","type":"ui_group","z":"","name":"Test 2","tab":"bd8aa435.42cfb8","order":2,"disp":true,"width":"6","collapse":false},{"id":"bd8aa435.42cfb8","type":"ui_tab","z":"","name":"Monitoring System","icon":"dashboard"}]