Rooms Manager: Smarter Rooms: Personalized home automation with Occupancy

rooms
manager
occupancy
rules
automation

#363

I did it twice and the lights came on both times but no errors in the log:

7841-7a72-463c-a821-2903cedd9a03 3:33:26 PM: debug isAnySwitchOn
ec157841-7a72-463c-a821-2903cedd9a03 3:33:26 PM: debug switchOffEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 3:33:26 PM: debug isAnySwitchOn
ec157841-7a72-463c-a821-2903cedd9a03 3:33:26 PM: debug switchOffEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug whichSwitchesAreOn
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug switches2Off
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug busy on
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug howMany: 3 | gapBetween: 142 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug Master Bedroom room state - old: occupied new: vacant
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug lux from device: 22 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug intValue: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug str: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 22.59 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug switches2On
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug howMany: 2 | gapBetween: 127 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug Master Bedroom room state - old: vacant new: occupied
ec157841-7a72-463c-a821-2903cedd9a03 3:32:47 PM: debug whichSwitchesAreOn
ec157841-7a72-463c-a821-2903cedd9a03 3:32:47 PM: debug switches2Off
ec157841-7a72-463c-a821-2903cedd9a03 3:32:47 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 3:32:47 PM: debug howMany: 1 | gapBetween: 107 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 3:32:47 PM: debug Master Bedroom room state - old: occupied new: vacant
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug lux from device: 22 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug intValue: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug str: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 22.59 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug switches2On
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug turnOnAndOffSwitches
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug intValue: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug str: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 22.59 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 3:31:52 PM: debug luxEventHandler


#364

thank you. from both the logs it seems the decimal lux value is now being returned as int which is great:

ec157841-7a72-463c-a821-2903cedd9a03 3:31:00 PM: debug lux from device: 23 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug lux from device: 22 | rule lux threshold: 10

and in both cases the value is higher than the threshold. so the light going on is strange.

would you please share a snapshot of the view all settings?

EDIT: from the log looks like no rule matched so no rule to turn on lights was executed. if a rule to turn on was executed there should be the executed line like this in the logs:

debug ${app.label} executed rule no: $turnOn
debug switches2On
debug turnOnAndOffSwitches

and i am not seeing the executed line in the logs.

EDIT2: to point you to the section of logs i was looking at please see this:

ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug Master Bedroom room state - old: occupied new: vacant
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug lux from device: 22 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug intValue: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug str: 22
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 22.59 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 3:33:09 PM: debug switches2On
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug howMany: 2 | gapBetween: 127 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug Master Bedroom room state - old: vacant new: occupied

#365

Here is the ALL Settings. I notice that the rule doesn’t include the Lux setting but I can see it in the rule.



#366

Sorry, it is there.


#367

ok. i am going to duplicate the settings in a test room and see if i can get the lights to turn on.


#368

i created a room with the same settings but for the life of me cant get the lights to turn on. it sets the room to occupied with motion but does not turn on the lights.

EDIT: would you please share the logs for the room between these 2 statements:

ec157841-7a72-463c-a821-2903cedd9a03 3:33:24 PM: debug Master Bedroom room state - old: occupied new: vacant
...
ec157841-7a72-463c-a821-2903cedd9a03 3:33:08 PM: debug Master Bedroom room state - old: vacant new: occupied

#369

Is your lux from your sensor more than 3?


#370

I have Min level set at 1 and Max level set at 100. Does this make a difference?


#371

yes its at 5

371e6cd6-2859-4047-9d8c-72639d2a0d91 1:37:11 PM: debug lux from device: 5 | rule lux threshold: 3


#372

thats just for use with 'AL' setting which you have not specified for any of the rules.


#373

first time i actually used 5 in the rule lux it turned on the light. see this line 371e6cd6-2859-4047-9d8c-72639d2a0d91 1:28:22 PM: debug Zzz executed rule no: 1

371e6cd6-2859-4047-9d8c-72639d2a0d91  1:29:14 PM: debug Zzz room state - old: occupied new: checking
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug switchesOnOff
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug lux from device: 5 | rule lux threshold: 5
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug Zzz executed rule no: 1
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug intValue: 5
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug getIntfromStr
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug switches2On
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:22 PM: debug turnOnAndOffSwitches
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug Zzz unschedule calling class: motion active handler
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:10 PM: debug motionActiveEventHandler
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug switchesOnOff
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug Zzz executed rule no: 1
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug lux from device: 5 | rule lux threshold: 5
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug intValue: 5
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug getIntfromStr
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug switches2On
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug Zzz unschedule calling class: handle switches
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug howMany: 1 | gapBetween: 36 | busyCheck: 3 | isBusy: false | newState: null
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:28:11 PM: debug Zzz room state - old: vacant new: occupied

second time i actually set the rule lux to 3 and it no longer turned on the light.

371e6cd6-2859-4047-9d8c-72639d2a0d91  1:38:15 PM: debug Zzz room state - old: occupied new: checking
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:31 PM: debug pageAllSettings
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:14 PM: debug motionInactiveEventHandler
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug Zzz unschedule calling class: motion active handler
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug motionActiveEventHandler
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug lux from device: 5 | rule lux threshold: 3
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug intValue: 5
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug getIntfromStr
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug switches2On
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug Zzz unschedule calling class: handle switches
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug howMany: 1 | gapBetween: 358 | busyCheck: 3 | isBusy: false | newState: null
371e6cd6-2859-4047-9d8c-72639d2a0d91  1:37:11 PM: debug Zzz room state - old: vacant new: occupied

#374

Tried it again. Lux value is 16 and the rule is 10. Lights went on.

ec157841-7a72-463c-a821-2903cedd9a03 4:55:22 PM: debug motionInactiveEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:51 PM: debug switchOnEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:49 PM: debug switchOnEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom unschedule calling class: motion active handler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug motionActiveEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug lux from device: 16 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug intValue: 16
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug str: 16
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 16.03 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug switches2On
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug howMany: 2 | gapBetween: 185 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom room state - old: vacant new: occupied
ec157841-7a72-463c-a821-2903cedd9a03 4:54:30 PM: debug isAnySwitchOn
ec157841-7a72-463c-a821-2903cedd9a03 4:54:30 PM: debug switchOffEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:27 PM: debug getAllSwitches: [Jane’s Light, Tom’s Light]
ec157841-7a72-463c-a821-2903cedd9a03 4:54:27 PM: debug turnSwitchesAllOnOrOff
ec157841-7a72-463c-a821-2903cedd9a03 4:54:11 PM: debug isAnySwitchOn
ec157841-7a72-463c-a821-2903cedd9a03 4:54:11 PM: debug switchOffEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:10 PM: debug whichSwitchesAreOn
ec157841-7a72-463c-a821-2903cedd9a03 4:54:10 PM: debug switches2Off
ec157841-7a72-463c-a821-2903cedd9a03 4:54:10 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 4:54:10 PM: debug howMany: 1 | gapBetween: 148 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 4:54:10 PM: debug Master Bedroom room state - old: occupied new: vacant
ec157841-7a72-463c-a821-2903cedd9a03 4:53:53 PM: debug motionInactiveEventHandler


#375

thanks. looking at the this section of the logs i dont see any rule getting executed after the room changes to vacant. but i do see 2 calls to switchoneventhandler.

are you positive there is no other app or piston or ST app like smart lighting that is turning on those lights with motion?

if you go to recently for the 2 lights getting turned on what does it show for which app sent the on command?

ec157841-7a72-463c-a821-2903cedd9a03 4:55:22 PM: debug motionInactiveEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:51 PM: debug switchOnEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:49 PM: debug switchOnEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom unschedule calling class: motion active handler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug motionActiveEventHandler
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug lux from device: 16 | rule lux threshold: 10
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug intValue: 16
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug str: 16
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug getIntfromStr - mayOrMayNotBeDecimal: 16.03 | indexOf: 2
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug switches2On
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom unschedule calling class: handle switches
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug howMany: 2 | gapBetween: 185 | busyCheck: 3 | isBusy: false | newState: null
ec157841-7a72-463c-a821-2903cedd9a03 4:54:48 PM: debug Master Bedroom room state - old: vacant new: occupied


#376

OMG! You are right! I had the webCore piston still running and I didn’t have lux settings in that one. I tested it again and the lights didn’t turn on and the Room went to Engaged. Is that correct?


#377

:zipper_mouth_face:

probably the light traffic setting since you have been doing this back to back. set it to vacant and give it a shot.


#378

So embarassing! :blush: Sorry to put you through all this! What does the Traffic setting determine anyway?


#379

I did it again and it went to Occupied.


#380

please dont be. the zipper face was just a joke. you helped me fix the app for decimal lux values that will benefit other users that use the zooz sensor so its all good anyways. :slight_smile:

if the room keeps changing from vacant to occupied frequently within some time interval it sets the room to engaged.


#381

So if the room usually has Light traffic, the setting set for Light Traffic will keep this from happening?


#382

right. which is why you have not noticed it before :slight_smile: