Skip to content

Commit

Permalink
Merge pull request #614 from plugwise/model_id
Browse files Browse the repository at this point in the history
New Feature: add device model_id's to the API output (not for legacy devices).
  • Loading branch information
bouwew authored Sep 11, 2024
2 parents 0e6ed17 + 2282540 commit d3d2e28
Show file tree
Hide file tree
Showing 51 changed files with 274 additions and 105 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.3.0

- New Feature: add device model_id's to the API output (not for legacy devices).

## v1.2.0

- Improve the low_battery feature, also take the battery-critically-low warning notification into account.
Expand Down
26 changes: 24 additions & 2 deletions fixtures/adam_heatpump_cooling/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"setpoint": 35.0,
"upper_bound": 50.0
},
"model": "17.1",
"model": "Generic heater/cooler",
"model_id": "17.1",
"name": "OpenTherm",
"sensors": {
"dhw_temperature": 63.5,
Expand Down Expand Up @@ -57,6 +58,7 @@
"location": "b52908550469425b812c87f766fe5303",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat BK",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -86,6 +88,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "20e735858f8146cead98b873177a4f99",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug DB",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -105,6 +108,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug KK",
"sensors": {
"electricity_consumed": 2.13,
Expand All @@ -124,6 +128,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "04b15f6e884448288f811d29fb7b1b30",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug SJ",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -143,6 +148,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug WK",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -172,6 +178,7 @@
"location": "20e735858f8146cead98b873177a4f99",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat DB",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -200,6 +207,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "9a27714b970547ee9a6bdadc2b815ad5",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug SQ",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -224,6 +232,7 @@
"location": "eedadcb297564f1483faa509179aebed",
"mac_address": "012345670001",
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"regulation_modes": [
"heating",
Expand Down Expand Up @@ -256,6 +265,7 @@
"location": "e39529c79ab54fda9bed26cfc0447546",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat JM",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -284,6 +294,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "b52908550469425b812c87f766fe5303",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug BK",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -303,6 +314,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug BK2",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -322,6 +334,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "e39529c79ab54fda9bed26cfc0447546",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug JM",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -341,6 +354,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug RB",
"sensors": {
"electricity_consumed": 3.13,
Expand All @@ -360,6 +374,7 @@
"firmware": "2020-05-13T02:00:00+02:00",
"location": "8cf650a4c10c44819e426bed406aec34",
"model": "Plug",
"model_id": "160-01",
"name": "Smart Plug BK1",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -389,6 +404,7 @@
"location": "9a27714b970547ee9a6bdadc2b815ad5",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat SQ",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -427,6 +443,7 @@
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat RB",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -462,6 +479,7 @@
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
"mode": "auto",
"model": "ThermoTouch",
"model_id": "143.1",
"name": "Thermostaat WK",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "Werkdag schema",
Expand Down Expand Up @@ -493,6 +511,7 @@
"location": "04b15f6e884448288f811d29fb7b1b30",
"mode": "cool",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat SJ",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "off",
Expand Down Expand Up @@ -534,6 +553,7 @@
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
"mode": "auto",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat KK",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "Werkdag schema",
Expand Down Expand Up @@ -573,6 +593,7 @@
"location": "8cf650a4c10c44819e426bed406aec34",
"mode": "auto",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat BK1",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "Werkdag schema",
Expand Down Expand Up @@ -611,6 +632,7 @@
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
"mode": "auto",
"model": "Lisa",
"model_id": "158-01",
"name": "Thermostaat BK2",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "Werkdag schema",
Expand Down Expand Up @@ -638,7 +660,7 @@
"cooling_present": true,
"gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb",
"heater_id": "0ca13e8176204ca7bf6f09de59f81c83",
"item_count": 417,
"item_count": 439,
"notifications": {},
"reboot": true,
"smile_name": "Adam"
Expand Down
17 changes: 14 additions & 3 deletions fixtures/adam_jip/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"location": "06aecb3d00354375924f50c47af36bd2",
"mode": "heat",
"model": "Lisa",
"model_id": "158-01",
"name": "Slaapkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"sensors": {
Expand Down Expand Up @@ -42,6 +43,7 @@
"hardware": "1",
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Tom/Floor",
"model_id": "106-03",
"name": "Tom Logeerkamer",
"sensors": {
"setpoint": 13.0,
Expand All @@ -65,6 +67,7 @@
"hardware": "1",
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom/Floor",
"model_id": "106-03",
"name": "Tom Slaapkamer",
"sensors": {
"setpoint": 13.0,
Expand All @@ -85,7 +88,8 @@
"available": true,
"dev_class": "zz_misc",
"location": "9e4433a9d69f40b3aefd15e74395eaec",
"model": "lumi.plug.maeu01",
"model": "Aqara Smart Plug",
"model_id": "lumi.plug.maeu01",
"name": "Plug",
"sensors": {
"electricity_consumed_interval": 0.0
Expand All @@ -110,6 +114,7 @@
"location": "d27aede973b54be484f6842d1b2802ad",
"mode": "heat",
"model": "Lisa",
"model_id": "158-01",
"name": "Kinderkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"sensors": {
Expand Down Expand Up @@ -139,6 +144,7 @@
"hardware": "1",
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Tom/Floor",
"model_id": "106-03",
"name": "Tom Woonkamer",
"sensors": {
"setpoint": 9.0,
Expand Down Expand Up @@ -168,6 +174,7 @@
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"mode": "heat",
"model": "Lisa",
"model_id": "158-01",
"name": "Logeerkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"sensors": {
Expand Down Expand Up @@ -201,6 +208,7 @@
"location": "9e4433a9d69f40b3aefd15e74395eaec",
"mac_address": "012345670001",
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"],
"select_gateway_mode": "full",
Expand All @@ -218,6 +226,7 @@
"hardware": "1",
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Tom/Floor",
"model_id": "106-03",
"name": "Tom Kinderkamer",
"sensors": {
"setpoint": 13.0,
Expand Down Expand Up @@ -255,7 +264,8 @@
"setpoint": 90.0,
"upper_bound": 90.0
},
"model": "10.20",
"model": "Generic heater",
"model_id": "10.20",
"name": "OpenTherm",
"sensors": {
"intended_boiler_temperature": 0.0,
Expand All @@ -282,6 +292,7 @@
"location": "13228dab8ce04617af318a2888b3c548",
"mode": "heat",
"model": "Jip",
"model_id": "168-01",
"name": "Woonkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"sensors": {
Expand Down Expand Up @@ -310,7 +321,7 @@
"cooling_present": false,
"gateway_id": "b5c2386c6f6342669e50fe49dd05b188",
"heater_id": "e4684553153b44afbef2200885f379dc",
"item_count": 217,
"item_count": 228,
"notifications": {},
"reboot": true,
"smile_name": "Adam"
Expand Down
Loading

0 comments on commit d3d2e28

Please sign in to comment.