Rooms Manager: Smarter Rooms: Personalized home automation with Occupancy

rooms
manager
occupancy
rules
automation

#463

Happy New Year everyone!

Bangali, could you provide some info on the triggers for the light, medium and heavy traffic setting you changed? I am noticing rooms going into engaged mode more frequently, especially when set to light traffic. Curious to know what the exact triggers are so I can optimize the occupied and engaged settings.

For the sleep conversation: I did not even think about buttons, they are a good idea though. The only problem I have with those is that my GF would never remember to turn it on/off.

Since I want less user required input, last night I set up her Iphone charger with a smartthings outlet which can monitor energy usage. I then wrote a piston to trigger her presence sensor asleep/awake based on if her phone was charging/not charging. She will always put her phone on/off the charger, but I know she won’t use a button or Alexa all the time.


#464

this idea is ingenious - my wife is the same way likely not to push a button but she always puts her phone on the charger when she is in bed for sleep time. might have to check into this one as well.


#465

It came to me after doing the same thing with my Android phone using Tasker & Sharptools. The real advantage is now that I have very accurate sleep/awake triggers I can use those to set the routines or modes in the rest of the house and use them to trigger other things.

Here is the piston using a ST outlet to monitor the energy usage. (Important to keep in mind that the usage will decrease when the phone is 100% charged. I had the wattage higher initially then saw it dropped when fully charged and sitting on the charger) The switch turns on the sleep sensor function via a virtual switch. You could have it directly linked to the presence sensor status but I am using the virtual switch for other pistons as well.


#466

since i added checking to the traffic logic should probably update the count of number of times it changes a bit. because its still using the old count limits with only vacant and occupied its going to change more quickly.


#467

not officially will provide dth if needed. I found one with trusty google before I ordered :slight_smile:

I can confirm they work - the dth I found supports, single click, double click, and long press.


#468

ahh, cool. just to confirm they connect directly to the ST hub without any other bridge like an almond router or something?

thanks.


#469

Yes, they connect directly to hub via zigbee.


#470

Can you explain the “Engaged Settings”. The reason I am asking is because I have a piston for turning the lights on and off in our basement rec room with motion sensors. I want to set a hues scene when we watch TV by asking Alexa to “Watch TV”. However, I don’t want the lights to turn back on with motion. But I do want the lights to come on when we are done watching TV and the motion sensors to become active again. I do this by asking Alexa to turn the lights back on. However, if my kids don’t turn the lights back on then the room will be left with the TV lights on and the motion sensors deactivated. I tried to incorporate Kodi being stopped but I soon discovered that when we aren’t watching kodi the lights will come back on. So I am wondering if I can use the “Engaged Settings” somehow to set everything back to normal. Not sure I am making myself clear but there are a lot of settings in this app and I am a bit confused on how to set them. Here is my piston.


#471

i can see the lights and kodi … what is switch 5?

do you have a way of monitoring the tv on/off either thru smart outlet the tv is plugged in to or another way?


#472

Switch 5 is a virtual switch. I had the piston set for working when in certain modes but found that when someone arrived home it would put the mode back to home instead of movie mode so I changed it to a switch. But I like your idea of a smart plug for the TV. Will the smart plug set itself to ON and OFF when the TV is turned on and off manually?


#473

ok.

quickest way to do this is use virtual switch to set the room to engaged.

some smart plugs automatically turn on and off on power draw or no power draw. the other option is to get a smart plug with power monitoring. so when the power value is higher than some threshold set the room to engaged.

then in the rules create a rule when engaged to either turn on some lights or turn off some lights.


#474

I have this smart plug Leviton DZPA1-2BW. Would it work for this?


#475

yes any smart plug would work. if that controls your tv power set that as the engaged switch.


#476

@bangali

With WebCore how do I check for vacancy within each room? I am doing something like:

if any of Room#1, Room#2, Room#3
occupancy is vacant
then
…

When I select the rooms in webcore the only non-variable options are button or switch. Neither give options for vacant. Suggestions on how to check all rooms for vacancy prior to an automated action?


#477

select those room devices and check occupancy is ‘vacant’

similar to what this user is doing for one room:


#478

@bangali

Never mind I had a complete brain fart. Ugh! It was giving me the correct response lol! If any of these rooms occupancy are “vacant” then …
I needed to select “are not”

Working now. :slight_smile:


#479

That plug doesn’t work. I have to set it to “ON” in ST and then I can turn the TV on with the remote. But when I turn the TV off with the remote the plug still shows “ON” in ST. Any ideas of the type of plug I would need that will recognize the actions of the TV?


#480

Think of a smart plug like a light switch. A Smart plug is regulating the power being provided to the circuit.

If your plug is reading as OFF in ST then there is no power being provided to the TV to turn it on via the remote. Additionally, when you turn the TV off with the remote your smart plug will still read as ON in ST.

What you can do is write a piston and/or use Bangali’s app based on the POWER usage of the outlet, not the ON or OFF status.

What you can do to make this work for your case:

  1. Create a Virtual Switch in Smarthings IDE and call it the name of your TV.

  2. Write a piston to turn on Virtual Switch based on the power usage. (If you look in ST at the outlet you will see a wattage use in the lower left hand corner (If the outlet monitors power usage) When the TV is being used it will draw power which can then be used to change the status of your Room to Engaged in Rooms Manager.

outlet!

Add the Plug to This located in the other devices section of the room.

Then this option in engaged settings will become usable for the room.

All of this will allow the occupancy setting of the room to turn on and off the plug.


#481

It seems you are trying to have the plug recognize if the TV is ON or OFF.

Instead I would use the rooms occupancy to regulate the outlet by Turning ON when room changes from Vacant to Occupied. Then Turn off when room changes from Occupied/Engaged -> Vacant.

You can then use the energy consumption to set engaged status.

This is what I think you want to happen, If I am wrong let me know:
So, you walk into room. The lights turn on and rooms goes into occupied. The outlet controlling the TV turns on. (You would have to see how much energy it uses on standby should be less than or close to one.) Then you can turn on the TV with the remote. It will draw power (Again see how much it uses in ST then enter that into the WC piston) If the plug reads the energy being used as greater than or equal to that amount it will keep the room in engaged. When you turn the TV off, the energy use will drop which can trigger the room to go to checking. Which at that point the rules for the room in Rooms manager would take over again.

Example of a piston you could use which should work. (I am at work and cannot test it atm). The only thing that might have to change in the piston is changing the “is greater than or equal to” and “is less than or equal to” for the outlet as those are conditions in WC, not triggers. Can change it to enters range, or remains above or equal to if those do not work.


#482

I read through your other post. It seems you are trying to set the lights to turn off and stay off for a “Movie Mode”?

If that is the case. It seems like you were using Switch 5 in the previous piston. If that is the item you are using to watch a movie. You can set that switch to turn on Asleep mode for the room. You can then set a lighting rule in the app for the room to turn off lights on sleep.

If Switch 5 is on
Then with Room do occupancy asleep.

If you set asleep in the app to turn lights off. The motion sensors won’t turn any lights on with motion until asleep is turned off. So to set room back to normal:

If switch 5 is off
Then with room do occupancy checking

(I use checking to have the normal rules in the app take over. You can also set it to vacant, occupied, etc.)

You can also set the level or color of lights when in asleep mode in WC or app. If you don’t want them to turn off.