I/O line passing Problem

I can pass digital and analog signals just fine but how can i stop a digital output if the sender has powered down or just can’t send new data.
Driving the lines high even after the sender has powered down is just dangerous.
And the timeout for each pin is not efficient as the user has to press and unpress the buttons every second.
The machine i’m working on is bulky and can’t stop and restart it every second, also can’t let it roam freely if the xbee network is down.