Skip to content

Commit d3d2e28

Browse files
authored
Merge pull request #614 from plugwise/model_id
New Feature: add device model_id's to the API output (not for legacy devices).
2 parents 0e6ed17 + 2282540 commit d3d2e28

File tree

51 files changed

+274
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+274
-105
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.3.0
4+
5+
- New Feature: add device model_id's to the API output (not for legacy devices).
6+
37
## v1.2.0
48

59
- Improve the low_battery feature, also take the battery-critically-low warning notification into account.

fixtures/adam_heatpump_cooling/all_data.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"setpoint": 35.0,
2323
"upper_bound": 50.0
2424
},
25-
"model": "17.1",
25+
"model": "Generic heater/cooler",
26+
"model_id": "17.1",
2627
"name": "OpenTherm",
2728
"sensors": {
2829
"dhw_temperature": 63.5,
@@ -57,6 +58,7 @@
5758
"location": "b52908550469425b812c87f766fe5303",
5859
"mode": "cool",
5960
"model": "Lisa",
61+
"model_id": "158-01",
6062
"name": "Thermostaat BK",
6163
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
6264
"select_schedule": "off",
@@ -86,6 +88,7 @@
8688
"firmware": "2020-05-13T02:00:00+02:00",
8789
"location": "20e735858f8146cead98b873177a4f99",
8890
"model": "Plug",
91+
"model_id": "160-01",
8992
"name": "Smart Plug DB",
9093
"sensors": {
9194
"electricity_consumed": 0.0,
@@ -105,6 +108,7 @@
105108
"firmware": "2020-05-13T02:00:00+02:00",
106109
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
107110
"model": "Plug",
111+
"model_id": "160-01",
108112
"name": "Smart Plug KK",
109113
"sensors": {
110114
"electricity_consumed": 2.13,
@@ -124,6 +128,7 @@
124128
"firmware": "2020-05-13T02:00:00+02:00",
125129
"location": "04b15f6e884448288f811d29fb7b1b30",
126130
"model": "Plug",
131+
"model_id": "160-01",
127132
"name": "Smart Plug SJ",
128133
"sensors": {
129134
"electricity_consumed": 0.0,
@@ -143,6 +148,7 @@
143148
"firmware": "2020-05-13T02:00:00+02:00",
144149
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
145150
"model": "Plug",
151+
"model_id": "160-01",
146152
"name": "Smart Plug WK",
147153
"sensors": {
148154
"electricity_consumed": 0.0,
@@ -172,6 +178,7 @@
172178
"location": "20e735858f8146cead98b873177a4f99",
173179
"mode": "cool",
174180
"model": "Lisa",
181+
"model_id": "158-01",
175182
"name": "Thermostaat DB",
176183
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
177184
"select_schedule": "off",
@@ -200,6 +207,7 @@
200207
"firmware": "2020-05-13T02:00:00+02:00",
201208
"location": "9a27714b970547ee9a6bdadc2b815ad5",
202209
"model": "Plug",
210+
"model_id": "160-01",
203211
"name": "Smart Plug SQ",
204212
"sensors": {
205213
"electricity_consumed": 0.0,
@@ -224,6 +232,7 @@
224232
"location": "eedadcb297564f1483faa509179aebed",
225233
"mac_address": "012345670001",
226234
"model": "Gateway",
235+
"model_id": "smile_open_therm",
227236
"name": "Adam",
228237
"regulation_modes": [
229238
"heating",
@@ -256,6 +265,7 @@
256265
"location": "e39529c79ab54fda9bed26cfc0447546",
257266
"mode": "cool",
258267
"model": "Lisa",
268+
"model_id": "158-01",
259269
"name": "Thermostaat JM",
260270
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
261271
"select_schedule": "off",
@@ -284,6 +294,7 @@
284294
"firmware": "2020-05-13T02:00:00+02:00",
285295
"location": "b52908550469425b812c87f766fe5303",
286296
"model": "Plug",
297+
"model_id": "160-01",
287298
"name": "Smart Plug BK",
288299
"sensors": {
289300
"electricity_consumed": 0.0,
@@ -303,6 +314,7 @@
303314
"firmware": "2020-05-13T02:00:00+02:00",
304315
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
305316
"model": "Plug",
317+
"model_id": "160-01",
306318
"name": "Smart Plug BK2",
307319
"sensors": {
308320
"electricity_consumed": 0.0,
@@ -322,6 +334,7 @@
322334
"firmware": "2020-05-13T02:00:00+02:00",
323335
"location": "e39529c79ab54fda9bed26cfc0447546",
324336
"model": "Plug",
337+
"model_id": "160-01",
325338
"name": "Smart Plug JM",
326339
"sensors": {
327340
"electricity_consumed": 0.0,
@@ -341,6 +354,7 @@
341354
"firmware": "2020-05-13T02:00:00+02:00",
342355
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
343356
"model": "Plug",
357+
"model_id": "160-01",
344358
"name": "Smart Plug RB",
345359
"sensors": {
346360
"electricity_consumed": 3.13,
@@ -360,6 +374,7 @@
360374
"firmware": "2020-05-13T02:00:00+02:00",
361375
"location": "8cf650a4c10c44819e426bed406aec34",
362376
"model": "Plug",
377+
"model_id": "160-01",
363378
"name": "Smart Plug BK1",
364379
"sensors": {
365380
"electricity_consumed": 0.0,
@@ -389,6 +404,7 @@
389404
"location": "9a27714b970547ee9a6bdadc2b815ad5",
390405
"mode": "cool",
391406
"model": "Lisa",
407+
"model_id": "158-01",
392408
"name": "Thermostaat SQ",
393409
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
394410
"select_schedule": "off",
@@ -427,6 +443,7 @@
427443
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
428444
"mode": "cool",
429445
"model": "Lisa",
446+
"model_id": "158-01",
430447
"name": "Thermostaat RB",
431448
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
432449
"select_schedule": "off",
@@ -462,6 +479,7 @@
462479
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
463480
"mode": "auto",
464481
"model": "ThermoTouch",
482+
"model_id": "143.1",
465483
"name": "Thermostaat WK",
466484
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
467485
"select_schedule": "Werkdag schema",
@@ -493,6 +511,7 @@
493511
"location": "04b15f6e884448288f811d29fb7b1b30",
494512
"mode": "cool",
495513
"model": "Lisa",
514+
"model_id": "158-01",
496515
"name": "Thermostaat SJ",
497516
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
498517
"select_schedule": "off",
@@ -534,6 +553,7 @@
534553
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
535554
"mode": "auto",
536555
"model": "Lisa",
556+
"model_id": "158-01",
537557
"name": "Thermostaat KK",
538558
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
539559
"select_schedule": "Werkdag schema",
@@ -573,6 +593,7 @@
573593
"location": "8cf650a4c10c44819e426bed406aec34",
574594
"mode": "auto",
575595
"model": "Lisa",
596+
"model_id": "158-01",
576597
"name": "Thermostaat BK1",
577598
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
578599
"select_schedule": "Werkdag schema",
@@ -611,6 +632,7 @@
611632
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
612633
"mode": "auto",
613634
"model": "Lisa",
635+
"model_id": "158-01",
614636
"name": "Thermostaat BK2",
615637
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
616638
"select_schedule": "Werkdag schema",
@@ -638,7 +660,7 @@
638660
"cooling_present": true,
639661
"gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb",
640662
"heater_id": "0ca13e8176204ca7bf6f09de59f81c83",
641-
"item_count": 417,
663+
"item_count": 439,
642664
"notifications": {},
643665
"reboot": true,
644666
"smile_name": "Adam"

fixtures/adam_jip/all_data.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"location": "06aecb3d00354375924f50c47af36bd2",
1414
"mode": "heat",
1515
"model": "Lisa",
16+
"model_id": "158-01",
1617
"name": "Slaapkamer",
1718
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
1819
"sensors": {
@@ -42,6 +43,7 @@
4243
"hardware": "1",
4344
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
4445
"model": "Tom/Floor",
46+
"model_id": "106-03",
4547
"name": "Tom Logeerkamer",
4648
"sensors": {
4749
"setpoint": 13.0,
@@ -65,6 +67,7 @@
6567
"hardware": "1",
6668
"location": "06aecb3d00354375924f50c47af36bd2",
6769
"model": "Tom/Floor",
70+
"model_id": "106-03",
6871
"name": "Tom Slaapkamer",
6972
"sensors": {
7073
"setpoint": 13.0,
@@ -85,7 +88,8 @@
8588
"available": true,
8689
"dev_class": "zz_misc",
8790
"location": "9e4433a9d69f40b3aefd15e74395eaec",
88-
"model": "lumi.plug.maeu01",
91+
"model": "Aqara Smart Plug",
92+
"model_id": "lumi.plug.maeu01",
8993
"name": "Plug",
9094
"sensors": {
9195
"electricity_consumed_interval": 0.0
@@ -110,6 +114,7 @@
110114
"location": "d27aede973b54be484f6842d1b2802ad",
111115
"mode": "heat",
112116
"model": "Lisa",
117+
"model_id": "158-01",
113118
"name": "Kinderkamer",
114119
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
115120
"sensors": {
@@ -139,6 +144,7 @@
139144
"hardware": "1",
140145
"location": "13228dab8ce04617af318a2888b3c548",
141146
"model": "Tom/Floor",
147+
"model_id": "106-03",
142148
"name": "Tom Woonkamer",
143149
"sensors": {
144150
"setpoint": 9.0,
@@ -168,6 +174,7 @@
168174
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
169175
"mode": "heat",
170176
"model": "Lisa",
177+
"model_id": "158-01",
171178
"name": "Logeerkamer",
172179
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
173180
"sensors": {
@@ -201,6 +208,7 @@
201208
"location": "9e4433a9d69f40b3aefd15e74395eaec",
202209
"mac_address": "012345670001",
203210
"model": "Gateway",
211+
"model_id": "smile_open_therm",
204212
"name": "Adam",
205213
"regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"],
206214
"select_gateway_mode": "full",
@@ -218,6 +226,7 @@
218226
"hardware": "1",
219227
"location": "d27aede973b54be484f6842d1b2802ad",
220228
"model": "Tom/Floor",
229+
"model_id": "106-03",
221230
"name": "Tom Kinderkamer",
222231
"sensors": {
223232
"setpoint": 13.0,
@@ -255,7 +264,8 @@
255264
"setpoint": 90.0,
256265
"upper_bound": 90.0
257266
},
258-
"model": "10.20",
267+
"model": "Generic heater",
268+
"model_id": "10.20",
259269
"name": "OpenTherm",
260270
"sensors": {
261271
"intended_boiler_temperature": 0.0,
@@ -282,6 +292,7 @@
282292
"location": "13228dab8ce04617af318a2888b3c548",
283293
"mode": "heat",
284294
"model": "Jip",
295+
"model_id": "168-01",
285296
"name": "Woonkamer",
286297
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
287298
"sensors": {
@@ -310,7 +321,7 @@
310321
"cooling_present": false,
311322
"gateway_id": "b5c2386c6f6342669e50fe49dd05b188",
312323
"heater_id": "e4684553153b44afbef2200885f379dc",
313-
"item_count": 217,
324+
"item_count": 228,
314325
"notifications": {},
315326
"reboot": true,
316327
"smile_name": "Adam"

0 commit comments

Comments
 (0)