Playing with a psuedo Room app

Posting a little info about something I'm proud of that I did for myself.
I wrote a sensor average app a while back, and it did the job but it was not exactly what I wanted.

I realized one day that I really found Rooms in HE not valuable to me other than as a Grouping function. So I wrote an app I call THIPL Room State Aggregator! (Temp/Humid/Illum/Power/Light)

What is does: It first searches all my devices and gets the room names (I can't seem to get room names to pull using a direct Room method). It then takes the room name I select from the list, and generates a child app for that room. Using picklists for each of 4 sensors and the lights, I create a device that has the average of the sensors for Temperature, Humidity, Illuminance and Power. The L in the name is for Lights. It tracks the count of lights on for that room.

I then created an upstairs,downstairs, outside, and house room in HE. (the real room needs to exist before my app will let me create a new aggregator for the room). Then I assign my Aggregators as sensors for those. a Tier 2 if you will. then I assign upstairs, downstairs and outside as the inputs for the House! Here's one room:

Here's the associated Child app for that room:

The sensor for a room are averaged, and the device count passes up to the 2nd tier and 3rd tier - so the overall averaging stays accurate. I also set 3 tiers of control for debouncing, and caching so it doesn't flood. Each of the sensors has precision control from 0, 1 or 2. whether in a room, floor or house tier! It is working so well, I added Light counters. so I can see a TRUE count of lights on in a room at a glance. This whole thing is working so well, I'm thinking of adding contacts and motion, but I don't think thats really important to me at this point. Anyways. Wanted to share how I 'built out' my Rooms with an app :slight_smile:

2 Likes