⚠️ Breaking Changes
-
For Users:
- Before upgrading, you will want to ensure that the plugin(s) you are using are compatible with this new version of Homebridge. If you are unsure, see the link below or open an issue with the developer of your plugin(s) in question.
- Node.js v18 and v20 are no longer supported. Homebridge v2 requires Node.js v22 or v24.
-
For Plugin Developers:
- HAP-NodeJS rename + major upgrade. The dependency was renamed from
hap-nodejsto@homebridge/hap-nodejsand bumped from0.14.xto2.x. Plugins importing directly fromhap-nodejsmust update both the package name and adjust to the v2 API. The recommended path is to import HAP types fromhomebridge(which re-exports them) rather than depending on@homebridge/hap-nodejsdirectly. - ESM-only. The published package is now ESM (
"type": "module"). Plugins authored as CommonJS that loadhomebridgeviarequire()will not work; useimportsyntax. Plugins must publish ESM (or dual ESM/CJS) builds. - Output directory renamed
lib/→dist/. Plugins doing dirty-imports likehomebridge/lib/apimust switch to the public exports (import { API } from 'homebridge'). bin/homebridge→bin/homebridge.js. The bin entry now includes the.jsextension (ESM requires it). The npm-managedhomebridgeshim is unaffected; only hardcoded paths to the script need updating.- Legacy deprecation cleanup (#3648). The following were removed in v2:
- Module-level
withPrefix,setDebugEnabled,setTimestampEnabled,forceColorexports fromhomebridge. UseLogger.withPrefix(...),Logger.setDebugEnabled(...), etc. on theLoggerclass. PlatformAccessory.reachable,PlatformAccessory.updateReachability,PlatformAccessory.getServiceByUUIDAndSubType,PlatformAccessory.configureCameraSource. UsegetServiceByIdand standard HAP camera registration patterns.API.publishCameraAccessories. UseAPI.publishExternalAccessories(this is what the deprecated method delegated to internally).HomebridgeConfig.mdnsfield is no longer forwarded to child bridges and is ignored. Usebridge.advertiserinstead.
- Module-level
- HAP-NodeJS rename + major upgrade. The dependency was renamed from
-
Please visit the following link to learn more about the changes and how to prepare:
Added
- set debug
-Dsetting per child bridge - feat: matter implementation
- fix: matter fix [1] - matter cache getter (@talrhv)
- fix: matter fix [2] - various fixes
- fix: matter fix [3] - combined devices
- fix: matter fix [4] - general fixes
- fix: matter fix [5] - expose
WaterValvedevice (#3909) (@donavanbecker) - fix: matter fix [6] - crash when bridge bind is set (#3910) (@gtalusan)
- fix: matter fix [7] - fix level control for non-lighting devices
- fix: add powerSource to clusterNames and ClusterStateMap (#3912) (@gtalusan)
- fix: enable Rechargeable feature for PowerSource cluster when batChargeState is provided (#3914) (@gtalusan)
- fix: remove API event listeners in Matter manager teardown (#3915) (@gtalusan)
- fix: remove stateChange/commissioning listeners from MatterServer on teardown (#3916) (@gtalusan)
- fix: remove duplicate API event listeners from Server (#3917) (@gtalusan)
- fix: remove process message listener on IpcService teardown (#3918) (@gtalusan)
- fix: bind MdnsService to bridge.bind interface (#3920) (@gtalusan)
- fix: matter fix [15] - various enhancements
- fix: Add
GenericSwitchtoapi.matter.deviceTypes(#3923) (@donavanbecker) - refactor(matter): namespace switch helper as api.matter.switch.emit
Changed
- Address legacy deprecation cleanup (#3648) (@hjdhjd)
- general code modernisation:
- ⚠️ move from
commonjstoesmmodules - use lint rules from
@antfu/eslint-config - migrate from
jesttovitestfor testing - ⚠️ drop support for node
v18and20
- ⚠️ move from
- fix(server): wire bridge.hap=false through
Removed
- ⚠️ remove deprecated
--remove-orphansflag
Homebridge Dependencies
@homebridge/hap-nodejs@v2.1.4