ops in description
This commit is contained in:
parent
f6a905f44f
commit
e99275024f
@ -2,40 +2,3 @@
|
|||||||
|
|
||||||
[Network UPS Tools](http://networkupstools.org/) is used to connect to another machine running the same software.
|
[Network UPS Tools](http://networkupstools.org/) is used to connect to another machine running the same software.
|
||||||
You just need to specify some connection parameters. You can also configure the shutdown delay (in minutes).
|
You just need to specify some connection parameters. You can also configure the shutdown delay (in minutes).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
|
||||||
"delay": "5" non va bene, perchè è solo per master mode. E' il master che decide quando fare SHUTDOWN
|
|
||||||
|
|
||||||
- in batteria
|
|
||||||
- master manda NOTIFY_SHUTDOWN
|
|
||||||
- master aspetta FINALDELAY seconds
|
|
||||||
- master esegue SHUTDOWNCMD
|
|
||||||
|
|
||||||
usare hassio api
|
|
||||||
|
|
||||||
POST /host/shutdown
|
|
||||||
|
|
||||||
On error / Code 400:
|
|
||||||
|
|
||||||
{
|
|
||||||
"result": "error",
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
On success / Code 200:
|
|
||||||
|
|
||||||
{
|
|
||||||
"result": "ok",
|
|
||||||
"data": { }
|
|
||||||
}
|
|
||||||
|
|
||||||
For access to API you need set the X-HASSIO-KEY they will be available for Add-ons/HomeAssistant with envoriment HASSIO_TOKEN.
|
|
||||||
https://github.com/home-assistant/hassio/blob/master/API.md
|
|
||||||
|
|
||||||
https://developers.home-assistant.io/docs/en/hassio_addon_communication.html
|
|
||||||
|
|
||||||
aggiungere dipendenza curl
|
|
||||||
|
|
||||||
curl -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X POST http://hassio/host/shutdown
|
|
Loading…
Reference in New Issue
Block a user