mgcrea / homebridge-tydom

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

Erreur Homebridge 2.0.0 beta 11 #156

Open Quitsoon opened 1 month ago

Quitsoon commented 1 month ago

Describe the bug

Bonjour,

je rencontre l'erreur "TypeError: d.getCharacteristic(...).on(...).getValue is not a function" suite à l'essai la version v2.0.0 beta 11 d'homebridge.

Homebridge redémarre en boucle le child bridge. L'initialisation se passe bien, jusqu'à la ligne "Properly loaded XX-accessories"

Le passage à la version 1.8.4 résous le problème

Related hardware

Raspberry pi 4

Logs

[10/08/2024, 21:13:15] [homebridge-tydom] Properly loaded 11-accessories

/var/lib/homebridge/node_modules/homebridge-tydom/src/accessories/windowCovering.ts:94
    .getValue();
     ^
TypeError: d.getCharacteristic(...).on(...).getValue is not a function
    at A6 (/var/lib/homebridge/node_modules/homebridge-tydom/src/accessories/windowCovering.ts:94:6)
    at iu.updateAccessory (/var/lib/homebridge/node_modules/homebridge-tydom/src/platform.ts:160:74)
    at iu.handleControllerDevice (/var/lib/homebridge/node_modules/homebridge-tydom/src/platform.ts:93:20)
    at Zc.emit (node:events:519:28)
    at /var/lib/homebridge/node_modules/homebridge-tydom/src/controller.ts:202:14
    at Array.forEach (<anonymous>)
    at Zc.scan (/var/lib/homebridge/node_modules/homebridge-tydom/src/controller.ts:138:15)
    at iu.didFinishLaunching (/var/lib/homebridge/node_modules/homebridge-tydom/src/platform.ts:65:5)
[10/08/2024, 21:13:15] [homebridge-tydom] Child bridge process ended

Versions homebridge-tydom: v0.25.0

Quitsoon commented 1 month ago

J'ai trouvé l'info suivantes :
https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

Common long-deprecated code patterns that may need updating:
Use of enums off the Characteristic class is no longer supported:
    Instead of const Units = Characteristic.Units; you will need to use const Units = api.hap.Units;
    Instead of const Formats = Characteristic.Formats; you will need to use const Formats = api.hap.Formats;
    Instead of const Perms = Characteristic.Perms; you will need to use const Perms = api.hap.Perms;
Characteristic.getValue() has been removed in favour of Characteristic.value