hassio-addons/upsmon
2018-11-22 13:10:16 +01:00
..
config.json fix shutdown 2018-11-22 13:10:16 +01:00
Dockerfile fix shutdown 2018-11-22 13:10:16 +01:00
README.md fix shutdown 2018-11-22 13:10:16 +01:00
repositories fixed repositories for building 2018-11-22 10:28:32 +01:00
run.sh fix shutdown 2018-11-22 13:10:16 +01:00
shutdown.sh fix shutdown 2018-11-22 13:10:16 +01:00

Network UPS Tools - netclient

Network UPS Tools 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).

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