Yeah, this is a setup issue, not a work-from-home issue. If possible a separate office with closable door is ideal, then just be really strict that when your office door is closed, you're at work and not to be disturbed. It took me a few months to train my family to respect this but they're pretty good about it now.