@@ -6,7 +6,7 @@ the V1 model (reports VOC and Dust) and the V2 models (those that report
6
6
PM2.5, PM10, NOx, and VOC). Other Dyson fans may work out of the box or with
7
7
minor modifications.
8
8
9
- ## Updating instructions for 0.2.0
9
+ ## Updating instructions from 0.1.x (to 0.2.x or beyond)
10
10
11
11
Due to changes in Dyson's Cloud API, automatic device detection based on your
12
12
Dyson login/password no longer works reliably.
@@ -15,10 +15,8 @@ This means you need to take a _one-time_ manual step to upgrade. The upside
15
15
to this is that it removes the runtime dependency on the Dyson API, because
16
16
it will cache the device information locally.
17
17
18
- The manual step is to run this command and follow the prompts:
19
- ```
20
- % /opt/prometheus-dyson/bin/main --create_device_cache
21
- ```
18
+ Please see the _ Usage_ > _ Configuration_ > _ Automatic Setup_ section below for instructions.
19
+
22
20
23
21
## Build
24
22
@@ -44,7 +42,6 @@ You'll need these dependencies:
44
42
% pip install prometheus_client
45
43
```
46
44
47
-
48
45
## Metrics
49
46
50
47
### Environmental
@@ -92,24 +89,36 @@ dyson_continuous_monitoring_mode | gauge | V2 fans only | continuous monitoring
92
89
This script reads ` config.ini ` (or another file, specified with ` --config ` )
93
90
for your DysonLink login credentials.
94
91
92
+ #### Automatic Setup
93
+
94
+ TIP: you must do this if you're upgrading from 0.1.x (to 0.2.x or beyond)
95
+
96
+ prometheus-dyson requires a configuration file to operate. In the Debian-based
97
+ installation, this lives in ``` /etc/prometheus-dyson/config.ini ``` .
98
+
99
+ To generate this configuration, run the config builder, like this:
100
+ ```
101
+ % /opt/prometheus-dyson/bin/config_builder
102
+ ```
103
+
104
+ You will need to run this as root (or a user with write permissions to
105
+ /etc/prometheus-dyson).
106
+
95
107
#### Device Configuration
96
108
97
- Devices must be specifically listed in your ` config.ini ` . You can create this
98
- automatically by running the binary with ` --create_device_cache ` and following
99
- the prompts. A device entry looks like this:
109
+ A device entry looks like this:
100
110
101
111
```
102
112
[XX1-ZZ-ABC1234A]
103
- active = true
104
113
name = My Fan
105
114
serial = XX1-ZZ-ABC1234A
106
- version = 21.04.03
107
115
localcredentials = a_random_looking_string==
108
- autoupdate = True
109
- newversionavailable = True
110
116
producttype = 455
111
117
```
112
118
119
+ The ``` localcredentials ``` field is provided by the Dyson Cloud API, please see
120
+ the _ Automatic Setup_ section.
121
+
113
122
#### Manual IP Overrides
114
123
115
124
By default, fans are auto-detected with Zeroconf. It is possible to provide
@@ -123,16 +132,12 @@ XX1-ZZ-ABC1234A = 10.10.100.55
123
132
### Args
124
133
```
125
134
% ./prometheus_dyson.py --help
126
- usage: ./prometheus_dyson.py [-h] [--port PORT] [--config CONFIG] [--create_device_cache] [-- log_level LOG_LEVEL]
135
+ usage: ./prometheus_dyson.py [-h] [--port PORT] [--config CONFIG] [--log_level LOG_LEVEL]
127
136
128
137
optional arguments:
129
138
-h, --help show this help message and exit
130
139
--port PORT HTTP server port
131
140
--config CONFIG Configuration file (INI file)
132
- --create_device_cache
133
- Performs a one-time login to Dyson's cloud service to identify your devices. This produces
134
- a config snippet to add to your config, which will be used to connect to your device. Use
135
- this when you first use this program and when you add or remove devices.
136
141
--log_level LOG_LEVEL
137
142
Logging level (DEBUG, INFO, WARNING, ERROR)
138
143
```
0 commit comments