Octoblu SmartApp (BETA)

Tobias,

I have set up this demonstration in OctoBlu Flows. It works (except for the voice, since I am running on Win-10).

I would like to make determination of the Mode I am currently set to. If the Mode is “Home” do not trigger the motion sensor alert. If Mode is “Away”, then go for the alert.

How would I be able to get this information from ST?

  • Nate

Nate, I just placed an order for a hub and so cannot tell you at this point how to query the mode option. My guess is you’ll need to of course first set it up and then what I’d do is connect a manual trigger and a debugger to it so you can see what output it delivers when manually triggered. From that it should be possible to figure out the pointer to the location state from he debug output. If I manage to figure some of this out within the next week or so once I finally have one of these units in hand, I’ll gladly publish whatever flows I’m able to create.

Tobias,

I imagine that somehow, the SmartApp needs to be associated with the Hub. Right now, it seems to me that the OctoBlu SmartApp only associates with Things unless I am missing something obvious.

I am able to query the Things and get output from the debugger. If there were some means of querying the Hub or the IDE through the SmartApp, there is a myriad of data available including the Location.

I am happy to help with any debugging of flows related to the ST integration, if you would like some assistance. I’m not anyone’s excuse for a developer, but I’m willing to hack at it!

Thanks!

  • Nate

Hi Nate,

The SmartApp is associated to a hub in that the app needs to be installed to a specific location, and each location only supports one hub.

I like the idea of creating an Octoblu device that represents the hub and can query the Hub, Location, and Mode APIs. Thanks for the feedback!

-Erik

Erik,

Thanks for the note. Same offer… If I can assist with the hacking, let me know!

  • Nate

Indeed. If one has multiple hubs, they should be able to work independently of each other, at least unless one wants to somehow connect them.

BTW, is there a way to query for the date and time via Octoblu other than the “sentiment” tool? I’d like to be able to check or schedule something based on date and/or time ranges as opposed to just using a timer and then have to do all sorts of comparisons to see if valid or not.

I’m of course all in when it comes to helping any way I can. I have lots to learn, being a novice at a lot of this, so hopefully patience will prevail! :slight_smile:

–Tobias

Nate,
Just got the unit tonight and can already give you a response. If you introduce your “Home SmartApp” as a Thing into Octoblu, you should be able to feed its output to a “compose” tool and configure it with:

Value 	                   Key 	

{{msg.payload.mode}} payload.mode

and check if {{msg.payload.mode}} = Home with an Equal tool, and if true, then branch accordingly, for example.

You may need to download the latest Octoblu code for this to work, which Erik just put in place earlier today (plus he also helped me tremendously with some debugging assistance!).

–Tobias

Tobias,

Yep! As soon as I re-published the SmartApp with the new code and re-authorized in SmartThings, OctoBlu reported the available OctoBlu Thing.

Many thanks to you and to Erik for your help in putting this out there!

Great work!

  • Nate

That code above just identifies the hub name (“Home” in this case, which was a bad choice as it’s also a potential location token setting). Just wanted to clarify that, but the point was that’s where various settings are now accessible. To get the multi-values list of the status you need to use payload.modes which will return the hub status (like “Night”), the hub name (like “Home”) and the state (like “Away”).

Erik,

How about an OctoBlu device which represents a ROUTINE?

Here is my thought… I am using the ARP table on my router to establish presence. It works great! However, the next step would be to initiate some action on the SmartThings hub (turn off lights, lock the door, set the alarm, etc…).

But, as fate would have it, I have a routine which I kick off when I leave the house (“Goodbye”) and when I return (“I’m back”) which perform just the tasks I need performed.

So I would love to see an opportunity to use OctoBlu to kick off the routine based on the results of my presence detection.

I looked at the SmartApp. I was quickly overwhelmed by the code. I would love to learn Groovy in my copious amounts of spare time, but I think you or Steve might have an easier go of it? I am willing to help out with the testing, and to share my flows with any and all.

Thanks!

  • Nate

Nate,
Using the Internet or bluetooth, your SmartThings Phone App can be used to determine and/or set you location, as well as I think there is a way to let the GPS help in that capacity. Once set, it shows up as a hub setting, which you can query and trigger on in various ways, including via Octoblu. See for example a very cool extended example of this in the video shown here: https://blog.smartthings.com/news/smartthings-updates/smartthings-bmw/ . I don’t think you need to do any recoding of the interface (Groovy) itself to accomplish this! See also: Smartthings BMW connected drive
-=Tobias

Tobias,

You are correct. The GPS geofencing properties are available, but are known to be flawed and unreliable.

I was looking for an alternative means of identifying presence by utilizing the WiFi router ARP table. I am now getting reliable detection of a device proximity. This is done through OctoBlu making a call to the router via HTTP and extracting the known MAC address of the phone.

But since this is now external to SmartThings, there needs to be a return call to SmartThings to perform the desired activities. As I see it, the easiest method is by using the existing Routines which have been programmed to be performed manually (Goodbye and I’m Back). So if OctoBlu were able to see the Routines as a “Thing”, it could be triggered as part of my flow.

Thus my query for modifying the existing OctoBlu SmartApp. If I were any good at coding, I might try it myself, but I’m a little over my head with that! :slight_smile:

Thanks for the reply!

  • Nate

Are the coordinates really off by that much to make a difference?

Tobias,

It is not a question of coordinates, but of functionality. If you do a quick search in the community for “mobile presence”, you will see long-standing threads of frustrations with mobile phone presence detection, both in iOS and Android. To the extent that most users pay for a separate Presence Sensor.

There are several suggestions and smartapps which focus on working around this issue. I chose to look at using the WiFi router as the detection model.

The addition of triggering Routines is not just for this application, but I can see other OctoBlu integrations taking advantage of this as well.

Thanks!

  • Nate

I understand integration is supposed to go official soon. Is there an ETA on this? So glad to see it coming to fruition! Check out my article on SmartThings-Octoblu integration at https://www.mycugc.org/blog/smartthings-octoblu-integration

1 Like

Read the article! It was great! Very helpful!

Are you a Citrix employee? Or just in the UG?

I am a member of the UG, not a Citrix employee, As a Citrix Technology Professional (CTP) I have a lot of ties with Citrix, including the Octoblu area, and am very active in CUGC, as well. There is also the personal attraction to IoT in general and SmartThings, in particular, so there is definitely a vested interest.

This is the follow-up article on IoT/Octoblu integration with SmartThings, focused on the Zooz 4-in-1 motion sensor. I hope it’s useful to some of you. https://www.mycugc.org/blog/smartthings-octoblu-integration,-redux-processing-motion-sensor-data

That 1st article was a huge help. I only got as far as the Oauth in the mobile SmartThings app and got stuck. I normally log in with Google and the app throws a 403 error saying the app couldn’t authorize, only with a browser.

Anybody else trying to get it to work this year successfully?

Hi, Mike: My recollection is that I had to go through the oauth process several times before it worked. If you pre-auth via the Web browser, you know the connection will work. Maybe something is cached and restarting the smart phone might help? Hopefully, nothing significant has changed in the procedure meanwhile. Once going, it should continue to work and still does in my case.