-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
70 lines (50 loc) · 1.92 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
hass-shooter is a Home Assistant screenshot capture web server suitable for
e-ink displays.
Usage:
hass-shooter [flags]
The flags are:
-c string
configuration file (default "/data/options.json")
hass-shooter depends on Chromium and ImageMagick, so they must be installed
first.
The configuration file is a JSON file with the following format:
{
"hass_base_url": "https://example.com",
"hass_token": "ACCESS_TOKEN",
"hass_pages": [
{
"path": "/lovelace/default_view",
"scale": 1
}
],
"width": 480,
"height": 800,
"rotation": 0,
"listen_addr": ":8000",
"ignore_cert_errors": false,
"refresh_time": 60,
"min_idle_time": 5,
"timeout": 60
}
The following configuration parameters are supported:
"hass_base_url" is the URL of the Home Assistant server.
"hass_token" is a Home Assistant long-lived access token. More information:
https://developers.home-assistant.io/docs/auth_api/#long-lived-access-token
"hass_pages" contains the Home Assistant pages to capture. "path" is the URL
path of the page. The full captured URL is hass_base_url + hass_pages[i].path.
"scale" is the scale factor used to capture the page.
"width" is the width of the generate image (usually, the width of the e-ink display).
"height" is the height of the generate image (usually, the height of the e-ink
display).
"rotation" is the rotation in degrees applied to the resulting images.
"listen_addr" is the HTTP service address to listen for incoming requests.
"ignore_cert_errors" allows to control certificate checking.
"refresh_time" is the time in seconds between screenshots.
"min_idle_time" is the minimum time in seconds without requests to consider a page to
be loaded.
"timeout" is the timeout in seconds used by the headless browser.
The screenshots are served in the path "/<idx>", where <idx> is the index of
the entry in the "hass_pages" array. The path "/" is equivalent to "/0".
*/
package main