SmartThings Community

Can I have heat by the time my alarm goes off?

alarm
thermostat
automation
(Don) #21

Your welcome,

My current primary use for the Gcal app is putting in mine and my wife’s work schedule. I used to use the all day option but Gcal doesn’t like that method alot.
So I have our work day start before we actually get up. Me 1st 5am and my wife at 6am.

I then use core to compare the contacts associated with those Gcal triggers. If she’s off then when I leave for work and lock the door it turns off the lights. Then just the opposite if I’m off and she’s working. If we both work everything shuts down using the Good-bye routine when we’re both gone.

I plan on using those contacts to trigger the bathroom towel warmer too. Just haven’t gotten to it yet.

Just be aware the Gcal will trigger at midnight every night even if it isn’t supposed to be on. It’s a glitch in the app. Other than that it has worked very reliable for me.

1 Like
(monica@glowball.com) #22

I’m following directions at https://github.com/infofiend/GCal-Search and using code from the first post at https://github.com/mnestor/GCal-Search because the more recent post doesn’t link to any app or device code. I’ve made it up to publishing the devices, and when I try to add GCal Event Sensor as a new Device Handler from code, I get this message:

Groovy.lang.MissingMethodException: No signature of method: script_dth_metadata_be7bb5d4_84ea_4f79_a847_78737b3ac66b.appSetting() is applicable for argument types: (java.lang.String) values: [clientId] Possible solutions: typeSetting(java.lang.String), typeSetting(java.util.Map), typeSetting(java.lang.String, java.lang.String), getSettings(), setSettings(java.lang.Object), typeSetting(java.lang.String, java.lang.String, java.util.List)

Some searching implies the error is related to calling a function with the wrong parameters or the wrong number of parameters. How did you get around this error? Am I using old code? The latest GitHub page doesn’t link to any of the code. Thanks for your help – learning a lot by going through this exercise!

(Don) #23

I believe you have to update to the new code. Let me look

(Don) #24

I’m mobile so bear with me.

Does this link work?

There is a read me for the install, and the other files you need.

I think if you read later in the second thread there were changes in Google to the link you have to copy. So you might have to do those changes manually.

1 Like
(Don) #25

Disregard this,. This is for a different app.

(monica@glowball.com) #26

Shows you how unfamiliar I am with GitHub! Found the updated code, I’ll work on it and report back.

1 Like
(Don) #27

You’ll learn,. I am still figuring stuff out too. Just gotta not be afraid to try and ask questions in the threads.

(monica@glowball.com) #28

I used to be a web developer so I really appreciate you opening my eyes to apps. I am really looking forward to exploring and seeing what I can come up with. I have everything installed and published, and the settings look like it should show up in My Apps. I’ve waited for a bit and nothing is showing up there. Does it take a while?

(monica@glowball.com) #29

I was frustrated and running into the load balancing issue you helped with at Double login to IDE to get hubs and devices to show – but in a different way. I installed everything on two load balancers but still didn’t see it in My Apps. Then I realized that my Location showing in the IDE was at graph-na04-useast2.api.smartthings.com and I hadn’t installed the smart app on that load balancer. I finally did that, and now it shows up in My Apps. Madness.

To help someone else not seeing things in My Apps. In the IDE, go to My Locations, and hopefully you see the Location for where your ST is installed. Copy the subdomain or entire domain for that page. That’s the same subdomain/domain where your apps need to be installed. If you go to My SmartApps, make sure the subdomain/domain matches the one for My Locations.

1 Like
(monica@glowball.com) #30

Ever have one of those days where you work on something and after hours and hours you don’t seem to be any closer to finishing? Yeah, I’ve been working on this all day…

I understand how the IDE works now, and it’s pretty cool. GCal is working perfectly, turning lights on when a Google Calendar entry is set, as a test. However, I still would need to set my Alexa alarm. So it’s still two separate commands and less efficient than the way I was doing it earlier with ST routines, I think.

I’ve been researching and trying to understand webCoRE but I don’t think there is anyway to use an Alexa alarm as an action. Trigger, yes, but not the resulting action. So, I think it has to start from the Alexa alarm. Do you know if this is possible in the IDE?

Trigger: “Alexa, set an alarm for 5:30”

Action:
alarm set for 5:30
Google Calendar entry created at 5:15

The trick would be to be able to pass that alarm time (5:30) to the IDE or something, subtract 15 minutes, and set a calendar entry. That way, I can set an alarm for any time I want and the calendar entry would be 15 minutes earlier.

The other trick I’ve been unable to do is to use the setting of the alarm as the trigger. It’s pretty basic to have something happen when the alarm goes off, but not when the alarm is set.

After a whole day of poking at this I’ve learned a lot but I’m pretty defeated. I just KNOW that all of this is possible but I can’t seem to find my way down the right path.

#31

Just FYI: The official page to login is always https://account.smartthings.com and this will redirect you to your correct shard (or what you are referring to as a load balanced server, which it isn’t - your account is assigned to one shard and one shard only). There are a ton of posts from people saying to login to graph.api… which in the early days may have been true, but not true today, which unfortunately you had to find out the hard way. :grinning:

1 Like
(monica@glowball.com) #32

Well, I guess I’ve learned something so it isn’t all bad. Thanks for the official login link, I’ll bookmark it! FYI, if you Google “SmartThings IDE” like I’ve been doing it sends you to graph.api so that’s why I’ve been ending up there.

1 Like
(Don) #33

I’m glad you were able to set up Gcal, but I’m sorry it’s not working for your case.

I think the hang up is using Alexa as your alarm. I believe it’s basically a one way road, that road being data \ information out. I’m not very familiar with Alexa abilities, but I believe setting an alarm and a calendar event are 2 separate task. I am pretty sure Alexa can’t combine those 2 task yet.

(Hendre) #34

I use a custom DTH (designed by a forum member) to turn my wake-up alarm on/off and set the time. The custom DTH is used to determine when a webCore “wake-up” piston is executed, which turns on the heat; lights; TV etc. at specified times before the time for which the alarm was set.
You can find more details here if you are interested: [DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons

1 Like
(monica@glowball.com) #35

Interesting, Hendre, thanks! I’ll take a look at this one, too.

Don, no regrets, it helped me learn how the IDE works and that’s pretty valuable.

#36

I hope someone can find a more elegant answer than my clunky solution:

If you’re using android then the alarm clock app

‘Sleep as Android’
(https://play.google.com/store/apps/details?id=com.urbandroid.sleep&hl=en_GB)

has IFTTT integration so you can use one of its triggers to toggle a smartthings device.

(https://sleep.urbandroid.org/documentation/integration/ifttt/)

I found the most useful trigger to be ‘smart_period’ which gets sent to IFTTT 45minutes before the alarm wake up period