Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Homematic Home Control Unit (HCU) #618

Merged
merged 3 commits into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion api/hmCloudAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class HmCloudAPI {
accept: 'application/json',
VERSION: '12',
CLIENTAUTH: this._clientAuthToken,
"ACCESSPOINT-ID": this._accessPointSgtin,
};
if (this._pin) {
headers['PIN'] = this._pin;
Expand Down Expand Up @@ -118,8 +119,9 @@ class HmCloudAPI {
accept: 'application/json',
VERSION: '12',
CLIENTAUTH: this._clientAuthToken,
"ACCESSPOINT-ID": this._accessPointSgtin,
};
const body = { deviceId: this._deviceId };
const body = { deviceId: this._deviceId, accessPointId: this._accessPointSgtin };
try {
await axios.post(`${this._urlREST}/hmip/auth/isRequestAcknowledged`, body, {
headers,
Expand All @@ -140,6 +142,7 @@ class HmCloudAPI {
accept: 'application/json',
VERSION: '12',
CLIENTAUTH: this._clientAuthToken,
"ACCESSPOINT-ID": this._accessPointSgtin,
};
let body = { deviceId: this._deviceId };
let res;
Expand Down Expand Up @@ -172,6 +175,7 @@ class HmCloudAPI {
VERSION: '12',
AUTHTOKEN: this._authToken,
CLIENTAUTH: this._clientAuthToken,
"ACCESSPOINT-ID": this._accessPointSgtin,
};
try {
const response = await axios.post(`${this._urlREST}/hmip/${path}`, data, { headers });
Expand Down Expand Up @@ -218,6 +222,7 @@ class HmCloudAPI {
headers: {
AUTHTOKEN: this._authToken,
CLIENTAUTH: this._clientAuthToken,
"ACCESSPOINT-ID": this._accessPointSgtin,
},
perMessageDeflate: false,
});
Expand Down
Loading