mgcrea / homebridge-tydom

Homebridge plugin to manage Tydom hardware by Delta Dore from Apple HomeKit.
63 stars 14 forks source link

Ajout support Tybox 2020 WT #31

Closed 0xRoch closed 2 years ago

0xRoch commented 4 years ago

J'aimerais ajouter la centrale de consomation tybox 2020 WT mais j'ai un message d'erreur au lancement de homebridge. C'est supporté ?

20/08/2020 à 11:36:46 [Tydom] Properly loaded 9-accessories
20/08/2020 à 11:36:47 (node:7456) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: undefined undefined undefined
20/08/2020 à 11:36:47 at new AssertionError (internal/assert/assertion_error.js:401:11)
20/08/2020 à 11:36:47 at assert (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/utils/assert.ts:5:11)
20/08/2020 à 11:36:47 at tydomAccessorySetup (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/accessories/thermostat.ts:166:3)
20/08/2020 à 11:36:47 at /home/hoobs/.hoobs/node_modules/homebridge-tydom/src/platform.ts:103:11
20/08/2020 à 11:36:47 at Generator.next (<anonymous>)
20/08/2020 à 11:36:47 at asyncGeneratorStep (/home/hoobs/.hoobs/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
20/08/2020 à 11:36:47 at _next (/home/hoobs/.hoobs/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
20/08/2020 à 11:36:47 at /home/hoobs/.hoobs/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
20/08/2020 à 11:36:47 at new Promise (<anonymous>)
20/08/2020 à 11:36:47 at /home/hoobs/.hoobs/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
20/08/2020 à 11:36:47 (node:7456) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
20/08/2020 à 11:36:47 (node:7456) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
20/08/2020 à 11:36:47 [Tydom] Missing pin for device securitySystem, add either {"settings": {"1597488668": {"pin": "123456"}}} or HOMEBRIDGE_TYDOM_PIN env var (base64 encoded)
mgcrea commented 4 years ago

Hello, bizarre en effet c'est un soucis dans la création du thermostat, j'ai fait une nouvelle release v0.19.4 qui devrait rejeter une erreur avec plus d'info. Pour creuser davantage il me faudrait du debug que tu peux générer en local avec la commande suivante (n'importe quel ordi avec NodeJS d'installé):

npx tydom-client request /configs/file /devices/data /devices/meta /devices/cmeta --file tydom_output.json --username 001A25XXXXXX --password XXXXXX

Il faut remplacer ton username/password et le debug est créé dans le fichier tydom_output.json.

0xRoch commented 4 years ago

En effet on dirait qu'il cherche thermicLevel dans l'output du Thermostat mais qu'il retourne un array formaté differement

01/09/2020 à 23:41:32 (node:21827) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: Did not found object in array that matches {"name": "thermicLevel"} in [{"name":"outTemperature","type":"numeric","permission":"r","min":-99.9,"max":99.9,"step":0.01,"unit":"degC"}]
01/09/2020 à 23:41:32 at new AssertionError (internal/assert/assertion_error.js:401:11)
01/09/2020 à 23:41:32 at Object.assert [as default] (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/utils/assert.ts:5:11)
01/09/2020 à 23:41:32 at exports.setupThermostat (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/accessories/thermostat.ts:166:9)
01/09/2020 à 23:41:32 at TydomPlatform.updateAccessory (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/platform.ts:113:11)
01/09/2020 à 23:41:32 at TydomPlatform.createAccessory (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/platform.ts:104:16)
01/09/2020 à 23:41:32 at TydomPlatform.handleControllerDevice (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/platform.ts:75:34)
01/09/2020 à 23:41:32 at TydomController.emit (events.js:193:13)
01/09/2020 à 23:41:32 at endpoints.forEach (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/controller.ts:171:14)
01/09/2020 à 23:41:32 at Array.forEach (<anonymous>)
01/09/2020 à 23:41:32 at TydomController.scan (/home/hoobs/.hoobs/node_modules/homebridge-tydom/src/controller.ts:118:15)
01/09/2020 à 23:41:32 (node:21827) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
01/09/2020 à 23:41:32 (node:21827) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
01/09/2020 à 23:41:33 [Tydom] Missing pin for device securitySystem, add either {"settings": {"1597488668": {"pin": "123456"}}} or HOMEBRIDGE_TYDOM_PIN env var (base64 encoded)

tydom_output.txt