[Solved] MakerApi - Get and Set Modes

Hi,

Would it be possible to extend the MakerApi to retrieve a list of available modes (including an identifier of the currently active one] and be able to set a mode, e.g. something like this:

Get:
.../apps/api/XXX/modes?access_token=

Set:
.../apps/api/XXX/modes/[modeName]?access_token=

Thanks

3 Likes

There is a fairly simple workaround for the control part of your question with Virtual Switches. Add one virtual switch per mode to Hubitat and then set up a rule for each that if it turns on it switches your mode. Then you would just have to turn the switch on via the maker api and you could control the mode. Reporting the mode would be slightly harder and require you to analyze multiple devices. But it is doable. For the reporting part, might be easier to wait to see if the hubitat team weighs in.

You may also want to email your request to support@hubitat.com. A forum post doesn't always get the attention it deserves.

Thanks Ryan, I am aware of that, it just isn’t a good solution for what I am working on.

I am working on a changed Homebridge Integration that won’t have the problems (slowdowns/freezes) that the current one has. I would love to support Modes and HSM without having the need for everyone to create very specific virtual switches. I was hoping a “simple” extension to the MakerApi could solve that problem. In parallel, I am also looking at HubConnect to see if Homebridge can be integrated nicely via that awesome community app.

I am going to go out on a limb here and just tag @patrick and hope I will get his or the teams attention that way :wink:

1 Like

Ooohhhh!!! I like the idea!!!

I'd actually like to see the Maker API be more robust all around in terms of info and such. Maybe even make it something of a general usage API for the hub itself that covers apps, hub details, devices, rules, etc. Maybe we should start a feedback thread specific to the Maker API and tag the devs in it?

Modes will be coming in the next release of Maker API.

It will return a list of modes with id, name and if it's active or not. Changing modes will be based on the id and not the name.

Working on HSM status and changing it. Not sure if it will make 2.0.9 but that is the goal.

5 Likes

Thank you so much @patrick

@patrick : If I haven't said it lately of you and the rest of the devs; I really appreciate you guys!!!

You just made my day!

Can I get in on the beta of 2.0.9 (and forward) regarding Maker API changes and such? I think (hope) I'm one of the heavier Maker API users.

1 Like

@patrick I would really like to get into the beta as well.

Admitting my bias up front..

but eliminating the Homebridge app from the Hub and having the Hubitat Plug-in to Homebridge on the NodeJS server simply be a Remote-Client would be a grand solution. From the vantage point of a MultiHub user, it's fair to say that a HomeKit hub (iPad, HomePod, AppleTV) is just another hub.

It's probably an idea that others can run with too, such as Vera or HomeSeer as remotes.

1 Like

You know that I am actively looking at that, so I don't have to say that. But for full disclosure, I am looking at both cases:

  1. Homebridge plugin via HubConnect
  2. Homebridge plugin via MakerApi

In both cases the Homebridge App would go away. Case 1 has the benefit for users with multiple hubs, case 2 has the benefit for the users that don't have multiple hubs and don't see the need to install a custom app. It would just run with the built-in app.

Again, I am looking at both. I have Option 2 almost done, waiting for release 2.0.9 though.
Option 1 is what I am playing with right now

2 Likes

Choice is good :smile:

Hi, i really want to be able to change modes in maker api, when will the update be released?

It was released roughly April 29th...

almost 90 days ago. :slight_smile:

50%20AM

oh thanks, where can i find that info?

Cool thx

you should "Watch" that perhaps:

At the far right of that screen cap is a green circle with a ! in it.. -- shows I'm Watching the topic.

Yes i will do that

My HE is running version 2.2.0.132 with both Hubitat Safety Monitor and Maker API installed, but in the Maker API device list there is no HSM option for me to select. It doesn't appear that I can retrieve or set HSM status via Maker API. Am I missing something?

Hsm isn't a device, so I wouldn't expect it to show there.

Did you try to do a maker API get on hsm and see if it returns the current state (as listed a few posts above)?

If so, what was the url you used, and what did it return?