sure.
updated text on other two.
thanks.
sure.
updated text on other two.
thanks.
@bangali, I setup a room use LUX value = 20. When the room is dark ( Lux = 0 ) the app is Occupied , light on . But at that time ,if I open the door, window, lux go up to 40,55 … the light still on. The app did not check when the value change ?
as soon as the lux device publishes the new lux value that triggers a recheck of rules. if you check the live logs for the room you should see a line something like this:
lux from device: 40 | rule lux threshold: 20
do you see that line in the log after opening the window?
also in mode and other settings there is a switch - turn off all switches when no rules match … is that set to on?
thanks.
alarm clock that can be set from a room device settings will be in the release tonight. ![]()
you can automate asleep state through power now.
thanks.
UPDATE: updated version 0.12.0 to github with the following changes:
* Version: 0.12.0
*
* DONE: 2/8/2018
* 1) added alarm to rooms occupancy. tested somewhat. family kind of upset with me for random alarms going off :-(
* 2) sunrise & sunset now support offset in minutes. so if you always wanted sunrise -30 or sunset +30 now you can.
* Version: 0.11.5
*
* DONE: 2/5/2018
* 1) added setting for locked state timeout setting.
* 2) on motion active added check for power value to set room to engaged instead of occupied.
* 3) on occupied switch check power value to set room to engaged instead of occupied.
* 4) on contact close check for both occupied and checking state to set room to engaged.
* 5) for motion inactive with multiple motion sensors check all sensors for active before setting timer.
Wohooo offsets!
Found a bug I think… you’d have a better handle on implications though:
in updateRulesToState() state.maintainRoomTemp is always false when getRule() is called.
…but in getRule():
if ((!ruleTypeP && !state.execute) || (ruleTypeP == ‘t’ && !state.maintainRoomTemp)) return null;
so t rules always seem to return null. As a result my processCoolToHeat doesn’t do anything.
only till it finds the first ‘t’ rule after that its not. when processCoolHeat is called on temperature change state.maintainRoomTemp has the right value.
OK got it working. I was barking up the wrong tree because I confused roomType and roomTypeP 
The main bug is here:
return [ruleNo:ruleNo, type:ruleType,…
it’s returning type but then checking for roomType. I’m not sure which side to fix. guess return roomType instead?
Couple of more fixes needed to get processCoolHeat working:
Finally, if we are using a thermostat, thermostat is set to temperature we want the room sensor to read. But typically this is a central thermostat and if the room is too cold its sensor is reading higher than the room sensor. So we want to set it to a higher temperature to trigger it.
We could add two more settings to the rules so we have "Start cooling at : (room sensor temp) “Set thermostat to cool:” “Start heating at” “Set thermostat to heat”
But then do we reset it? Reset it optionally?
If we are going to reset it anyway, keep rules simple and have a single setting to add or subtract an arbitrary number (say default 5 degrees) to the thermostat setting?
sorry … where is it checking for roomtype? did you mean ruletype? in updaterulestostate it should be using type not ruletype.
fixed typo.
changed divisor to float.
i don’t use a smart thermostat. i was under the impression the smart thermostats use in room temperature sensors to get their temperature reading?
thanks.
Sorry, ruleType. Yes, afterwards I noticed it should stay as type in the rule.
Most don’t, they just have on board. Ecobee is the only one I know of that you can attach extra temperature sensors to…
There are some other things I noticed, like how it doesn’t stop the already underway cooling/heating if presence sensor leaves. I think I’ll send you a PR to look over…
ok. yeah this will need addressing.
dont include this in the PR. there was a typo from when i added the thermostat. changed this line:
if (temperature <= coolLow && (!checkPresence || (checkPresence && !isHere))) {
to:
if (temperature <= coolLow || (checkPresence && !isHere)) {
EDIT: moved the check up top.
Bangali, you are incredible!
Smart socket is with me tomorrow so I can play around with the new power feature!
Alarm Clock feature - give me a hint on how to set it? If I go into my Master Bedroom for example, I can’t see anything obvious. Do you have to do it through room settings?
Thanks
Rowan
Ok I figured out the alarm setting & it’s great. Is it possible to add 2 features?
Light Fade in vs. Time - Fade in X Lights over Y Time
Piston - Run a piston. I actually want to start the radio, a simple piston would allow me to do this if rooms manager could run it through the alarm.
Awesome
️
this one is on the todo list already.
will add to the list.
a while back @tonesto7 had kindly invited me to participate in his community smartapp installer beta. took me a while to wrap up some ongoing work and put the manifest together so rooms manager/rooms occupancy could be included in this really cool installer.
simplifies smartapp install enormously … no more mucking around in the IDE. check it out here:
thanks much to @tonesto7 for the invite and honored to be included in the beta alongside some of the communitys most popular smartapps.
when @pmusselman asked me if i would port rooms manager/occupancy over to hubitat i had to check out hubitat a bit.
after checking out hubitat i liked what i see specially as you all may have already noticed i prefer local processing over cloud processing for event handling. then chatted with @SBDOBRESCU a bit over on the hubitat forum with the net result that my hubitat hub is now ordered and hopefully on its way real soon.
guess what that means? 
rooms manager/occupancy will be also supporting hubitat. dont have a timeline for right now but will post over on the hubitat forum if any of you end up on the same path.
note i have no intention of deprecating ST support. so if you are here rest assured i will continue to support ST same as i have been.
cheers.
Hi bangali, I have just stumbled across your fantastic Smartapp and it promises to satisfy most of my needs.
I am having a number of problems though. I have trawled through previous posts to try and find a solution, however it seems that most people are having success with this Smartapp.
The problems I am experiencing are as follows
I have successfully setup two rooms to function very basically i.e When motion is detected, turn on the light. When motion inactive check for motion for 30 seconds and then turn off the light. I haven’t implemented any rules. This works fine. However when I try to create a third room, I apply the same settings, but it doesn’t turn the light on. When I have a look at ‘all settings’, I see that it has not created a rule like the first 2 rooms. If I try and create a rule, it shows as 1:Disabled=true State=[occupied,engaged] ON=1 Level=70 but still doesn’t work. Also why would Disabled=true when I have it enabled?
When I try and delete rooms it shows ‘An unexpected error occurred’. I guessed that may be because a room is created as a device. I therefore tried to delete the device, but still get error. How to I remove the Smartapp?
I really hope that someone can help?
Cheers.
have you tried going to rule edit and changing the disabled toggle to false?
from the IDE delete the device first then delete the child app instance for the room.