Consuming Rest API

Hello guys.
I am new in the Hubitat, but already like it a lot. I wonder about some possibilities which I'd like to achieve and I am not sure if HE allows it. I am interested in creating some communication with some Rest APIs. Ideally, I would like to use them the same as some physical devices, so I would like to have them available in dashboards, rule engines etc.

I assume that I would need to create custom driver. Am I right? I would appreciate if someone point me the right direction to start.

Thank you and it is nice to meet you :slight_smile:

Which devices are you trying to control?

Regardless, this driver example may be a useful starting point: HubitatPublic/httpGetSwitch.groovy at master · hubitat/HubitatPublic · GitHub

5 Likes

thanks for the response. This action in Rule Machine sounds promising. I definitely would need to give it a try. From my understanding, I am able to handle only GET using this method, but is there any out of the box possibility to handle POST methods as well?

Regarding Maker API, as I can see it can be used only for exposing API from HE, but in my scenario, I am looking for a way to consume 3rd party APIs.

Thanks a lot!

This is an old link but still useful?

Also this thread as well maybe..

1 Like

I don't have any of it yet, but I am during building my house and as I can see, for sure there will be some incompatible devices which will not be supported. For example, I would like to have switchers for window shutters grouped in one place on a single panel, so it is hard to handle it using just zigbee/z-wave devices, so I am thinking maybe about knx for that, expose API and handle it in HE, but we'll see.

BTW your link is great, it seems understandable and I think it is a good place to start.

Thanks a lot

1 Like

Thanks for the examples, for sure it will be helpful!

1 Like

Awesome, thank you guys. Didn't even imagine that I would receive so much help from your side in just 1 hour. It is more clear now!

I'm not an employee of Hubitat, Inc (and assume @LibraSun isn't either).. that's one of the really cool things about this community, a lot of folks are very active and helpful.

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.