Art-of-WiFi / UniFi-API-browser

Tool to browse data exposed by Ubiquiti's UniFi Controller API
MIT License
1.1k stars 150 forks source link

Default Site / Collection #86

Closed bingold closed 3 years ago

bingold commented 3 years ago

I miss the option to define the default Site / Collection per Controller? Or have I missed something?

The background is that I call the script for presence detection from my smart home server and of course it cannot make a selection.

malle-pietje commented 3 years ago

The API Browser is meant to be used in an interactive manner. If you have a specific requirement I suggest you use the PHP API client class which comes with a lot of examples to get you started quickly: https://github.com/Art-of-WiFi/UniFi-API-client https://github.com/Art-of-WiFi/UniFi-API-client/tree/master/examples

malle-pietje commented 3 years ago

To be clear: the PHP API client already is included with the API Browser.

bingold commented 3 years ago

Loxone Miniserver only supports HTTP Virtual Inputs, there is no support for API communication, in the older version it was possible to define the default Site / collection in the config file this was already enough.

But it seems that I have to implement something between Miniserver / Unifi Controller.

malle-pietje commented 3 years ago

No, I meant you can create a script on the same “box” the API Browser is now running on where you create your own config and logic which returns json output as required.