mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 11:06:32 +00:00
commit
d38707821c
46
API.md
46
API.md
@ -22,9 +22,9 @@ On success
|
|||||||
|
|
||||||
### HassIO
|
### HassIO
|
||||||
|
|
||||||
- `/supervisor/ping`
|
- GET `/supervisor/ping`
|
||||||
|
|
||||||
- `/supervisor/info`
|
- GET `/supervisor/info`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ On success
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/supervisor/update`
|
- POST `/supervisor/update`
|
||||||
Optional:
|
Optional:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -52,28 +52,28 @@ Optional:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/supervisor/option`
|
- POST `/supervisor/options`
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"beta_channel": "true|false"
|
"beta_channel": "true|false"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/supervisor/reload`
|
- POST `/supervisor/reload`
|
||||||
|
|
||||||
Reload addons/version.
|
Reload addons/version.
|
||||||
|
|
||||||
- `/supervisor/logs`
|
- GET `/supervisor/logs`
|
||||||
|
|
||||||
Output the raw docker log
|
Output the raw docker log
|
||||||
|
|
||||||
### Host
|
### Host
|
||||||
|
|
||||||
- `/host/shutdown`
|
- POST `/host/shutdown`
|
||||||
|
|
||||||
- `/host/reboot`
|
- POST `/host/reboot`
|
||||||
|
|
||||||
- `/host/info`
|
- GET `/host/info`
|
||||||
See HostControl info command.
|
See HostControl info command.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -86,7 +86,7 @@ See HostControl info command.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/host/update`
|
- POST `/host/update`
|
||||||
Optional:
|
Optional:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -96,9 +96,9 @@ Optional:
|
|||||||
|
|
||||||
### Network
|
### Network
|
||||||
|
|
||||||
- `/network/info`
|
- GET `/network/info`
|
||||||
|
|
||||||
- `/network/options`
|
- POST `/network/options`
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"hostname": "",
|
"hostname": "",
|
||||||
@ -112,7 +112,7 @@ Optional:
|
|||||||
|
|
||||||
### HomeAssistant
|
### HomeAssistant
|
||||||
|
|
||||||
- `/homeassistant/info`
|
- GET `/homeassistant/info`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@ Optional:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/homeassistant/update`
|
- POST `/homeassistant/update`
|
||||||
Optional:
|
Optional:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -129,13 +129,13 @@ Optional:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/homeassistant/logs`
|
- GET `/homeassistant/logs`
|
||||||
|
|
||||||
Output the raw docker log
|
Output the raw docker log
|
||||||
|
|
||||||
### REST API addons
|
### REST API addons
|
||||||
|
|
||||||
- `/addons/{addon}/info`
|
- GET `/addons/{addon}/info`
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"version": "VERSION",
|
"version": "VERSION",
|
||||||
@ -146,7 +146,7 @@ Output the raw docker log
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/addons/{addon}/options`
|
- POST `/addons/{addon}/options`
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"boot": "auto|manual",
|
"boot": "auto|manual",
|
||||||
@ -154,11 +154,11 @@ Output the raw docker log
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/addons/{addon}/start`
|
- POST `/addons/{addon}/start`
|
||||||
|
|
||||||
- `/addons/{addon}/stop`
|
- POST `/addons/{addon}/stop`
|
||||||
|
|
||||||
- `/addons/{addon}/install`
|
- POST `/addons/{addon}/install`
|
||||||
Optional:
|
Optional:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -166,9 +166,9 @@ Optional:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/addons/{addon}/uninstall`
|
- POST `/addons/{addon}/uninstall`
|
||||||
|
|
||||||
- `/addons/{addon}/update`
|
- POST `/addons/{addon}/update`
|
||||||
Optional:
|
Optional:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ Optional:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/addons/{addon}/logs`
|
- GET `/addons/{addon}/logs`
|
||||||
|
|
||||||
Output the raw docker log
|
Output the raw docker log
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ First private cloud solution for home automation.
|
|||||||
|
|
||||||
It is a docker image (supervisor) they manage HomeAssistant docker and give a interface to control itself over UI. It have a own eco system with addons to extend the functionality in a easy way.
|
It is a docker image (supervisor) they manage HomeAssistant docker and give a interface to control itself over UI. It have a own eco system with addons to extend the functionality in a easy way.
|
||||||
|
|
||||||
[HassIO-Addons](https://github.com/pvizeli/hassio-addons) | [HassIO-Build](https://github.com/pvizeli/hassio-build)
|
[HassIO-Addons](https://github.com/home-assistant/hassio-addons) | [HassIO-Build](https://github.com/home-assistant/hassio-build)
|
||||||
|
|
||||||
**HassIO is at the moment on development and not ready to use productive!**
|
**HassIO is at the moment on development and not ready to use productive!**
|
||||||
|
|
||||||
@ -53,4 +53,4 @@ docker logs homeassistant
|
|||||||
## Install on a own System
|
## Install on a own System
|
||||||
|
|
||||||
We have a installer to install HassIO on own linux device without our hardware image:
|
We have a installer to install HassIO on own linux device without our hardware image:
|
||||||
https://github.com/pvizeli/hassio-build/tree/master/install
|
https://github.com/home-assistant/hassio-build/tree/master/install
|
||||||
|
@ -30,16 +30,16 @@ class RestAPI(object):
|
|||||||
api_host = APIHost(self.config, self.loop, host_control)
|
api_host = APIHost(self.config, self.loop, host_control)
|
||||||
|
|
||||||
self.webapp.router.add_get('/host/info', api_host.info)
|
self.webapp.router.add_get('/host/info', api_host.info)
|
||||||
self.webapp.router.add_get('/host/reboot', api_host.reboot)
|
self.webapp.router.add_post('/host/reboot', api_host.reboot)
|
||||||
self.webapp.router.add_get('/host/shutdown', api_host.shutdown)
|
self.webapp.router.add_post('/host/shutdown', api_host.shutdown)
|
||||||
self.webapp.router.add_get('/host/update', api_host.update)
|
self.webapp.router.add_post('/host/update', api_host.update)
|
||||||
|
|
||||||
def register_network(self, host_control):
|
def register_network(self, host_control):
|
||||||
"""Register network function."""
|
"""Register network function."""
|
||||||
api_net = APINetwork(self.config, self.loop, host_control)
|
api_net = APINetwork(self.config, self.loop, host_control)
|
||||||
|
|
||||||
self.webapp.router.add_get('/network/info', api_net.info)
|
self.webapp.router.add_get('/network/info', api_net.info)
|
||||||
self.webapp.router.add_get('/network/options', api_net.options)
|
self.webapp.router.add_post('/network/options', api_net.options)
|
||||||
|
|
||||||
def register_supervisor(self, supervisor, addons, host_control):
|
def register_supervisor(self, supervisor, addons, host_control):
|
||||||
"""Register supervisor function."""
|
"""Register supervisor function."""
|
||||||
@ -48,9 +48,11 @@ class RestAPI(object):
|
|||||||
|
|
||||||
self.webapp.router.add_get('/supervisor/ping', api_supervisor.ping)
|
self.webapp.router.add_get('/supervisor/ping', api_supervisor.ping)
|
||||||
self.webapp.router.add_get('/supervisor/info', api_supervisor.info)
|
self.webapp.router.add_get('/supervisor/info', api_supervisor.info)
|
||||||
self.webapp.router.add_get('/supervisor/update', api_supervisor.update)
|
self.webapp.router.add_post(
|
||||||
self.webapp.router.add_get('/supervisor/reload', api_supervisor.reload)
|
'/supervisor/update', api_supervisor.update)
|
||||||
self.webapp.router.add_get(
|
self.webapp.router.add_post(
|
||||||
|
'/supervisor/reload', api_supervisor.reload)
|
||||||
|
self.webapp.router.add_post(
|
||||||
'/supervisor/options', api_supervisor.options)
|
'/supervisor/options', api_supervisor.options)
|
||||||
self.webapp.router.add_get('/supervisor/logs', api_supervisor.logs)
|
self.webapp.router.add_get('/supervisor/logs', api_supervisor.logs)
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ class RestAPI(object):
|
|||||||
api_hass = APIHomeAssistant(self.config, self.loop, dock_homeassistant)
|
api_hass = APIHomeAssistant(self.config, self.loop, dock_homeassistant)
|
||||||
|
|
||||||
self.webapp.router.add_get('/homeassistant/info', api_hass.info)
|
self.webapp.router.add_get('/homeassistant/info', api_hass.info)
|
||||||
self.webapp.router.add_get('/homeassistant/update', api_hass.update)
|
self.webapp.router.add_post('/homeassistant/update', api_hass.update)
|
||||||
self.webapp.router.add_get('/homeassistant/logs', api_hass.logs)
|
self.webapp.router.add_get('/homeassistant/logs', api_hass.logs)
|
||||||
|
|
||||||
def register_addons(self, addons):
|
def register_addons(self, addons):
|
||||||
@ -67,14 +69,15 @@ class RestAPI(object):
|
|||||||
api_addons = APIAddons(self.config, self.loop, addons)
|
api_addons = APIAddons(self.config, self.loop, addons)
|
||||||
|
|
||||||
self.webapp.router.add_get('/addons/{addon}/info', api_addons.info)
|
self.webapp.router.add_get('/addons/{addon}/info', api_addons.info)
|
||||||
self.webapp.router.add_get(
|
self.webapp.router.add_post(
|
||||||
'/addons/{addon}/install', api_addons.install)
|
'/addons/{addon}/install', api_addons.install)
|
||||||
self.webapp.router.add_get(
|
self.webapp.router.add_post(
|
||||||
'/addons/{addon}/uninstall', api_addons.uninstall)
|
'/addons/{addon}/uninstall', api_addons.uninstall)
|
||||||
self.webapp.router.add_get('/addons/{addon}/start', api_addons.start)
|
self.webapp.router.add_post('/addons/{addon}/start', api_addons.start)
|
||||||
self.webapp.router.add_get('/addons/{addon}/stop', api_addons.stop)
|
self.webapp.router.add_post('/addons/{addon}/stop', api_addons.stop)
|
||||||
self.webapp.router.add_get('/addons/{addon}/update', api_addons.update)
|
self.webapp.router.add_post(
|
||||||
self.webapp.router.add_get(
|
'/addons/{addon}/update', api_addons.update)
|
||||||
|
self.webapp.router.add_post(
|
||||||
'/addons/{addon}/options', api_addons.options)
|
'/addons/{addon}/options', api_addons.options)
|
||||||
self.webapp.router.add_get('/addons/{addon}/logs', api_addons.logs)
|
self.webapp.router.add_get('/addons/{addon}/logs', api_addons.logs)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"""Const file for HassIO."""
|
"""Const file for HassIO."""
|
||||||
HASSIO_VERSION = '0.16'
|
HASSIO_VERSION = '0.17'
|
||||||
|
|
||||||
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
||||||
'hassio/master/version.json')
|
'hassio/master/version.json')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user