PanGalactic:
I think it would be interesting to see if I could get the lights to switch on/off/colour in the order of my choosing, say in a zigzag or in a circle around the room, do you think this would be possible?
most definitely…just a lot of coding…but if you use groups and naming schemes in the right way, it is not too difficult, these links may come in handy:
Please see Design Pattern: What is a Design Pattern and How Do I Use Them for details on what a DP is and how to use them.
Problem Statement
Sometimes one wants to create a message or log statement that references certain Items. A clear example of this is to generate an alert message to be sent when one or more sensors change state. We have a nice way to provide a human readable version of an Item’s name on the UIs (i.e. the label) but from a rule this becomes more difficult.
Concept
[image]
…
Edit: Added link to item_init library.
Please see Design Pattern: What is a Design Pattern and How Do I Use Them for how to read and use a DP.
Problem Statement
Often a user has the desire to be able to store and retrieve a series of constants or other values in a Rule. For example, a user may have an RFID reader and want to store the list of authorized and disallowed IDs in a flexible manner. As another example, one may be sending commands to a gateway and need to include the ID of the target…
and even this
This doesn’t directly address your specific problem, but if you separated your rules by function rather than room you will have a lot more opportunities for creating generic rules and reuse of variables in code. It also lets you apply DRY (Don’t Repeat Yourself).
But regardless, you can do this with two events (one event that starts the heating mode) and two very simple rules.
var previousStates = null
rule "Start BR Nursery Heating"
when
// whatever triggers this mode
then
// store …
1 Like