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

v2.7.12 on Homebridge v2.0.0 beta 13 - TypeError in switchAccessory.getServiceByUUIDAndSubType #346

Open
jakepez opened this issue Aug 31, 2024 · 4 comments

Comments

@jakepez
Copy link

jakepez commented Aug 31, 2024

Homebridge v2.0.0. beta 13
Plugin: v2.7.12

Runs without error on Homebridge v1.8.4

Crashes with (full logs attached):

[8/31/2024, 12:39:44 PM] [homebridge-dyson-pure-cool] Device with serial number PE7-US-KNA3301A: product type 455
[8/31/2024, 12:39:44 PM] Homebridge v2.0.0-beta.13 (HAP v1.1.1-beta.2) (homebridge-dyson-pure-cool) is running on port 34815.
/homebridge/node_modules/homebridge-dyson-pure-cool/src/dyson-pure-cool-device.js:319
        nightModeSwitchService = switchAccessory.getServiceByUUIDAndSubType(Service.Switch, 'NightMode');
                                                 ^
TypeError: switchAccessory.getServiceByUUIDAndSubType is not a function
    at new DysonPureCoolDevice (/homebridge/node_modules/homebridge-dyson-pure-cool/src/dyson-pure-cool-device.js:319:50)
    at HomebridgeAPI.<anonymous> (/homebridge/node_modules/homebridge-dyson-pure-cool/src/dyson-pure-cool-platform.js:97:35)
    at HomebridgeAPI.emit (node:events:519:28)
    at HomebridgeAPI.signalFinished (file:///homebridge/node_modules/homebridge/src/api.ts:254:10)
    at ChildBridgeFork.startBridge (file:///homebridge/node_modules/homebridge/src/childBridgeFork.ts:196:14)
[8/31/2024, 12:39:44 PM] [homebridge-dyson-pure-cool] Child bridge ended (code 1, signal null). The child bridge ended unexpectedly, which is normally due to the plugin not catching its errors properly. Please report this to the plugin developer by clicking on the 'Report An Issue' option in the plugin menu dropdown from the Homebridge UI. If there are related logs shown above, please include them in your report.

homebridge-dyson-pure-cool.log.txt

@fubu2k
Copy link

fubu2k commented Sep 12, 2024

same for me, even with Homebridge v2.0.0. beta 20

@speedingcheetah
Copy link

Same. Plugin just crashes over and over. Fails to work on HB 2.0. Requires update/code change to meet HB 2.0 standards.
This is the only plugin that fails to work for me.

@lukasroegner
Copy link
Owner

Thanks to the PR from @bwp91 homebridge v2 should be supported now, please try the latest version from NPM.

@speedingcheetah
Copy link

speedingcheetah commented Oct 13, 2024

Thanks to the PR from @bwp91 homebridge v2 should be supported now, please try the latest version from NPM.

Updated plugin and HB to v2.0.0 beta 22 and UI to v4.61.1 beta.0
Plugin loading fine and working. Thank YOU!

The only thing is that it spams in the logs

" has an invalid 'Name' characteristic ('homebridge-dyson-pure-cool'). Please use only alphanumeric, space, and apostrophe characters. Ensure it starts and ends with an alphabetic or numeric character, and avoid emojis. This may prevent the accessory from being added in the Home App or cause unresponsiveness." Which, seems all plugins that are named with "-" etc are throwing. Or any of its accessories that do not follow the new naming requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants