Commit d402e1f
committed
Add adoption online check, DTO validation, remove dead schema, fix lastSeen null
1. Add isCoordinatorOnline check to adoptDevice: adoption now fails
early with a validation error if the coordinator is offline,
preventing creation of Smart Panel devices from stale cached
registry entries that are not currently reachable.
2. Add @isdefined to ReqZhAdoptDeviceDto and ReqZhPermitJoinDto:
sending {} or omitting the data field now returns a structured
validation error instead of a 500 TypeError from dereferencing
undefined body.data.
3. Remove unused ZigbeeHerdsmanDeviceAddSimpleFormSchema and its
inferred type IZigbeeHerdsmanDeviceAddSimpleForm — neither was
used outside their own definition files.
4. Fix devices with lastSeen=null staying online forever: the
connectivity checker was skipping these devices entirely, leaving
them reported as online indefinitely (registered with
available=true but never entering timeout evaluation). Now treats
lastSeen=null as offline.
Config schema camelCase issue confirmed invalid (4th time) —
snakeToCamel transform in transformConfigPluginResponse handles it.
https://claude.ai/code/session_014bjB9Cn1WKASNLBeCuSbom1 parent 6ba136c commit d402e1f
5 files changed
Lines changed: 31 additions & 32 deletions
File tree
- apps
- admin/src/plugins/devices-zigbee-herdsman/schemas
- backend/src/plugins/devices-zigbee-herdsman
- dto
- services
Lines changed: 0 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
11 | | - | |
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
3 | 14 | | |
4 | 15 | | |
5 | 16 | | |
| |||
226 | 237 | | |
227 | 238 | | |
228 | 239 | | |
| 240 | + | |
229 | 241 | | |
230 | 242 | | |
231 | 243 | | |
| |||
235 | 247 | | |
236 | 248 | | |
237 | 249 | | |
| 250 | + | |
238 | 251 | | |
239 | 252 | | |
240 | 253 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
87 | | - | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
0 commit comments