Alarm Clock Piston - Request


#1

Looking for a piston to trigger events in the morning. The key would be for it to handle daily changes and be easy to change. My wife and I get up at different types daily - we really have no set pattern. Bonus would be able to set this daily variable via voice - IE Ask Alexa or something. Maybe have a default fall back as well in case pass out and fail to set some night.

Any ideas? Assume fairly newbie especially when it comes to using variables,etc.

Appreciate any ideas!

PS: Can not use Tasker, blocked by work.


#2

I don’t have an answer for this but was wanting the same thing. I travel occaisonally and would like a way to turn the “alarm” on and off and change times.
I want to set up my nightstand light with the the sunrise simulator and be able to change the times easily and disable it if I’m not home.


#3

This may be of help? https://community.smartthings.com/t/deprecated-thread-visit-community-webcore-co-for-assistance-webcore-example-pistons/86060/465?u=949bfn


#4

thanks. I’ll have to dig into that.


#5

I’m curious what you want to automation off the alarm. What actions?


#6

For me, mostly HVAC (ecobee). I can manage the programing for the actions. Its the If clause that I need help on. Today was 4:30am, tomorrow I know is 5:15am. But next week, that could be all different as well. Just too much variability in our day to day to simply hard code a time of day - even weekend vs weekday.


#7

My example does exactly that. All you do is change the “Alarm Time” in the Settings of the Alarm Device Handler. All actions use a fixed offset to the “Alarm Time”. E.g. the water heater turns on 90 minutes before alarm time, etc.

The DH looks like this in the the ST App:


The Alarm is set for 04:47 in the screenshot. The piston is turned off by turning the alarm off in the DH.

And the alarm time is set in the settings page of the DH:


#8

Fantastic, care to share the DH? :slight_smile:


#9

The piston and code for the DH are all available at the link I provided a few posts up. (Alarm Clock Piston - Request)


#10

oh, haha! Cheers!


#11

Not an answer but I read this and thought if we could easily use a global variable that would do the trick.
All we need is easy access to change the variable.
Think I will raise this with Adrian’s of webCoRE.


#12

Once you have added the Device Type to the IDE, you have to add a device using the DTH. I called it “Alarm (Workdays)” and set it up like this:

Next, you have to add at least one of the Pistons to turn whatever devices you want on before/at the alarm time set in the Device.

The Device is used to turn the Piston On/Off and to set the time when the piston must run. The Piston is used to turn other devices on.

Hope this explains it properly.


#13

Hi,

This looks like a great idea, I am struggling with the execution. I have added the device handler found in your thread 949BFN (The one that comes up as: arnqvist : Z-Wave Metering Switch With Timer ).

I can’t now work out how to add the alarm device? Do I understand correctly I have to create an On/Off Button Tile as a virtual device before I can proceed? How does your last screenshot link with the Device Handler?

I’m totally new to this so any support appreciated.

Many Thanks


#14

Yes, you create a device using the device handler.
Authorize the new device in webCoRE and define your new device in the webCoRE piston as device = inputSwitch.


#15

Thanks, I have managed to create a device but it is just giving me a switch?

Thanks for the help, truly unknown territory for me!


#16

Are you sure you used the customized DTH? Make sure you are using the customized version. It should look like this:

Then go into settings (of the Device in the App) and set the alarm time there:

Hope you come right.


#17

Could you do this with a simple motion piston…e.g., you get up, motion sensor in bedroom fires, and magic happens. Then you don’t need to manually update your morning alarm time constantly.

You could limit the piston to run in a normal range of your wake-up times (e.g., only run between 4AM and 9AM), and only run once each morning so it doesn’t fire multiple times due to later motion events.

Also, there is a GCal Search smartapp that could be helpful - if you enter your schedule in Google Calendar you could see if that helps you fire off morning events per your schedule. I haven’t looked at the GCal Search so don’t know how/if it would integrate w/webCore (if using webCore for this is a priority).


#18

I am now using what I believe to be the correct DH, with the text:

  • This is copied directly from the Z-wave switch with power metering from SmartThings, i added a Image Capture
  • capability just to be able to send a string to webcore, the string is the departure time which represent
  • when you are leaving your home so the switch turns on a couple of hours before if you have plugged in
  • your engine heater cable. All rules are set in webcore though. This just provides an easy way of setting
  • a departure time.

at the top.

And I still get a switch not a timer :frowning:

I feel like I’m being dense somehow, but I don’t know how.


#19

If your device looks different to my screenshots above (apart from the device image, which I changed from the default to a clock), you’re not using the correct DTH. The piston will not work with any other device handler.


#20

Hi! I have installed this. Put in your device handler and created a new device.
In the Smartthings app i am able to set a time. What I am not able to do is toggle this new device on/off, it constantly stays on.
Is this how it is supposed to be? I thought it was gonna be able to do that, to turn of the alarm.