Rooms Manager: Smarter Rooms: Personalized home automation with Occupancy

rooms
manager
occupancy
rules
automation

#743

updated to github with the following changes:

  • Version: 0.80.0
  • DONE: 8/07/2018
    1. turned off logging by defaults for both the apps and the driver.
    1. added option in the child app to turn on debug selectively for individual instances of rooms.
    1. changed recurring processing of child switches on hubitat to every 5 mins which is now same as smartthings.
    1. removed pauses from child switch processing which cut down the processing time by 25% - 75%.
    1. added a driver for hubitat which is a copy of the smartthings DTH with only the parts supported by hubitat.
    1. removed all calls to update tiles in hubitat.
    1. removed tiles and event publishing from the driver in hubitat.
    1. changed how adjacent rooms processing on smartthings is handled on save to avoud timeouts. not an issue on hubitat.
    1. added ALPHA version of humidity settings and rules.
    1. added delayed off for room vents.
    1. small fixes here and there.

#744

so … how is humidity management going to work in rooms manager?

there is humidity settings where you can specify:

  • wether to both humidify and dehumidify the room
  • corresponding switches based on above
  • override minutes if either of the switches is turned on manually

then there are humidity rules:

  • where you can specify conditions to match.
    – for these rules engaged and asleep state matched rules take priority over occupied and vacant state rules.
    – so once a engaged or asleep state rule is matched the rule humidity will be processed fully before a rule with occupied or vacant state will be processed.
  • in the rule there is option to specify if the rule matches to keep the humidifier or dehumidifier on
  • then there are following settings:
    – compare to what humidity baseline
    – percentage from above to trigger turning on humidifier or dehumidifier
    – minimum time humidifier or dehumidifier should stay on with this rule
    – maximum time humidifier or dehumidifier should stay on with this rule
    – both of the above have a trailing effect. so if the engaged rule turns on the humidifier or dehumidifier then the room state changes to occupied or vacant the min and max time will be honored first before any new rule is processed.

on compare to what humidity baseline here are the options:

  • a specified value. like when you want to keep an humidor at a certain humidity level independent of other variables.
  • room humidity when the room was last vacant prior to a rule being matched.
  • rolling average across all days of the week for that hour.
  • rolling average for the day.
  • rolling average for all hours and days for that room.

this is also coupled with being able to specify multiple humidity sensors in room devices so you are matching to averages instead of just the humidity sensor in that room.

the one option i have not included yet is just directly baseline to another humidity sensor. from reviewing the data over the last week or so i find that my own humidity sensor in different rooms have very different readings so baselining one against another would not quite do what is expected.

instead of that comparing it to humidity level of the room with the last vacant state may work better.

what might work even better is comparing the humidity to the rolling average humidity for that hour of the day for that room. but that data will take a week or so to get collected from humidity events as the humidity sensor publishes them. so publishing this now as ALPHA so that data will saved to state for the room if a humidity sensor is specified.

most of the basic functionality works though have not had an opportunity to try all possible combinations yet. it also gets the average humidity level collection started for more evaluation. thats why this is a ALPHA.


#745

Bangali,

DO you have any ready-made pistons for dispalying room manager in webcore dashboard ??


#746

i do have a few for dashboard tiles. but my regular pistons use so many global variables that they are hard to share as is.

here is sample one with the basics:


#747

I just saw the update the other day and works great!

Question though, some times the lights just go on off on off on off ect and the logs from my phone saw that it is cycling between 2 of the buttons.
Also, I just remembered that I don’t know the whole coding of the hue dimmer switch but the room manager says that it has 12 buttons? there are only 4 physical buttons but it could be different ways to press the button??

Thanks again


#748

terrific!

we should look at the live logs for what is triggering it … like is the motion sensor sensing motion because of air flow or something else?

might be … because the device is reporting it has 12 buttons so thats what the app displays.

you are welcome.


#749

updated to github with the following changes. REQUIRES SAVING ALL ROOMS AFTER UPDATING TO THIS VERSION. JUST OPEN EACH ROOM AND CLICK SAVE. THATS IT.

Version: 0.85.0

DONE: 8/10/2018

  1. created CHANGELOG.md on github and moved out revision history from individual source files.
  2. performance optimization for various frequent functions.
  3. stopped retrieval of devices from child for battery and device connectivity check. while this works fine
    on HE on ST it can cause timeouts specially anytime the ST platform is generally stressed.
  4. updated how rules are processed due to #3 above. REQUIRES SAVING ALL ROOMS AFTER UPDATING TO THIS VERSION. JUST OPEN EACH ROOM AND CLICK SAVE. THATS IT.
  5. updated rooms to use only 1 schedule timer for time trigger in rules. previously used 2 schedule timers.
  6. cleaned up files:
    file from to % change
    ST DTH 58K 56K -3%
    HE driver 58K 14K -76%
    app rooms manager 80K 60K -25%
    app rooms child 360K 269K -25%
  7. updated humidity management to BETA.

#750

updated to github with the following changes. REQUIRES SAVING ROOMS MANAGER SETTINGS AFTER UPDATING TO THIS VERSION. OPEN ROOMS MANAGER GO TO SETTINGS AND CLICK SAVE. THATS IT.

Version: 0.90.0

DONE:   9/20/2018
1) more optimizations for speed:
	- optimized how events are processed.
	- moved interval processing of room switches to individual rooms instead of from rooms manager.
	- moved timer/countdown handling to the device driver from the rooms child app.
	- for battery and device connectivity monitoring devices are now specified only in rooms manager and not collected from individual rooms.
	- optimized how scheduling is handled and how many timers are used.
	- reduced code size further to ~263K.
	- various other code optimizations.
	- **REQUIRES SAVING ROOMS MANAGER SETTINGS AFTER UPDATING TO THIS VERSION. OPEN ROOMS MANAGER GO TO SETTINGS AND CLICK SAVE. THATS IT.**
2) switched to using single regularly scheduled timer for both ST and HE for different reasons:
	- on ST because when ST infrastructure is under stress random processing can take really long and quickly get over the 20 second timeout.
	- on HE because all timers are blocking and i dont want any individual timer running for more than 1 second like when device monitoring check.
	- this allows rescheduling these kind of tasks after 10 seconds and 1 second of processing on ST and HE respectively.
3) thermostat indicator fix for manage vents only mode.
4) removed the lock only capability on ST because it causes issue with Alexa turning on and off the rooms occupancy device.
4) few other tweaks here and there.

#751

@bangali is there a minimum set of items that need to be set to create a room? I’ve installed the smart apps and given it all a try but am falling on my face each time. So my scenario is:
Room type is hall way.
Devices is 2 Hue lights and 2 hue motion sensors
When someone walks through the hall way, I want the lights to turn on based on motion sensor and lux level ( less than or equal 15 lux) then turn off after a minute of no activity.
I have:

Room Devices section:
Added motion sensors, left the default Last Motion Inactive for the time out.
Set the lux sensors.
Set the room sensors as the Hue motion sensor (nice to know the temperature in the room device).

Occupied settings:
Changed time out for occupied to 60.

Maintain Rules:
Created a new rule.
Rule type - Execution.
Name - Motion - Night Mode
State - Occupied
Mode - Night
Lux threshold 1 - 15
Turn on switches - both lights
Set level - 30%

The problem I’m getting, is the lights will switch on with motion and stay on for around 5 seconds then go off regardless if there is Motion in the hallway. Continued motion doesn’t bring the lights back on for a few minutes.

I did try setting advanced and try changing Checking setting, Checking setting before room changes to vacant from the default 5 seconds to 60 seconds ( as I think the blind window is 30 seconds on Hue motion sensors) but have no joy.
Any advice on what I’m doing wrong? In the long run I want to setup more complex rules like lounge - if no Motion for X time leave lights on in engaged state etc but just can’t seem to get the basics lol. Thanks


#752

no you dont need a set number of devices. this is very odd. the lights should not turn off before 60 seconds. have you updated to the latest code for the DTH and both smartapps? if not sure please update the code first.

then please go to view all settings and share the settings from there? its just easier to read that.

before taking a snapshot of the settings set the flag for only settings with value and it will reduce the number of screens you need to take a screenshot of.


#753

Thanks. I think I might have found the problem - on the ST community I was reading over the thread again there and saw you mentioned people should be using Last Motion Active for the Motion even timeout due to blind settings being different for different sensors. I gave that a try and it all now seems to be working! I was wondering if there might be a way you could edit the code so that by default when creatin a new room, this settings is chosen instead of “Last Motion inactive”?


#754

glad to hear its working now. dont hesitate to ping me if you have any trouble setting up more complex rules.

for most motion sensors there is a motion inactive event sent after the motion active event when motion stops. unfortunately a few sensors do not send this motion inactive event. thats the reason i added the option to select between Last Motion Active and Last Motion Inactive.

in most cases the current default works well. changing it now would mean the behavior would change for users that are already using it for the last year or so. they might not be happy with me doing so. :slight_smile:


#755

updated to github with the following changes:

Version: 0.90.2

DONE:   10/1/2018
1) fix for holiday lights. requires resaving holiday lights settings.
2) more code optimization for frequent functions.
3) other small fixes.

#756

updated github with the following changes:

Version: 0.90.4

DONE:   10/3/2018
1) added color option to night lights.
2) tweaked the holiday lights twinkle a bit for HE.
3) optimized switches processing.
4) started adding sub-headers on HE.

#757

updated to github with the following changes:

Version: 0.95.0

DONE:   10/7/2018

1) added power value, switches on and switches off triggers to rules definition and processing.
2) optimized rooms processing and how timed rules are handled.
    - **REQUIRES SAVING ROOMS MANAGER & ROOMS CHILD SETTINGS AFTER UPDATING TO THIS VERSION. OPEN SETTINGS FOR EACH AND CLICK SAVE. THATS IT.**
3) start collecting rooms state history.
4) cleanup code here and there.

#758

Not sure if it is only me, but it seema like the vacant status is not triggering lights to turn off.

I have saved the settings for each room and the room manager app with no luck in getting the vacant status to function.


#759

could you please check the timeout settings for occupied?


#760

That was it. The occupied times got reset. After inputting new ones it appears the rooms transistion correctly.


#761

great!

sorry about that. i seem to have done something between the last 2 versions to cause that. not quite sure what i did but will keep an eye on it going forward.


#762

updated to github with following changes:

Version: 0.96.0

DONE: 10/31/2018

  1. updated code for time handling to fix issue with midnight changes for sunrise and sunset rules.
  2. moved rooms vacation mode code from rooms manager to its own child app.
    • REQUIRES SAVING ROOMS VACATION CODE AS A NEW APP. REMEMBER TO ALSO SAVE SETTINGS FOR BOTH ROOMS MANAGER AND ROOMS VACATION.
  3. updated spoken announcements code in rooms manager because HE does not support all of the same commands that ST does.
    • PROBABLY NEED TO DO THE SAME FOR ROOMS CHILD APP AS WELL. BUT WANT TO LET THIS CHANGE BAKE IN REAL WORLD A BIT BEFORE I DO THAT.
  4. added setting for exception states for only on state change settings.
  5. added 15% and 25% to light level setting.
  6. added option to select 24 hours for announcement.
  7. cleaning up settings text etc.