Advice - New home, fresh install via Docker, fresh start

Functionally. This is less important for the .items files as it is for the .rules files. When you separate it out functionally then you are more likely to be able to share global vars, vals, and lambdas for rules that address the same function then you will if you use location or binding. So split your .rules by function then split your .items the same way to provide symmetry (i.e. you know the Items that are used in the lighting.rules file are likely defined in the lighting.items file).

I’m really against separating them by binding. For the most part it should not matter in your Rules (or sitemap or persistence) what bindings the Items are linked to. One of the main points of having Items is to provide a layer of abstraction between the physical devices and the logical meaning of those devices in your home automation. For example, instead of “Zwave_Node6_Switch” you have “Livingroom_Lamp”. The first one is pretty much meaningless, the second one tells you exactly what the Item represents. So given your naming pattern, I would drop the connection part of the name entirely. It really doesn’t provide meaningful information from a Rules or persistence perspective.

I’ve also found that having Groups for locations or put in the Item name to be more trouble then it is worth in most cases. For example, what room do I put the HVAC in? It is relevant to the whole house. Over time I found I had more exceptions to the naming rules than I did Items that followed the naming rules so I’ve reduced my naming conventions down to just the following:

  • If it is a Group make the name plural
  • It it is a value (e.g. sensor reading) prepend an ‘v’
  • If it is an actuator (e.g. causing something to happen) prepend an ‘a’
  • If it is a Expire binding Timer, use Design Pattern: Associated Items naming convention with “_Timer” appended
  • Make the names descriptive and meaningful

And the only reason I still use the v and a is because I have cases like the garage door opener that have both a sensor and an actuator.

I also organize my sitemap functionally instead of by room.

Remember, the organization of your files and the naming you choose is for YOUR benefit. The computer doesn’t care. So do what makes the most sense for how you work. This is what works for me.

Some other considerations on Item naming. One of the most useful DPs (IMHO) is Assocaite Items. Don’t chose a naming convention that makes this challenging.

Also, are you aware that for lights, you can send an ON/OFF or a PercentType to a Color Item? This means that you likely don’t need separate Switch and Dimmer Items for your Colors bulbs. Just put the Color Item on your sitemap as a Switch (to treat it as a Switch) or as a Slider (to treate it as a Dimmer).