Beyond the Maker API

The maker API is a great start but there should also be an API for settings. In particular, I want to be able to programmatically update the IP address for devices that store them. I can do a MAC=>IP mapping in my desktop app but how do I that information in the settings for a device?

No, settings are not accessible from the Maker API and that is on purpose. It is a security measure that only the device itself can access it's state variable and it's settings. Apps can't even access a devices settings. Only if the driver has a published method (command) to update a setting can you do that. You could have a method in your driver that would take the new IP you want to assign and use that to update the setting but that would have to be built into your driver. Personally, I would never build such a function into a driver. I only want a setting to change if I change it. The only reason to have it done by the maker api is if i want it done automatically by some other system, which opens up a HUGE set of risks. Otherwise, it's just as easy to log into the GUI and do it by hand.

1 Like

I would agree. That access restriction is by-design, and very unlikely to change.

This system is not an integrator's toolkit, it is a consumer oriented hub, I'm very grateful that they provide Maker API at all, actually.

Maybe if they change their business model to chase 3rd party installs/rebranding/integration they would add this capability to trusted/contracted/certified integrators, but to my knowledge that is not in the works at all.

2 Likes

I'm amused by the defense of the limitations. If I wanted to do all this manually why would I be using this technology in the first place?

1 Like

I'm not defending anything. I'm merely explaining to you what reality is and why it is the way it is. And why you are very unlikely to get a positive response on your request from Hubitat staff. Would you rather have gotten no response at all?

1 Like

There is an API for settings, and it is Maker API. The setting has to be settable by a command. If it is, then Maker API can send that command to change that setting. The selection of available commands is up to the driver author.

So, to get what you're looking for specifically, surface the list of drivers that have settings for which there are no commands, so the discussion can be focused on whether or not those drivers should have the feature you need.

This is more a driver functionality discussion than it is a Maker API or "api" in general discussion.

3 Likes

Yawn. Yup, yours is the only right and important viewpoint. Good luck.

bravenel (Hubitat) - That makes sense. It's for the Philips Wiz driver and I have asked. Thanks.