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

Homebridge v2.0 Breaking Updates #722

Closed
mitch7391 opened this issue Jul 25, 2024 · 4 comments
Closed

Homebridge v2.0 Breaking Updates #722

mitch7391 opened this issue Jul 25, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@mitch7391
Copy link

mitch7391 commented Jul 25, 2024

Describe the solution you'd like
Hey @kiwi-cam I am not sure if you are aware but the next version of Homebridge (v2.0) comes with breaking changes for a lot of Homebridge plug-ins and it has been put on the developers to update their plug-ins.

For Plug-In Developers

I have tested this plug-in on the beta version and it will crash Homebridge.

Describe alternatives you've considered
All users of this plug-in will have to remain on Homebridge v1.8.4.

Additional context
image

Logs:

[27/07/2024, 4:06:19 pm] [Broadlink RM] Restarting Process...
[27/07/2024, 4:06:20 pm] [Broadlink RM] Launched child bridge with PID 21322
[27/07/2024, 4:06:23 pm] Registering platform 'homebridge-broadlink-rm-pro.BroadlinkRM'
[27/07/2024, 4:06:23 pm] [Broadlink RM] Loaded homebridge-broadlink-rm-pro v4.4.17 child bridge successfully
[27/07/2024, 4:06:23 pm] Loaded 0 cached accessories from cachedAccessories.0E61EA11E136.
[27/07/2024, 4:06:23 pm] [Broadlink RM] [INFO] Automatically discovering Broadlink RM devices.
[27/07/2024, 4:06:23 pm] [Broadlink RM] [INFO] Running Homebridge Broadlink RM Plugin version 4.4.17
HAP-NodeJS WARNING: The accessory 'X-mas Tree' has an invalid 'Name' characteristic ('X-mas Tree'). 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.
[27/07/2024, 4:06:23 pm] [Broadlink RM] X-mas Tree Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 1 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 2 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 3 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 4 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 5 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Blind 6 Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fairy Lights Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Spare Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fan Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fan Up Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fan Down Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fan Low Accessory Ready
[27/07/2024, 4:06:23 pm] [Broadlink RM] Fan High Accessory Ready
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Learn'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Scan Frequency'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'X-mas Tree'...
HAP-NodeJS WARNING: The accessory 'X-mas Tree' has an invalid 'Name' characteristic ('X-mas Tree'). 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.
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 1'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 2'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 3'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 4'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 5'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Blind 6'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fairy Lights'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Spare'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fan'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fan Up'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fan Down'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fan Low'...
[27/07/2024, 4:06:23 pm] Initializing platform accessory 'Fan High'...
[27/07/2024, 4:06:23 pm] Homebridge v2.0.0-beta.8 (HAP v1.1.0) (Broadlink RM) is running on port 37302.

/usr/local/lib/node_modules/homebridge-broadlink-rm-pro/helpers/serviceManager.js:27
    this.getCharacteristic(characteristic).getValue();
                                           ^
TypeError: this.getCharacteristic(...).getValue is not a function
    at ServiceManager.refreshCharacteristicUI (/usr/local/lib/node_modules/homebridge-broadlink-rm-pro/helpers/serviceManager.js:27:44)
    at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-rm-pro/base/accessory.js:209:43)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)
[27/07/2024, 4:06:23 pm] [Broadlink RM] Child bridge process ended
[27/07/2024, 4:06:23 pm] [Broadlink RM] Process Ended. Code: 1, Signal: null
@kiwi-cam
Copy link
Owner

The latest Beta should resolve at least one of the issues. Unfortunately it looks like fakegato-history isn't compatible yet which will break the plugin.

@kiwi-cam kiwi-cam self-assigned this Jul 25, 2024
@mitch7391
Copy link
Author

@kiwi-cam I should have added some logs with my issue, I have updated my issue with them just in case but looks like your new beta version is working with Homebridge v2 :)

@kiwi-cam
Copy link
Owner

I've notice one issue with the compatibility changes. Previously, using deprecated getValue() would trigger a refresh of the data too. This was used for temperature and humidity sensors to trigger a data update at set intervals. Using "value" doesn't trigger the get method to refresh the data so updates are sporadic - very noticeable in fakegato.

I haven't found a simple workaround for this yet - it might require a small rework of the monitorTemperature code.

@kiwi-cam
Copy link
Owner

kiwi-cam commented Aug 7, 2024

4.4.18 is now released and includes the required changes

@kiwi-cam kiwi-cam closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants