Maker API get attribute value?

I am trying to use Tasker to pull the 'presence' attribute from a Hubitat Presence sensor. I was thinking I may be able to use Maker API to do this, but I don't see how? I see how it returneds the JSON information that contains the attribute CurrentValue I want, but I don't know how to have Tasker get just that information? Is this possible? Any better to achive this?

Maybe this tutorial would help? I use iOS, so not much Tasker experience personally...

https://forum.joaoapps.com/index.php?resources/autotools-json-read-getting-started.168/

1 Like

This "should" be possible. I'll give it a shot when I get home tonight.

Perfect. I think that does what I wanted. Thank you.

1 Like

Are you going to purchase the AutoTools app?
That should definitely work. I'm willing to try to get it working without the add-on app but won't bother if you are planning to purchase AutoTools.

I have the AutoTools app.

Awesome. I may give it a shot sometime for the sake of trying :stuck_out_tongue_winking_eye:.

Just curious...what did you want to do with the result of the Maker Api query?

I was thinking I had done this without autotools. But looking at my tasker list I was wrong.

This is what I used it for.

I am actually trying to replicate an old SmartThings-Tasker-SharpTools presence routine.
https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-tasker-sharptools-autolocation
I had it all set up except for pulling the current state of the presence sensor and setting a Tasker variable with that value. With this last part I think I have it all completely replicated now. Just need to test and watch how it executes to see if it is working now.

Hi were you ever able to make the presence routine work with HE? I'm migrating from Smartthings to HE and I've been using Tasker / sharptools as a presence trigger that works great with Smarttings. I'd like the same setup with HE.

I’ve used Locative to on iOS to make MakerAPI cloud calls to update the status of a virtual presence device. It works fine. So, I would think Tasker would work as well.

1 Like

I did get it to work As @ogiewon described, I use a virtual presence/switch device and use MakerAPI cloud updates to set it's status. Everything else is the same as the SmartThings setup.

1 Like

Matthew,

This sounds promising and if I can make it work then I'm 100% in on moving to HE. My presence drives a significant webcore piston and can't do without it.

I'm just learning HE and not familiar with MakerApi. Can you give me a bit more info how you made it work? Thanks.

Here is how I made it work with Locative. The URLs used for MakerAPI will be the same whether used via Locative, Tasker, or any other app that can make a web call.

Think I figured this out even though I don't have my HE hub to test. Won't be delivered until Tuesday.

  1. Create virtual presence devices in HE :
  2. Use Maker API to link virtual presence device and generate two URLs (Present and Not Present) and adjusting URL for device ID.
  3. In Tasker I already have a task "Arrive" . I'll just add another step: Net> HTTP Request > GET > enter the URL from Maker API that is Present.
  4. In Tasker I already have a task "Depart" . I'll just add another step: Net> HTTP Request > GET > enter the URL from Maker API that is Not Present.

I think this is correct.

Getting this correct is very important because the Presence drives a Webcore piston that turns off the security system, unlocks doors, opens garage door, turns on lights, changes A/C temp. And the opposite when I leave.

2 Likes

I have this running successfully on my phone using Tasker setup like yours. You didn't specify but make sure to use the cloud version of the Http Request. Also your Profile is a Location and Task is the Arrival Http Request and your Exit Task is your Departed Http Request. You probably already knew that but just in case.

If you have Autolocation plugin, I think you can also use that as an Event Profile but I haven't tried it yet.

1 Like

Got my HE Hub and tested my modified Smartthings presence Task using Maker API. It works! Thanks for your help.
Now the next thing I have to learn is how to port a device handler from Smarttings to HE. Once that's done I can start moving devices over

Hi, I am trying to migrate the same ST/SharpTools/Tasker/AutoLocation presence implementation to Hubitat. Got the json read and sending commands via Maker API to work just fine. How did you implement syncing a Tasker variable though? ST/Sharptools was able to subscribe to a thing's attributes and a value change could be used to trigger a Tasker event to write the tasker variable thus automatically keeping it in sync with ST.

I have a tasker task to set a tasker variable whenever a presence change occurs :

Set a variable

The first task is to read the JSON return (step #2 in the first task):

read the JSON return

Then extract the virtual presence sensor value from the JSON return (step #4 in the first task):

extract the virtual presence sensor value from the JSON return

Then you set your Tasker variable to the presence sensor value from the JSON return (step #6 in the first task).

Hope that helps.

Thanks, that's great - I thought of something like this, with the details you provided it will be easy to replicate.

Just curious what you have as the trigger for running your tasker "set presence variable" task? Do you just call the task and pull the current presence value from Hubitat each each time you need the presence value in another tasker task? With the Sharptools/ ST integration a value change of a subscribed attribute in ST could be used as the a trigger event in Tasker - i.e. the ST and Tasker presence variables would "self-sync".

Although thinking about it calling the "set presence variable" task to refresh presence each time a current value is needed may actually be quicker and more precise...