@camstack/addon-provider-homematic 1.2.193 → 1.2.194
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/CHANGELOG.md +7 -0
- package/dist/addon.js +66 -30
- package/dist/addon.mjs +66 -30
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.194] - 2026-11-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Homematic thermostats show the CCU's real mode (manual vs auto) instead of always auto
|
|
15
|
+
- Homematic climate OFF is a manual setpoint at 4.5°C. An auto schedule at 4.5°C stays auto, and only heat restores the remembered target
|
|
16
|
+
|
|
10
17
|
## [1.2.193] - 2026-11-13
|
|
11
18
|
|
|
12
19
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -129604,28 +129604,37 @@ var HmChildDevice = class extends BaseDevice {
|
|
|
129604
129604
|
this.seedTriggerUnsubs = [];
|
|
129605
129605
|
}
|
|
129606
129606
|
};
|
|
129607
|
-
|
|
129608
|
-
|
|
129609
|
-
|
|
129610
|
-
|
|
129611
|
-
*
|
|
129612
|
-
|
|
129607
|
+
function isHmOffSetpoint(target) {
|
|
129608
|
+
return target !== null && target <= 4.5;
|
|
129609
|
+
}
|
|
129610
|
+
/**
|
|
129611
|
+
* HmIP `SET_POINT_MODE` index → library climate mode.
|
|
129612
|
+
*
|
|
129613
|
+
* Observed 2026-11-13 via `getParamsetDescription` on `INT0000001:1`: the
|
|
129614
|
+
* datapoint is `TYPE INTEGER`, `MIN 0`, `MAX 3`, with no value list. The
|
|
129615
|
+
* live CCU therefore delivers the index, not a name.
|
|
129616
|
+
* 0 auto, 1 manual heat, 2 party (a timed override — still auto).
|
|
129617
|
+
* 3 is absent: unknown, so {@link fromHmSetPointMode} returns null and the
|
|
129618
|
+
* caller keeps the previous mode.
|
|
129619
|
+
* `CONTROL_MODE` is write-only on HmIP heating groups and always reads `0`;
|
|
129620
|
+
* mode is read from here.
|
|
129621
|
+
*/
|
|
129622
|
+
var HM_SET_POINT_MODE_BY_INDEX = {
|
|
129613
129623
|
0: "auto",
|
|
129614
129624
|
1: "heat",
|
|
129615
|
-
2: "
|
|
129616
|
-
3: "heat"
|
|
129625
|
+
2: "auto"
|
|
129617
129626
|
};
|
|
129618
129627
|
/**
|
|
129619
|
-
*
|
|
129620
|
-
*
|
|
129621
|
-
*
|
|
129622
|
-
* library climate mode. Matched BY NAME, case-insensitively.
|
|
129628
|
+
* Name form, accepted only when a string arrives (a value list that did
|
|
129629
|
+
* resolve). Matched case-insensitively. `PARTY` is the timed override and
|
|
129630
|
+
* stays auto, matching index 2.
|
|
129623
129631
|
*/
|
|
129624
|
-
var
|
|
129632
|
+
var HM_SET_POINT_MODE_BY_NAME = {
|
|
129633
|
+
AUTO: "auto",
|
|
129625
129634
|
"AUTO-MODE": "auto",
|
|
129635
|
+
MANU: "heat",
|
|
129626
129636
|
"MANU-MODE": "heat",
|
|
129627
|
-
|
|
129628
|
-
"BOOST-MODE": "heat"
|
|
129637
|
+
PARTY: "auto"
|
|
129629
129638
|
};
|
|
129630
129639
|
/** Map a CamStack `HvacMode` to the library's narrower climate mode. */
|
|
129631
129640
|
function toHmClimateMode(mode) {
|
|
@@ -129637,22 +129646,20 @@ function toHmClimateMode(mode) {
|
|
|
129637
129646
|
}
|
|
129638
129647
|
}
|
|
129639
129648
|
/**
|
|
129640
|
-
* Map a
|
|
129649
|
+
* Map a Homematic `SET_POINT_MODE` value to the CamStack `HvacMode`.
|
|
129641
129650
|
*
|
|
129642
|
-
*
|
|
129643
|
-
*
|
|
129644
|
-
* `
|
|
129645
|
-
* decoded at all. The numeric arm survives for a datapoint whose value
|
|
129646
|
-
* list did not resolve.
|
|
129651
|
+
* The live CCU sends the integer index (see {@link HM_SET_POINT_MODE_BY_INDEX}).
|
|
129652
|
+
* A string is accepted only when one arrives (`AUTO` / `AUTO-MODE`,
|
|
129653
|
+
* `MANU` / `MANU-MODE`). Index 3 and any other unknown value return null.
|
|
129647
129654
|
*/
|
|
129648
|
-
function
|
|
129655
|
+
function fromHmSetPointMode(value) {
|
|
129649
129656
|
if (typeof value === "string") {
|
|
129650
|
-
const mode =
|
|
129657
|
+
const mode = HM_SET_POINT_MODE_BY_NAME[value.toUpperCase()];
|
|
129651
129658
|
if (mode === void 0) return null;
|
|
129652
129659
|
return mode === "auto" ? "auto" : "heat";
|
|
129653
129660
|
}
|
|
129654
129661
|
if (typeof value !== "number") return null;
|
|
129655
|
-
const mode =
|
|
129662
|
+
const mode = HM_SET_POINT_MODE_BY_INDEX[value];
|
|
129656
129663
|
if (mode === void 0) return null;
|
|
129657
129664
|
return mode === "auto" ? "auto" : "heat";
|
|
129658
129665
|
}
|
|
@@ -129798,12 +129805,19 @@ function decodeLock(parameter, value, now) {
|
|
|
129798
129805
|
/**
|
|
129799
129806
|
* Decode a climate datapoint into a ClimateControlStatus patch.
|
|
129800
129807
|
* Parameters: SET_POINT_TEMPERATURE (target °C), ACTUAL_TEMPERATURE
|
|
129801
|
-
* (current °C), HUMIDITY (%),
|
|
129808
|
+
* (current °C), HUMIDITY (%), SET_POINT_MODE (ENUM, readable mode),
|
|
129809
|
+
* BOOST_MODE (bool). `CONTROL_MODE` is write-only on HmIP and ignored here.
|
|
129802
129810
|
*/
|
|
129811
|
+
function modeWithHmOffTarget(previous, target) {
|
|
129812
|
+
if (isHmOffSetpoint(target)) return previous.mode === "auto" ? "auto" : "off";
|
|
129813
|
+
if (previous.mode === "off") return previous.lastActiveMode ?? "heat";
|
|
129814
|
+
return previous.mode;
|
|
129815
|
+
}
|
|
129803
129816
|
function decodeClimate(previous, parameter, value, now) {
|
|
129804
129817
|
if (parameter === "SET_POINT_TEMPERATURE" && typeof value === "number") return {
|
|
129805
129818
|
...previous,
|
|
129806
129819
|
target: value,
|
|
129820
|
+
mode: modeWithHmOffTarget(previous, value),
|
|
129807
129821
|
lastFetchedAt: now
|
|
129808
129822
|
};
|
|
129809
129823
|
if (parameter === "ACTUAL_TEMPERATURE" && typeof value === "number") return {
|
|
@@ -129816,12 +129830,13 @@ function decodeClimate(previous, parameter, value, now) {
|
|
|
129816
129830
|
currentHumidity: value,
|
|
129817
129831
|
lastFetchedAt: now
|
|
129818
129832
|
};
|
|
129819
|
-
if (parameter === "
|
|
129820
|
-
const mode =
|
|
129833
|
+
if (parameter === "SET_POINT_MODE") {
|
|
129834
|
+
const mode = fromHmSetPointMode(value);
|
|
129821
129835
|
if (mode === null) return null;
|
|
129836
|
+
const resolved = mode === "heat" && isHmOffSetpoint(previous.target) ? "off" : mode;
|
|
129822
129837
|
return {
|
|
129823
129838
|
...previous,
|
|
129824
|
-
mode,
|
|
129839
|
+
mode: resolved,
|
|
129825
129840
|
lastFetchedAt: now
|
|
129826
129841
|
};
|
|
129827
129842
|
}
|
|
@@ -129882,6 +129897,8 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129882
129897
|
kind;
|
|
129883
129898
|
/** The actuator cap name actually registered (drives decode routing). */
|
|
129884
129899
|
registeredCap = null;
|
|
129900
|
+
/** Last setpoint above {@link HM_OFF_SETPOINT_C}; HmIP OFF leaves target at 4.5. */
|
|
129901
|
+
climateRestoreTargetC = null;
|
|
129885
129902
|
constructor(ctx) {
|
|
129886
129903
|
super(ctx, hmActuatorSchema);
|
|
129887
129904
|
this.kind = this.config.values.kind;
|
|
@@ -129962,9 +129979,18 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129962
129979
|
const provider = {
|
|
129963
129980
|
getStatus: async () => this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE,
|
|
129964
129981
|
setMode: async ({ mode }) => {
|
|
129965
|
-
|
|
129982
|
+
const facade = this.requireFacade();
|
|
129983
|
+
const prev = this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE;
|
|
129984
|
+
const hmMode = toHmClimateMode(mode);
|
|
129985
|
+
if (hmMode === "off" && prev.target !== null && prev.target > 4.5) this.climateRestoreTargetC = prev.target;
|
|
129986
|
+
await facade.climateSetMode(this.address, channel, hmMode);
|
|
129987
|
+
if (mode === "heat" && (prev.mode === "off" || isHmOffSetpoint(prev.target))) {
|
|
129988
|
+
const restore = this.climateRestoreTargetC ?? 21;
|
|
129989
|
+
await facade.climateSetTemperature(this.address, channel, restore);
|
|
129990
|
+
}
|
|
129966
129991
|
},
|
|
129967
129992
|
setTarget: async ({ target }) => {
|
|
129993
|
+
if (target > 4.5) this.climateRestoreTargetC = target;
|
|
129968
129994
|
await this.requireFacade().climateSetTemperature(this.address, channel, target);
|
|
129969
129995
|
},
|
|
129970
129996
|
setPreset: async ({ preset }) => {
|
|
@@ -129998,7 +130024,17 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129998
130024
|
if (cap === "lock-control") return this.applyLock(parameter, value, now, origin);
|
|
129999
130025
|
if (cap === "climate-control") {
|
|
130000
130026
|
const next = decodeClimate(this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE, parameter, value, now);
|
|
130001
|
-
if (next) this.
|
|
130027
|
+
if (next === null && parameter === "SET_POINT_MODE") this.ctx.logger.debug("Homematic climate: SET_POINT_MODE unknown — mode unchanged", {
|
|
130028
|
+
tags: { deviceId: this.id },
|
|
130029
|
+
meta: {
|
|
130030
|
+
value,
|
|
130031
|
+
valueType: typeof value
|
|
130032
|
+
}
|
|
130033
|
+
});
|
|
130034
|
+
if (next) {
|
|
130035
|
+
if (next.target !== null && next.target > 4.5) this.climateRestoreTargetC = next.target;
|
|
130036
|
+
this.runtimeState.setCapState("climate-control", next);
|
|
130037
|
+
}
|
|
130002
130038
|
}
|
|
130003
130039
|
}
|
|
130004
130040
|
applyCover(parameter, value, now, origin) {
|
package/dist/addon.mjs
CHANGED
|
@@ -129605,28 +129605,37 @@ var HmChildDevice = class extends BaseDevice {
|
|
|
129605
129605
|
this.seedTriggerUnsubs = [];
|
|
129606
129606
|
}
|
|
129607
129607
|
};
|
|
129608
|
-
|
|
129609
|
-
|
|
129610
|
-
|
|
129611
|
-
|
|
129612
|
-
*
|
|
129613
|
-
|
|
129608
|
+
function isHmOffSetpoint(target) {
|
|
129609
|
+
return target !== null && target <= 4.5;
|
|
129610
|
+
}
|
|
129611
|
+
/**
|
|
129612
|
+
* HmIP `SET_POINT_MODE` index → library climate mode.
|
|
129613
|
+
*
|
|
129614
|
+
* Observed 2026-11-13 via `getParamsetDescription` on `INT0000001:1`: the
|
|
129615
|
+
* datapoint is `TYPE INTEGER`, `MIN 0`, `MAX 3`, with no value list. The
|
|
129616
|
+
* live CCU therefore delivers the index, not a name.
|
|
129617
|
+
* 0 auto, 1 manual heat, 2 party (a timed override — still auto).
|
|
129618
|
+
* 3 is absent: unknown, so {@link fromHmSetPointMode} returns null and the
|
|
129619
|
+
* caller keeps the previous mode.
|
|
129620
|
+
* `CONTROL_MODE` is write-only on HmIP heating groups and always reads `0`;
|
|
129621
|
+
* mode is read from here.
|
|
129622
|
+
*/
|
|
129623
|
+
var HM_SET_POINT_MODE_BY_INDEX = {
|
|
129614
129624
|
0: "auto",
|
|
129615
129625
|
1: "heat",
|
|
129616
|
-
2: "
|
|
129617
|
-
3: "heat"
|
|
129626
|
+
2: "auto"
|
|
129618
129627
|
};
|
|
129619
129628
|
/**
|
|
129620
|
-
*
|
|
129621
|
-
*
|
|
129622
|
-
*
|
|
129623
|
-
* library climate mode. Matched BY NAME, case-insensitively.
|
|
129629
|
+
* Name form, accepted only when a string arrives (a value list that did
|
|
129630
|
+
* resolve). Matched case-insensitively. `PARTY` is the timed override and
|
|
129631
|
+
* stays auto, matching index 2.
|
|
129624
129632
|
*/
|
|
129625
|
-
var
|
|
129633
|
+
var HM_SET_POINT_MODE_BY_NAME = {
|
|
129634
|
+
AUTO: "auto",
|
|
129626
129635
|
"AUTO-MODE": "auto",
|
|
129636
|
+
MANU: "heat",
|
|
129627
129637
|
"MANU-MODE": "heat",
|
|
129628
|
-
|
|
129629
|
-
"BOOST-MODE": "heat"
|
|
129638
|
+
PARTY: "auto"
|
|
129630
129639
|
};
|
|
129631
129640
|
/** Map a CamStack `HvacMode` to the library's narrower climate mode. */
|
|
129632
129641
|
function toHmClimateMode(mode) {
|
|
@@ -129638,22 +129647,20 @@ function toHmClimateMode(mode) {
|
|
|
129638
129647
|
}
|
|
129639
129648
|
}
|
|
129640
129649
|
/**
|
|
129641
|
-
* Map a
|
|
129650
|
+
* Map a Homematic `SET_POINT_MODE` value to the CamStack `HvacMode`.
|
|
129642
129651
|
*
|
|
129643
|
-
*
|
|
129644
|
-
*
|
|
129645
|
-
* `
|
|
129646
|
-
* decoded at all. The numeric arm survives for a datapoint whose value
|
|
129647
|
-
* list did not resolve.
|
|
129652
|
+
* The live CCU sends the integer index (see {@link HM_SET_POINT_MODE_BY_INDEX}).
|
|
129653
|
+
* A string is accepted only when one arrives (`AUTO` / `AUTO-MODE`,
|
|
129654
|
+
* `MANU` / `MANU-MODE`). Index 3 and any other unknown value return null.
|
|
129648
129655
|
*/
|
|
129649
|
-
function
|
|
129656
|
+
function fromHmSetPointMode(value) {
|
|
129650
129657
|
if (typeof value === "string") {
|
|
129651
|
-
const mode =
|
|
129658
|
+
const mode = HM_SET_POINT_MODE_BY_NAME[value.toUpperCase()];
|
|
129652
129659
|
if (mode === void 0) return null;
|
|
129653
129660
|
return mode === "auto" ? "auto" : "heat";
|
|
129654
129661
|
}
|
|
129655
129662
|
if (typeof value !== "number") return null;
|
|
129656
|
-
const mode =
|
|
129663
|
+
const mode = HM_SET_POINT_MODE_BY_INDEX[value];
|
|
129657
129664
|
if (mode === void 0) return null;
|
|
129658
129665
|
return mode === "auto" ? "auto" : "heat";
|
|
129659
129666
|
}
|
|
@@ -129799,12 +129806,19 @@ function decodeLock(parameter, value, now) {
|
|
|
129799
129806
|
/**
|
|
129800
129807
|
* Decode a climate datapoint into a ClimateControlStatus patch.
|
|
129801
129808
|
* Parameters: SET_POINT_TEMPERATURE (target °C), ACTUAL_TEMPERATURE
|
|
129802
|
-
* (current °C), HUMIDITY (%),
|
|
129809
|
+
* (current °C), HUMIDITY (%), SET_POINT_MODE (ENUM, readable mode),
|
|
129810
|
+
* BOOST_MODE (bool). `CONTROL_MODE` is write-only on HmIP and ignored here.
|
|
129803
129811
|
*/
|
|
129812
|
+
function modeWithHmOffTarget(previous, target) {
|
|
129813
|
+
if (isHmOffSetpoint(target)) return previous.mode === "auto" ? "auto" : "off";
|
|
129814
|
+
if (previous.mode === "off") return previous.lastActiveMode ?? "heat";
|
|
129815
|
+
return previous.mode;
|
|
129816
|
+
}
|
|
129804
129817
|
function decodeClimate(previous, parameter, value, now) {
|
|
129805
129818
|
if (parameter === "SET_POINT_TEMPERATURE" && typeof value === "number") return {
|
|
129806
129819
|
...previous,
|
|
129807
129820
|
target: value,
|
|
129821
|
+
mode: modeWithHmOffTarget(previous, value),
|
|
129808
129822
|
lastFetchedAt: now
|
|
129809
129823
|
};
|
|
129810
129824
|
if (parameter === "ACTUAL_TEMPERATURE" && typeof value === "number") return {
|
|
@@ -129817,12 +129831,13 @@ function decodeClimate(previous, parameter, value, now) {
|
|
|
129817
129831
|
currentHumidity: value,
|
|
129818
129832
|
lastFetchedAt: now
|
|
129819
129833
|
};
|
|
129820
|
-
if (parameter === "
|
|
129821
|
-
const mode =
|
|
129834
|
+
if (parameter === "SET_POINT_MODE") {
|
|
129835
|
+
const mode = fromHmSetPointMode(value);
|
|
129822
129836
|
if (mode === null) return null;
|
|
129837
|
+
const resolved = mode === "heat" && isHmOffSetpoint(previous.target) ? "off" : mode;
|
|
129823
129838
|
return {
|
|
129824
129839
|
...previous,
|
|
129825
|
-
mode,
|
|
129840
|
+
mode: resolved,
|
|
129826
129841
|
lastFetchedAt: now
|
|
129827
129842
|
};
|
|
129828
129843
|
}
|
|
@@ -129883,6 +129898,8 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129883
129898
|
kind;
|
|
129884
129899
|
/** The actuator cap name actually registered (drives decode routing). */
|
|
129885
129900
|
registeredCap = null;
|
|
129901
|
+
/** Last setpoint above {@link HM_OFF_SETPOINT_C}; HmIP OFF leaves target at 4.5. */
|
|
129902
|
+
climateRestoreTargetC = null;
|
|
129886
129903
|
constructor(ctx) {
|
|
129887
129904
|
super(ctx, hmActuatorSchema);
|
|
129888
129905
|
this.kind = this.config.values.kind;
|
|
@@ -129963,9 +129980,18 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129963
129980
|
const provider = {
|
|
129964
129981
|
getStatus: async () => this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE,
|
|
129965
129982
|
setMode: async ({ mode }) => {
|
|
129966
|
-
|
|
129983
|
+
const facade = this.requireFacade();
|
|
129984
|
+
const prev = this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE;
|
|
129985
|
+
const hmMode = toHmClimateMode(mode);
|
|
129986
|
+
if (hmMode === "off" && prev.target !== null && prev.target > 4.5) this.climateRestoreTargetC = prev.target;
|
|
129987
|
+
await facade.climateSetMode(this.address, channel, hmMode);
|
|
129988
|
+
if (mode === "heat" && (prev.mode === "off" || isHmOffSetpoint(prev.target))) {
|
|
129989
|
+
const restore = this.climateRestoreTargetC ?? 21;
|
|
129990
|
+
await facade.climateSetTemperature(this.address, channel, restore);
|
|
129991
|
+
}
|
|
129967
129992
|
},
|
|
129968
129993
|
setTarget: async ({ target }) => {
|
|
129994
|
+
if (target > 4.5) this.climateRestoreTargetC = target;
|
|
129969
129995
|
await this.requireFacade().climateSetTemperature(this.address, channel, target);
|
|
129970
129996
|
},
|
|
129971
129997
|
setPreset: async ({ preset }) => {
|
|
@@ -129999,7 +130025,17 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
129999
130025
|
if (cap === "lock-control") return this.applyLock(parameter, value, now, origin);
|
|
130000
130026
|
if (cap === "climate-control") {
|
|
130001
130027
|
const next = decodeClimate(this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE, parameter, value, now);
|
|
130002
|
-
if (next) this.
|
|
130028
|
+
if (next === null && parameter === "SET_POINT_MODE") this.ctx.logger.debug("Homematic climate: SET_POINT_MODE unknown — mode unchanged", {
|
|
130029
|
+
tags: { deviceId: this.id },
|
|
130030
|
+
meta: {
|
|
130031
|
+
value,
|
|
130032
|
+
valueType: typeof value
|
|
130033
|
+
}
|
|
130034
|
+
});
|
|
130035
|
+
if (next) {
|
|
130036
|
+
if (next.target !== null && next.target > 4.5) this.climateRestoreTargetC = next.target;
|
|
130037
|
+
this.runtimeState.setCapState("climate-control", next);
|
|
130038
|
+
}
|
|
130003
130039
|
}
|
|
130004
130040
|
}
|
|
130005
130041
|
applyCover(parameter, value, now, origin) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-homematic",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.194",
|
|
4
4
|
"description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"requires": {
|
|
80
|
-
"server": ">=1.2.
|
|
80
|
+
"server": ">=1.2.856",
|
|
81
81
|
"addons": {
|
|
82
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
82
|
+
"@camstack/addon-admin-ui": ">=1.2.659"
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
},
|