You asked a while back in this thread if I had any comments on what could be better in the docs…this is certainly not criticism (I help with the docs and support for another relatively popular opensource app and I also moderate one of it’s social media forums, so, I do get it, it ain’t a cake walk.)
I have now read the thread: Design Pattern: Time Of Day a few times. I grant, not every post and not every word.
To me this is a broad sweeping topic. There is much in the thread that I have no clue if it pertains to implementing the pattern or to what I need/want to do etc. The examples include things that seem superfluous to what I think I need, for example a custom dayset/Trash. I get it is an example/extension of the concept being discussed, but, it might be better handled in a section “Beyond the Basic Implementation” so as not to cloud the early discussion.
For some reason, if there is a graphic with the Concepts section, I can’t see it. It’s just a big empty space.
The Concepts might be modified to include a numbered list of one line each of the steps that need to be implemented to make the pattern work at it’s most basic level. Essentially an overview that allows a reader to determine what of the following voluminous comments may be ignored in the initial setup.
Then it jumps to a Simple Example. For me, because I don’t have the list mentioned in the previous paragraph, what of the things shown I need to do. The reader linked to a github and needs to refer to a later sentence to realize it’s the ephemTimeOfDay.yml. Then I notice a comment in the file that links to how to bootstrap items. Do I need to do that? Where did these items come from…the yml is a bunch rules, right?
(And, side question, once the yml is added, are the Things/channels defined by the yml available to rules written in a .rules file? So, If I put the yml in can my file just refer to vTimeOfDay now?
Then I see Python…that does the same thing the yml does. But, but, but…not clear why. Is it just an option in case I want to use Python?
Then we get Rules DSL. This topic appears to have the definition of the Astro things used in the previous yml and Python. (At least that’s what I’m reading.) Then the rules under this heading proceed to use the OH2 time classes.
Now maybe all this is because there are details I don’t know or understand at the moment, or maybe I just have trouble handling multi-faceted concepts until I’ve internalized all the sub-components. Or, maybe it’s just a galactic size onion and there is just no good way to attack it piecemeal.
At this point, if I do understand any of this: I go to the MainUI (I assume this is what I see from the browser at :8080), go to Rules, add the yml, chuck the rule I’ve got for setting vTimeOfDay, and refer to it (vTimeOfDay) in my .rules file. This can’t be right…hmmm.