homebridge-withings-environment-data 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +33 -14
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
# Homebridge Withings Environment Data
|
|
1
|
+
# Homebridge Withings Environment Data v0.3.3
|
|
2
2
|
|
|
3
3
|
**This Homebridge plugin has been 100% vibe coded with Claude.**
|
|
4
4
|
|
|
5
5
|
Exposes ambient CO2 (air quality) and room temperature readings from a
|
|
6
|
-
Withings WS-50 scale as HomeKit sensors
|
|
7
|
-
|
|
8
|
-
- **CarbonDioxideSensor**: precise CO2 level in ppm, plus a normal/abnormal
|
|
9
|
-
detected alert based on a configurable threshold.
|
|
10
|
-
- **AirQualitySensor**: the same CO2 reading mapped to HomeKit's
|
|
11
|
-
Excellent/Good/Fair/Inferior/Poor category.
|
|
12
|
-
- **TemperatureSensor**: room temperature in °C.
|
|
6
|
+
Withings WS-50 scale as HomeKit sensors.
|
|
13
7
|
|
|
14
8
|
This data isn't available through the official Withings API: a `getmeas`
|
|
15
9
|
call against the documented endpoint drops CO2/temperature even when
|
|
@@ -19,6 +13,12 @@ internal endpoint the web app uses. That means it depends on undocumented
|
|
|
19
13
|
behavior of `account.withings.com` / `scalews.withings.com` and could break
|
|
20
14
|
if Withings changes them.
|
|
21
15
|
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Homebridge >=1.6.0
|
|
19
|
+
- Node >=18
|
|
20
|
+
- A Withings account with a WS-50 scale already set up in Health Mate
|
|
21
|
+
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
24
|
Install via the Homebridge Config UI: open the **Plugins** tab, search for
|
|
@@ -33,7 +33,21 @@ npm install -g homebridge-withings-environment-data
|
|
|
33
33
|
Then restart Homebridge and add the platform via the Config UI, or add it
|
|
34
34
|
manually to `config.json`.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Once configured (see below), the plugin exposes three sensors on one
|
|
39
|
+
accessory:
|
|
40
|
+
|
|
41
|
+
- **CarbonDioxideSensor**: precise CO2 level in ppm, plus a normal/abnormal
|
|
42
|
+
detected alert based on a configurable threshold.
|
|
43
|
+
- **AirQualitySensor**: the same CO2 reading mapped to HomeKit's
|
|
44
|
+
Excellent/Good/Fair/Inferior/Poor category.
|
|
45
|
+
- **TemperatureSensor**: room temperature in °C.
|
|
46
|
+
|
|
47
|
+
These appear automatically in the Home app after Homebridge restarts, no
|
|
48
|
+
further setup needed. Readings update on the poll interval set below.
|
|
49
|
+
|
|
50
|
+
### Configuration
|
|
37
51
|
|
|
38
52
|
All settings are entered through the Homebridge Config UI (Plugins tab,
|
|
39
53
|
Withings Environment Data, Settings).
|
|
@@ -56,11 +70,11 @@ Fields:
|
|
|
56
70
|
reports "abnormal" (default 1000).
|
|
57
71
|
- **ntfy Topic (optional)**: if set, sends a push notification via
|
|
58
72
|
[ntfy.sh](https://ntfy.sh) to this topic the first time a poll fails
|
|
59
|
-
(not repeated on every subsequent failure in the same streak
|
|
73
|
+
(not repeated on every subsequent failure in the same streak; only once
|
|
60
74
|
a poll succeeds again does the next failure trigger a fresh
|
|
61
75
|
notification). Leave blank to disable.
|
|
62
76
|
|
|
63
|
-
|
|
77
|
+
### How authentication works
|
|
64
78
|
|
|
65
79
|
The plugin reuses a long-lived (~1 week) `session_key`, the same
|
|
66
80
|
mechanism Withings' own web app relies on to stay logged in without
|
|
@@ -74,7 +88,7 @@ fallback produces is automatically written back to the same file for next
|
|
|
74
88
|
time. In normal operation the plugin should hit the password endpoint very
|
|
75
89
|
infrequently, roughly weekly at most.
|
|
76
90
|
|
|
77
|
-
|
|
91
|
+
### When it stops working
|
|
78
92
|
|
|
79
93
|
Most of the time this is self-healing: if the cached session has expired,
|
|
80
94
|
the plugin automatically falls back to a full login and caches the new
|
|
@@ -84,7 +98,7 @@ good reading rather than going blank.
|
|
|
84
98
|
|
|
85
99
|
If the Homebridge log instead shows a "session not trusted (landed on
|
|
86
100
|
confirm_totp)" error, the *trust cookie* itself has been invalidated (e.g.
|
|
87
|
-
after a password change, or Withings revoking trusted devices)
|
|
101
|
+
after a password change, or Withings revoking trusted devices). This is
|
|
88
102
|
what the fallback login relies on, so it can't self-heal on its own. Fix:
|
|
89
103
|
|
|
90
104
|
1. Recapture the trust cookie: see [Getting the trust
|
|
@@ -96,7 +110,7 @@ Any other poll failure (network error, unexpected response) is logged the
|
|
|
96
110
|
same way: an error in the Homebridge log, a fault indicator on the sensors,
|
|
97
111
|
and the previous readings left in place until the next successful poll.
|
|
98
112
|
|
|
99
|
-
|
|
113
|
+
### Getting the trust cookie
|
|
100
114
|
|
|
101
115
|
Both initial setup and recovering from an expired session need this. Capture
|
|
102
116
|
it once via DevTools:
|
|
@@ -109,3 +123,8 @@ it once via DevTools:
|
|
|
109
123
|
name and its value. This is what actually signals "this device already
|
|
110
124
|
passed 2FA". Its name stays stable across logins even though its value
|
|
111
125
|
doesn't.
|
|
126
|
+
|
|
127
|
+
## License and changelog
|
|
128
|
+
|
|
129
|
+
- [LICENSE](LICENSE)
|
|
130
|
+
- [CHANGELOG](CHANGELOG.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-withings-environment-data",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Homebridge plugin exposing ambient CO2/air-quality and room temperature readings from a Withings WS-50 scale as HomeKit sensors",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|