You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Upload succeeds but frame shows old image](#upload-succeeds-but-frame-shows-old-image)
@@ -26,21 +30,24 @@
26
30
27
31
# Features
28
32
29
-
A small Home Assistant custom integration to **upload images from the Home Assistant server to a Paperlesspaper e-paper frame** using the WireWire API. The integration is designed to work well with Home Assistant automations (e.g. upload a new image twice a day), and provides a *“varied random”* image selection that avoids repeating the same images too often.
33
+
A small Home Assistant custom integration to **upload images from the Home Assistant server to a paperlesspaper e-paper frame** using the WireWire API. The integration is designed to work well with Home Assistant automations (e.g. upload a new image twice a day), and provides a *“varied random”* image selection that avoids repeating the same images too often.
30
34
31
-
- Upload a random image from an input folder to a Paperlesspaper frame via API
35
+
- Upload a random image from an input folder to a paperlesspaper frame via API
32
36
- "Varied random" selection:
33
37
- remembers recently used images
34
38
- recent-window size = **50% of available images** (min 5, max 50)
35
39
- avoids repetition until the pool is exhausted
36
40
- Optional publish/copy of the selected image into `/config/www/...` for preview/debugging
37
41
- Optional cleanup of the publish directory before publishing
38
42
- Robust upload retries with exponential backoff
39
-
- Home Assistant sensor showing:
43
+
- Gets device information like battery level and last update
44
+
- Home Assistant sensors showing:
40
45
- last upload timestamp
41
46
- current file name
42
47
- last result (success/failed/dry_run)
43
48
- last HTTP status / error
49
+
- battery level / percentage
50
+
- last update
44
51
45
52
# 📦 Installation
46
53
@@ -60,14 +67,17 @@ A small Home Assistant custom integration to **upload images from the Home Assis
60
67
61
68
# Configuration
62
69
70
+
Please follow the steps for [generating an API key](https://paperlesspaper.de/posts/api).
71
+
63
72
This integration currently uses YAML configuration.
64
73
65
74
Add this to your `configuration.yaml`:
66
75
67
76
```yaml
68
77
paperlesspaper_push:
69
78
api_key: !secret paperlesspaper_api_key
70
-
paper_id: !secret paperlesspaper_paper_id
79
+
paper_id: "YOUR_PAPER_ID"
80
+
device_id: "YOUR_DEVICE_ID"
71
81
72
82
# optional:
73
83
base_url: https://api.memo.wirewire.de/v1
@@ -82,7 +92,6 @@ Add the secrets to secrets.yaml:
82
92
83
93
```yaml
84
94
paperlesspaper_api_key: "YOUR_API_KEY"
85
-
paperlesspaper_paper_id: "YOUR_PAPER_ID"
86
95
```
87
96
88
97
Restart Home Assistant after changing YAML.
@@ -119,7 +128,7 @@ This is useful for debugging or previewing the selected image from Home Assistan
119
128
- last_error
120
129
- published_name
121
130
122
-
## Services
131
+
# Services
123
132
```paperlesspaper_push.upload_random```
124
133
125
134
Uploads a (varied) random image.
@@ -148,7 +157,7 @@ Example:
148
157
service: paperlesspaper_push.reset_recent
149
158
```
150
159
151
-
## Automation Examples
160
+
# Automation Examples
152
161
153
162
Upload twice per day:
154
163
@@ -170,6 +179,44 @@ action:
170
179
- service: paperlesspaper_push.upload_random
171
180
```
172
181
182
+
# Device Telemetry
183
+
184
+
In addition to upload/push functionality, the integration can poll the paperlesspaper API for **device telemetry** (battery, timestamps, sync state).
185
+
186
+
The integration will periodically call ```GET /v1/devices/<device_id>``` and update the related sensors.
187
+
188
+
## Telemetry sensors
189
+
190
+
When device_id is configured, the following sensors are created:
191
+
192
+
- Battery
193
+
- sensor.paperlesspaper_push_battery_voltage (V)
194
+
- sensor.paperlesspaper_push_battery (%)
195
+
196
+
- Timestamps
197
+
- sensor.paperlesspaper_push_last_reachable
198
+
- sensor.paperlesspaper_push_next_device_sync
199
+
- sensor.paperlesspaper_push_updated_at
200
+
- sensor.paperlesspaper_push_loaded_at
201
+
202
+
Note: The API exposes batLevel as a raw value (typically millivolts for 4×AAA in series).
203
+
The integration converts it to a percentage using a pragmatic min/max voltage model.
204
+
205
+
## Manual refresh (optional)
206
+
207
+
You can trigger an immediate telemetry refresh via the service:
208
+
```paperlesspaper_push.refresh_device```
209
+
210
+
## Battery percentage calculation
211
+
212
+
Battery percentage is derived from the reported raw battery voltage (`batLevel`).
213
+
214
+
Default mapping (4×AAA in series):
215
+
- 6.4 V → 100%
216
+
- 4.8 V → 0%
217
+
218
+
Values are clamped to the range and mapped linearly in between.
219
+
173
220
# API / Upload Method
174
221
175
222
The upload is performed using a multipart form-data request similar to:
0 commit comments