Smart Night Light Disable


(Eric Sims) #1

Does anyone have a SmartApp that will temporarily disable the Smart Nightlight app? I have it set to switch on for 5 minutes when there is movement between 5 hours after sunset to 45 minutes after sunrise. When we might be up late watching a movie it gets annoying coming on every time someone moves.

I don’t want to delete the smart app because it takes a few minutes to reconfigure. I just want to be able to put a temporary hold on it working, like a lock in a current state until I release it. This would be the same for someone up late reading using that lamp but stays still at times.

Thanks!


(Chrisb) #2

Hey @ericsims,

Check out my newly created SmartApp called Improved Smart Nightlight.

I just took the existing code from SmartThings and added a bit to it. So here’s what you have to do:

First, in the IDE, go to “my devices” and then click the “New Device” button in the upper right corner. You’ll need to give it a name (Such as “Smart Nightlight Virtual Switch” then give it a network ID. (This is a hexidecimal number. With my virtual devices I started with E0 and then just counted up as I add more… E1, E2, E3 thru EF, then F0, F1, etc…). For type select “On/Off Button Tile.”

Select your correct location and hub, and put it in a group if you want. Click create.

Now, exit the Mobile App and sign back in. You should now see a virtual on/off button that when tap will turn on or off, but does absolutely nothing.

Next: Copy over and install my new program listed above. When it asks you what switch to use for the on/off switch, pick the button tile you just created. Setup the rest of the app the same as you do with your Smart Nightlight. Make sure to uninstall the old program.

Now for the fun part: As long as this virtual on/off button is ON, my program will work exactly like the Smart Nightlight program. But, if you tap this tile to turn it OFF, then the program will not light up the lights due to motion.


(Eric Sims) #3

@chrisb,

I found the one that dims, but I haven’t found the one that is just like the Smart Nightlight. Do you know what category it is in?


(Chrisb) #4

@ericsims,

Sorry… I forgot to hit update after I check the “is shared” box. Check again, should be there now.


(Eric Sims) #5

Never mind I found it. Would be nice if they were sortable or searchable.

Thanks again! I’ll test tonight.


(Boris M) #6

Where is the Improved Smart Nightlight?


(Eric Sims) #7

You should be able to see it in the recent category. Don’t forget to add the button switch like @chrisb said above.


(Boris M) #8

I added a switch that does notthing, but for the life of me do not see Improved Smart Nightlight on my android or on graph.api.smartthings.com


(Eric Sims) #9

You have to go to Create your own app, new Smart App, Give it a name and description, then click Create. After you see code, click on browse in upper right corner. Then browse shared apps. Click on improved night light then overwrite. Save and publish for me.


(Dave N) #10

Looking for the code from @chrisb that altered the Smart Nightlight to have the toggle function. No link here in the thread. Lately we have wanted to turn off the living room light while watching a movie and it keeps coming back on every time we move. Thought this little hack would be the answer.
I believe ST has just updated this code as well, there have been issues with it’s operation, so the hack will have to be reapplied to the new code.
I think I can manage that if I get the old hack.
Cheers.


#11

I have created a mode called “Watching Movies”. During this mode motion sensor in my living room doesn’t trigger the lights to turn on. When I press a button on my Aeotec minimote to turn TV/sound system on, the “Watching Movies” mode is activated. When I need the lights to stay on for longer than X minutes, as set in the motion sensor’s smart app, if I want to eat something while watching TV, another button is pushed on the minimote, which activates the “Living Room Lights On” mode. During this mode, lights are on all the time, even if motion is detected. I found this setup to be convenient. It should work even better with virtual switches and Amazon Echo. :slightly_smiling: