Maker API

If you go into the Maker API app on your hub, via a web browser, you will see the URLs that can be used locally (LAN) or remotely (CLOUD). These URLs will include the App ID of the Maker API app you're viewing.

Thanks for the info. I forgot about that.

1 Like

Hmm, I'm getting

"No response from hub"

My URL is https://cloud.hubitat.com/api/[HUB ID]/apps/577/devices/all?access_token=[access token]

Local URL seems fine

http://[Hub IP]/apps/api/577/devices/all?access_token=[access token]

From the WARNING its clear that the Maker API allows bi-directional communication, CAN it be set to read-only?

Allow access from Cloud is checked.

That is a "read" (get) command to download the status of all your devices in a json string. You cannot write to this command of course because it wouldn't know what command is targeted at what specific device. On the Maker API page on the hub it lists the various URLs available to you (the "writable" (send) ones are listed there and are on a per-device basis).

3 Likes

So the main url https://cloud.hubitat.com/api/[HUB ID]/apps/577/devices/all?access_token=[access token]

Only allows for reading of status, and all the per device urls are for sending commands back to the devices?

Just planning for how to work with an external developerโ€ฆ

Yes, correct. Note the page quite clearly states "send" and "get", so it is clear. The get commands will return the device data. The send will allow you to change the device data/status. I'm using these in my new dashboard to update the display to reflect the current status of devices and to command them to change. It's pretty cool and works well!

1 Like

Any idea about the error Iโ€™m getting when I try to access via the cloud url?

Go back into the Maker API app on your hub, and make sure the Cloud connection option is enabled.

Yes it is/was

What happens when you click on the these two links in the Maker API app?

image

it opens a new page with a bunch of devices listed out

that means the cloud URLs are working correctly.

sorry, the first link outputs the list of device, the second link says

"No response from hub"

The "with all details" is what I need to show the states of the devices I assume?

Correct.

As a test, you can install a second instance of MakerAPI on the same hub, and try both links again...

Also, what happens when you click the same two URLs under the Local Endpoint section?

so added a second one, and the same issues happened.

  1. I removed all instances then added 1 new one back - "No response from hub"
  2. Removed all instances, added one back, selected only 2 devices, hue bulb and contact sensor - WORKED (for those two devices)

So it seems like there are one or more devices when added, cause some kind of issue?

Also when I went back to my app list there are now 4 instances of the Maker API that I didn't add... I assume this is not normal?

That is not normal, unless you added each of those instances...

I did not.

I delete all instances, refreshed the page (still not Maker API instances) then added 1 back, configured that one, went back to apps list, and their were 5

:man_shrugging:

I am all out of ideas...

1 Like

At least I know I can get it to work, thanks for getting me on the right path. Trying it with a subset of devices, leaving anything like groups, capture buttons, aggregated sensor states, etc. out to see if I can get it working with the subset first.

.... And that worked, I guess I can add the "exotics" back in one by one till I see what's causing the issue.

1 Like