Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.72 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.72 KB

Introduction

Sets the Nest home/away status according to the result of periodically checking a list of IPs.

If at least one host is connected to the local network, the status will be set to home.

If no hosts are connected, the status will be set to away.

Setup

Requirements

  • nest-rest already setup and running
  • static IPs set in your DHCP server (usually your router) for all the relevant phones

Docker

The easiest way is to run it via Docker:

docker run -d \
  --name nest-home-away \
  -e NEST_ACCESS_TOKEN="NEST_ACCESS_TOKEN" \
  -e NEST_STRUCTURE="NEST_STRUCTURE" \
  -e NEST_USER="NEST_USER" \
  -e NEST_REST_ENDPOINT="NEST_REST_ENDPOINT" \
  -e HOSTS="HOSTS" \
  -e TZ="TZ" \
  emilburzo/nest-home-away:latest

Parameters

  • NEST_ACCESS_TOKEN, NEST_STRUCTURE and NEST_USER: see nest-rest documentation
  • NEST_REST_ENDPOINT: the URL where rest-nest is running, e.g. http://192.168.0.4:8467
  • HOSTS: usually static IPs of mobile devices that the script should check, e.g. 192.168.0.30,192.168.0.31
  • TZ: timezone database name, if not set it will default to UTC; e.g. Europe/Romania
  • WEBHOOK_OK_URL (optional): URL to call when the home/away status was successfully set; intended for use with ping style monitoring, e.g. https://healthchecks.io/
  • WEBHOOK_FAIL_URL (optional): URL to call when the home/away status could not be set
  • LOG_LEVEL (optional): set the logging level, defaults to INFO