Location event types


#1

Hello all, I am trying to get up to speed on writing smartapps and I am having trouble finding what location events are available. If I go to the documentation it says that you can subscribe to the following location events: mode, position, sunrise, sunset, sunriseTime and sunsetTime. However while looking through other peoples code I find stuff like location.timeZone and location.helloHome.execute/phrases.

I guess I am either mixing up different kinds of “location” or the documentation doesn’t cover all the different types of location events. If there is a thread or a place in the docs that explains this please link it, my searching has not come up with anything.

Thanks


(Jim Anderson) #2

Hi @prrthd, we recently (like yesterday!) updated those docs to discuss Location events. There are some that are not properly documented in that doc yet.

I’ll make sure any supported events get added there.


(Jim Anderson) #3

See also the Location class reference doc: https://graph.api.smartthings.com/ide/doc/location

timeZone is a property of the location object, as is helloHome. The helloHome property isn’t documented at this time, but timeZone is.

As we look to make bigger changes to our documentation, we will consider making all the event information documented alongside an object’s properties and methods.


#4

I was looking all over the place for the class definitions, Thanks! That will get me moving in the right direction. Any idea why when I used the docs search for timezone no results came up?

How would I go about learning more about the helloHome property, just look through other peoples code?

Thanks again


(Jim Anderson) #5

Our reference documentation does not currently reside in the same repository (ReadTheDocs) as the rest of our documentation. This has the unfortunate side-effect of not being searchable. We will fix that, but it may be a bit since it involves a bit more than meets the eye.

Looking through other people’s code is going to be your best bet for the helloHome property at this time. We will get some more documentation around this in the future, but that won’t fix your question right now.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #6

Any chance of getting a search global function that will scan all open sourced SmartApps and SmartDevice Type Handlers?

I don’t know which SmartApp template to start with to look for a helloHome property; unless you are just referring to this (location.helloHome.getPhrases()), in which case, I guess I’ve found one (SmartApp: Button Controller, and used in my own as well). But are there other properties of location.helloHome?

def phrases = location.helloHome?.getPhrases()*.label
if (phrases) {
           myDebug("Phrase list found: ${phrases}")
           /* NB: Customary to not allow multiple phrases. Complications due to sequencing, etc. */
           input "phrase", "enum", title: "Trigger Hello Home Action", required: false, options: phrases
}

(Jim Anderson) #7

I sympathize. We are looking at how we can more publically share SmartApps in a searchable form, whether that be in a public github repo or some other form.