I am not a software professional. I hack small programs, but for anything really sophisticated I have found it best to hire someone who knows better than I how to do it. I haven't used flow charts or state diagrams since college, back in the 1970s. Didn't find either of them particularly useful for what I was doing then, don't think they would be very useful to me now either. You can take online courses to learn computer programming and software design, but why bother for a home safety and security alarm? These are commercially available at reasonable cost, so not much need to re-invent that particular wheel.