homebridge-melcloud-control 4.0.0-beta.405 → 4.0.0-beta.407
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/package.json +1 -1
- package/src/melcloudhometoken.js +1 -12
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.407",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/melcloudhometoken.js
CHANGED
|
@@ -104,7 +104,7 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// --- Main login flow ---
|
|
107
|
-
async
|
|
107
|
+
async getTokens(email, password) {
|
|
108
108
|
const { verifier, challenge } = this._generatePkcePair();
|
|
109
109
|
|
|
110
110
|
// Build authorize URL
|
|
@@ -197,17 +197,6 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
// --- Example usage ---
|
|
201
|
-
(async () => {
|
|
202
|
-
try {
|
|
203
|
-
const mel = new MelCloudHomeOAuth();
|
|
204
|
-
const token = await mel.login('YOUR_EMAIL', 'YOUR_PASSWORD');
|
|
205
|
-
console.log('✅ Final token:', token);
|
|
206
|
-
} catch (err) {
|
|
207
|
-
console.error('iDom Home, Connect error:', err.message);
|
|
208
|
-
}
|
|
209
|
-
})();
|
|
210
|
-
|
|
211
200
|
|
|
212
201
|
export default MelCloudHomeToken;
|
|
213
202
|
|