0

I've created this automation for a device with 3 settings. Pressing some button (or triggered by something else) activates a trigger that will execute an actionGroup (arbitrary commands grouped together) that will send signal A/B/C and start a schedule that repeats it every X minutes, and cancel the other schedules there are for the other two signals. Sending one signal (setting) cancels out the other two settings; there's no need to send a discrete cancel signal, only to stop their schedule so they don't conflict. These are a one-way infrared signals, so repeating them is the only way to be sure they were received. It also deals with manual overrides.

There are two more of schedules part of that program: one enables one of the three triggers after sunset (a system-maintained variable along with sunrise) and another that executes an actionGroup to kill that signal immediately at sunrise and disables the trigger for it. Well, actually they set variables from true to false. Speaking of variables, there's a variable that can only be changed manually for manual override so the disabled signal's schedule can be activated at any time.

This, at least for me has gotten quite complex, and, there are three of these, it's hard modifying anything because it's very easy to screw it up. I want to add a few sensors though, but I need to put this visually so I can understand my own thoughts because it's been a while since I did this and I'm not sure I remember every part of the system, I'm not sure how I even did it without a plan whatsoever.

Researching I found out about UML diagrams that are designed for these scenarios but the one I keep being referred by several tutorials, State Machine Diagram or "statecharts" I'm not sure it's the right one, and, what I thought was the right one, the UML Sequence Diagram because it has loops on it, when I started mapping it out, it turned out it wasn't the right one either. Or, perhaps I did it wrong.

The good news is that without knowing it I got the software that has all of these diagrams a long time ago, Visio "Professional"…sure, and now I get to justify it for other than for [awful] networking diagrams, I hope. The bad is that I don't now where to begin, what's the right kind of diagram for this?

Thanks, I really appreciate your help.

  • 1
    draw a diagram that makes sense to you ... show it to your friends ... if it makes sense to them, then you are done – jsotola Sep 16 at 4:37
  • That was the plan, but it turns out it's hard when you don't know what you're doing. Explaining it in here I rephrased it a million times and that actually forced me to view it from a slightly different angle, I'll try that today after some errands, hopefully I can work it out. – Vita Sep 16 at 13:59
  • 1
    you probably have done this already, but a small chance remains that you may not have ... google flowcharts and look at the images – jsotola Sep 16 at 15:47
  • I would head for a finite state diagram en.wikipedia.org/wiki/Finite-state_machine – Andyroo Sep 18 at 3:50
  • Thanks to both. I spent the day starting drafts over and over and realized the loops are irrelevant, they can be thought as on/off states and simplifies the whole thing immensely. Bad news is that I realized my controller does not allow for conditions on actions. I'm trying Node-RED before continuing on because it's going to be way too many steps now. thx! – Vita Sep 19 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.