Rooms Manager: Smarter Rooms: Personalized home automation with Occupancy

tallying votes across forums looks like ~70% of you like the idea ~60% of those think its a great idea. :slight_smile:

so this feature is coming. this will be the last feature before rooms moves to version 1.0.

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.

btw … if you want to set scenes from rooms … select the scene in switches on or off in the rule.

when the rule is true the scene will be set and when false the scene will be turned off.

I've been having some odd behavior with certain rooms lately. I just updated to 0.95 this afternoon, but still persists.

Seems that some rooms are not going vacant after the motion sensor times out, and I've had to manually hit vacant on their hubitat device page to make their lights stop turning on when nobody is in the room. I just vacated the rest of the rooms that we haven't been in for a while tonight, and will monitor to see if they come back on or stay on tomorrow once activity starts again.

Edit:
Also, not sure if it's from the rooms manager, or hubitat working with my GE dimmer in the master bathroom, but I've noticed that light being on all night sometimes. I hadn't checked to see if the room occupancy was vacant or not...

Bangali,
Thanks for implementing the switches as conditions for Rooms Manager.

Can you check to see if this is correct? There IS a switch selected in Maintain Rules. (I can't test, as I'm not at home, and not between sunset and sunrise anyway.

@talz13 after updating to the latest version did you go to each room settings and save the settings?

also for rooms manager please.

@mike will do. did you define switches for check on or check off?

Yes. It's correctly showing in Rule 2, but not Rule 4, where it shows null.
@bangali

Are you talking about the rooms manager parent app and each child app? I did go in to each and click done at the bottom of each app. I also noticed that my timeout setting on most or all of the rooms occupied setting were missing, so I had reentered most of those, still seeing the timeout ending yet. Are there any specific pages of the settings to go through?

there was a typo … but that shouldnt have caused it show the way it did. please edit rule 4 … set check off to no selection then save please. does it still show null?

ok.

yeah that would cause the issue. when you set the timeout for occupied settings does it stick or is it still disappearing?

No, it does not show null, upon removing the switch from the condition "check if off"...........and upon adding the device back, the null returns.

got it. sorry there was a typo.

i committed a fix directly on github but github is being finicky and wont show the change history.

update the rooms child app code tomorrow and should show correctly. no functionality should be affected.

1 Like

Hmm, now that you say that, I just checked the hallway room this morning after mywife said it wasn't turning off again. I saw that the occupied settings timeout value was blanked out again, after I reset them last night.

Edit: Going through the rest of the rooms, I'd say ~1/2 of them were missing their occupied timeout value this morning. I have gone through, reset, and verified that all of them are currently displaying the proper occupied timeout value in their settings screen. I'll check back later today or tomorrow morning to see if they remain set, unless I notice that they are not turning their room lights off today.

1 Like

When using the alarm on a room with sonos i get the following error:

Code:

Thanks bangaili that fixed the null issue showing in the rules.

I'm still having an issue, that I mentioned a few weeks ago now, where my rules dont work as soon as I incorporate sunrise/sunset. It may not be as simple as that - it appears that the sunset/sunrise works sometimes, but not as per my local sunrise/sunset. When I first noticed it the error, it worked until midnight, then ceased working. (And you told me to go to bed!)

At 8:43 local time Australia (sun is up), this rule does not operate.

If I take out the time restriction, the rule operates.

Maybe there is something weird going on the sunrise/susnet being a day ahead in Australia? I'm perplexed, and WAF is trending down! Help please.

(@bobbyD This is the issue).

we cant have that.

in the rooms child app at line ~4445 there should be this line which is currently commented:

log.debug "ruleNo: $ruleNo | fromTime: $thisRule.fromTime | fTime: $fTime | toTime: $thisRule.toTime | tTime: $tTime | nowDate: $nowDate | timeOfDayIsBetween: ${timeOfDayIsBetween(fTime, tTime, nowDate, location.timeZone)}"

uncomment the line and save the app please.

then with logging open for the room change the room occupancy state from any other state to engaged and share the logs please.

btw … you would like those lights to come on when between sunrise and sunset … so during the day … when the room state is engaged … is that right?

Aha! More "nulls"

app:5462018-10-23 08:57:22.292:debugruleNo: 5 | fromTime: null | fTime: Mon Oct 22 06:37:00 AEDT 2018 | toTime: null | tTime: Mon Oct 22 18:46:00 AEDT 2018 | nowDate: Tue Oct 23 08:57:23 AEDT 2018 | timeOfDayIsBetween: false

app:5462018-10-23 08:57:22.257:debugruleNo: 4 | fromTime: null | fTime: Mon Oct 22 18:46:00 AEDT 2018 | toTime: null | tTime: Mon Oct 22 06:37:00 AEDT 2018 | nowDate: Tue Oct 23 08:57:23 AEDT 2018 | timeOfDayIsBetween: false

so fTime should be sunrise, tTime should be sunset and nowDate is current time.

are the values logged correct?