It looks like I need to create my own version of the Maker API app that exposes more internal methods.
Is there any source available for that app, or any pointers I can start with?
Even a basic API "hello world" would be sufficient.
It looks like I need to create my own version of the Maker API app that exposes more internal methods.
Is there any source available for that app, or any pointers I can start with?
Even a basic API "hello world" would be sufficient.
This won't be simple if you are new to Hubitat development, as it requires the use of Oauth and endpoints to serve this data. There are snippets the docs but no fully functional app you can copy and paste to use.
An alternative approach would be using a device that offers this information, then can use that over Maker API like any device, as suggested above. If you are writing this app for others, the trick would be getting them to do this (and choose the device), which could be part of your install instructions.
I have code for a MakerAPI work alike that i was writing for another effort that came to an abrupt end that I can make available to you. Should be 1 for 1 on the Maker functions and I believe has a couple additional.
It sounds like I won't be able to interact with the Hubitat hub in any meaningful way via my own app then? That's unfortunate. I was hoping this would be a good solution to do that.
It looks like all the methods are there, but only exposed via local Groovy apps.
A RESTful API would really extend the functionally of this platform. It would allow third parties to write apps in any language.
Is the source code to the Maker API available? I'm comfortable with OAuth, endpoints, etc., and it sounds like it's 90% there, just needs more methods exposed...
Thanks. If you can share, I'd be grateful. If nothing else, it will let me get a feel for what it would take to create a more complete (Maker API) solution.
Hubitat looks like a competent platform, but is missing a key component IMO.
Go to the Drivers Code tab and Select Create a new driver and import from https://raw.githubusercontent.com/thebearmay/hubitat/main/hubInfoV3.groovy. Then go the Device tab, create a new virtual device from the entry labeled Hub Information Driver v3, save go back into the device, modify the preferences and save the preferences.
Thank you. Much appreciated. I have it installed.
Do you have an example of calling the app?
Is it similar to the Maker API call such as:
http://192.168.1.69/apps/api/6/devices/[Device ID]?access_token=xxx
Should be the identical format as the intent was to provided an extended version of the original.
Thanks... I'm close... but:
Your app, when run, (under endpoint information) says:
Local Server: http://192.168.1.69/apps/api/58
With an access token of "xxx" (hidden here).
If I call the endpoint (devices) with:
http://192.168.1.69/apps/api/58/devices?access_token=xxx
I get as a result. (So an empty array), not a JSON list off devices as I'd expect. I think I'm missing some small detail...
I think the Hubitat team is warming to this idea. It was added to the new dashboard solution and will display a network error icon when set to offline. ![]()
Did you define the devices that it is permitted to report on under the Device Management section?
Ah! I did not. Thank you. That did it. Much appreciated.
I'm now able to expose more detailed hub information via the internal methods. For example, I can call: http://192.168.1.69/apps/api/58/location?access_token=xxx
to get:
{"name":"Home","latitude":"xx.730400","longitude":"-xx.484300"}
This gives me a framework to work from now.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.