@switchbot/homebridge-switchbot 5.0.0-beta.13 → 5.0.0-beta.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/e2e-verification.md +36 -0
- package/.github/copilot-instructions.md +39 -0
- package/.github/workflows/ci.yml +32 -0
- package/.github/workflows/manual-e2e.yml +115 -0
- package/.github/workflows/release.yml +0 -4
- package/CHANGELOG.md +35 -0
- package/E2E-VERIFICATION.md +121 -0
- package/MIGRATION.md +54 -0
- package/README.md +99 -3
- package/TODO.md +263 -0
- package/config.schema.json +198 -14787
- package/dist/device-types.d.ts +31 -0
- package/dist/device-types.d.ts.map +1 -0
- package/dist/device-types.js +246 -0
- package/dist/device-types.js.map +1 -0
- package/dist/deviceFactory.d.ts +13 -0
- package/dist/deviceFactory.d.ts.map +1 -0
- package/dist/deviceFactory.js +146 -0
- package/dist/deviceFactory.js.map +1 -0
- package/dist/devices/deviceBase.d.ts +50 -0
- package/dist/devices/deviceBase.d.ts.map +1 -0
- package/dist/devices/deviceBase.js +119 -0
- package/dist/devices/deviceBase.js.map +1 -0
- package/dist/devices/genericDevice.d.ts +277 -0
- package/dist/devices/genericDevice.d.ts.map +1 -0
- package/dist/devices/genericDevice.js +1383 -0
- package/dist/devices/genericDevice.js.map +1 -0
- package/dist/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +51 -0
- package/dist/errors.js.map +1 -0
- package/dist/homebridge-ui/endpoints/config.d.ts +3 -0
- package/dist/homebridge-ui/endpoints/config.d.ts.map +1 -0
- package/dist/homebridge-ui/endpoints/config.js +107 -0
- package/dist/homebridge-ui/endpoints/config.js.map +1 -0
- package/dist/homebridge-ui/endpoints/credentials.d.ts +6 -0
- package/dist/homebridge-ui/endpoints/credentials.d.ts.map +1 -0
- package/dist/homebridge-ui/endpoints/credentials.js +65 -0
- package/dist/homebridge-ui/endpoints/credentials.js.map +1 -0
- package/dist/homebridge-ui/endpoints/devices.d.ts +6 -0
- package/dist/homebridge-ui/endpoints/devices.d.ts.map +1 -0
- package/dist/homebridge-ui/endpoints/devices.js +430 -0
- package/dist/homebridge-ui/endpoints/devices.js.map +1 -0
- package/dist/homebridge-ui/endpoints/discovery.d.ts +7 -0
- package/dist/homebridge-ui/endpoints/discovery.d.ts.map +1 -0
- package/dist/homebridge-ui/endpoints/discovery.js +212 -0
- package/dist/homebridge-ui/endpoints/discovery.js.map +1 -0
- package/dist/homebridge-ui/public/css/styles.css +447 -0
- package/dist/homebridge-ui/public/index.html +144 -248
- package/dist/homebridge-ui/public/js/api.d.ts +62 -0
- package/dist/homebridge-ui/public/js/api.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/api.js +225 -0
- package/dist/homebridge-ui/public/js/api.js.map +1 -0
- package/dist/homebridge-ui/public/js/api.ts +279 -0
- package/dist/homebridge-ui/public/js/app.d.ts +2 -0
- package/dist/homebridge-ui/public/js/app.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/app.js +3600 -0
- package/dist/homebridge-ui/public/js/app.js.map +7 -0
- package/dist/homebridge-ui/public/js/app.ts +23 -0
- package/dist/homebridge-ui/public/js/constants.d.ts +2 -0
- package/dist/homebridge-ui/public/js/constants.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/constants.js +2 -0
- package/dist/homebridge-ui/public/js/constants.js.map +1 -0
- package/dist/homebridge-ui/public/js/constants.ts +1 -0
- package/dist/homebridge-ui/public/js/credentials.d.ts +3 -0
- package/dist/homebridge-ui/public/js/credentials.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/credentials.js +96 -0
- package/dist/homebridge-ui/public/js/credentials.js.map +1 -0
- package/dist/homebridge-ui/public/js/credentials.ts +100 -0
- package/dist/homebridge-ui/public/js/devices-delete.d.ts +3 -0
- package/dist/homebridge-ui/public/js/devices-delete.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/devices-delete.js +206 -0
- package/dist/homebridge-ui/public/js/devices-delete.js.map +1 -0
- package/dist/homebridge-ui/public/js/devices-delete.ts +236 -0
- package/dist/homebridge-ui/public/js/devices.d.ts +9 -0
- package/dist/homebridge-ui/public/js/devices.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/devices.js +94 -0
- package/dist/homebridge-ui/public/js/devices.js.map +1 -0
- package/dist/homebridge-ui/public/js/devices.ts +114 -0
- package/dist/homebridge-ui/public/js/discovery.d.ts +4 -0
- package/dist/homebridge-ui/public/js/discovery.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/discovery.js +1364 -0
- package/dist/homebridge-ui/public/js/discovery.js.map +1 -0
- package/dist/homebridge-ui/public/js/discovery.ts +1492 -0
- package/dist/homebridge-ui/public/js/logger.d.ts +6 -0
- package/dist/homebridge-ui/public/js/logger.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/logger.js +12 -0
- package/dist/homebridge-ui/public/js/logger.js.map +1 -0
- package/dist/homebridge-ui/public/js/logger.ts +11 -0
- package/dist/homebridge-ui/public/js/modal.d.ts +5 -0
- package/dist/homebridge-ui/public/js/modal.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/modal.js +26 -0
- package/dist/homebridge-ui/public/js/modal.js.map +1 -0
- package/dist/homebridge-ui/public/js/modal.ts +28 -0
- package/dist/homebridge-ui/public/js/modals.d.ts +7 -0
- package/dist/homebridge-ui/public/js/modals.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/modals.js +494 -0
- package/dist/homebridge-ui/public/js/modals.js.map +1 -0
- package/dist/homebridge-ui/public/js/modals.ts +546 -0
- package/dist/homebridge-ui/public/js/render.d.ts +68 -0
- package/dist/homebridge-ui/public/js/render.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/render.js +914 -0
- package/dist/homebridge-ui/public/js/render.js.map +1 -0
- package/dist/homebridge-ui/public/js/render.ts +1026 -0
- package/dist/homebridge-ui/public/js/toast.d.ts +6 -0
- package/dist/homebridge-ui/public/js/toast.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/toast.js +29 -0
- package/dist/homebridge-ui/public/js/toast.js.map +1 -0
- package/dist/homebridge-ui/public/js/toast.ts +37 -0
- package/dist/homebridge-ui/public/js/types.d.ts +23 -0
- package/dist/homebridge-ui/public/js/types.d.ts.map +1 -0
- package/dist/homebridge-ui/public/js/types.js +2 -0
- package/dist/homebridge-ui/public/js/types.js.map +1 -0
- package/dist/homebridge-ui/public/js/types.ts +26 -0
- package/dist/homebridge-ui/server.js +11 -41
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/homebridge-ui/utils/config-parser.d.ts +35 -0
- package/dist/homebridge-ui/utils/config-parser.d.ts.map +1 -0
- package/dist/homebridge-ui/utils/config-parser.js +87 -0
- package/dist/homebridge-ui/utils/config-parser.js.map +1 -0
- package/dist/homebridge-ui/utils/device-migration.d.ts +35 -0
- package/dist/homebridge-ui/utils/device-migration.d.ts.map +1 -0
- package/dist/homebridge-ui/utils/device-migration.js +111 -0
- package/dist/homebridge-ui/utils/device-migration.js.map +1 -0
- package/dist/homebridge-ui/utils/logger.d.ts +7 -0
- package/dist/homebridge-ui/utils/logger.d.ts.map +1 -0
- package/dist/homebridge-ui/utils/logger.js +17 -0
- package/dist/homebridge-ui/utils/logger.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/platform.d.ts +39 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +1570 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.d.ts +10 -249
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +5 -30
- package/dist/settings.js.map +1 -1
- package/dist/switchbotClient.d.ts +32 -0
- package/dist/switchbotClient.d.ts.map +1 -0
- package/dist/switchbotClient.js +253 -0
- package/dist/switchbotClient.js.map +1 -0
- package/dist/utils.d.ts +36 -82
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +40 -786
- package/dist/utils.js.map +1 -1
- package/docs/assets/highlight.css +21 -0
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/style.css +3 -3
- package/docs/index.html +103 -13
- package/docs/variables/default.html +1 -1
- package/eslint.config.js +7 -8
- package/nodemon.json +2 -2
- package/package.json +36 -32
- package/scripts/build-ui.js +36 -0
- package/scripts/e2e/README.md +25 -0
- package/scripts/e2e/curtain-e2e.sh +70 -0
- package/scripts/e2e/fan-e2e.sh +75 -0
- package/scripts/e2e/light-advanced-e2e.sh +97 -0
- package/scripts/e2e/light-e2e.sh +75 -0
- package/scripts/e2e/list-accessories.sh +19 -0
- package/scripts/e2e/lock-e2e.sh +65 -0
- package/scripts/free-dev-ports.mjs +105 -0
- package/scripts/generate-matter-maps.js +60 -0
- package/scripts/run-e2e-local.sh +14 -0
- package/scripts/sync-device-types.mjs +28 -0
- package/src/device-types.ts +261 -0
- package/src/deviceFactory.ts +190 -0
- package/src/devices/deviceBase.ts +141 -0
- package/src/devices/genericDevice.ts +1333 -0
- package/src/errors.ts +43 -0
- package/src/homebridge-ui/endpoints/config.ts +126 -0
- package/src/homebridge-ui/endpoints/credentials.ts +74 -0
- package/src/homebridge-ui/endpoints/devices.ts +464 -0
- package/src/homebridge-ui/endpoints/discovery.ts +233 -0
- package/src/homebridge-ui/public/css/styles.css +447 -0
- package/src/homebridge-ui/public/index.html +144 -248
- package/src/homebridge-ui/public/js/api.ts +279 -0
- package/src/homebridge-ui/public/js/app.ts +23 -0
- package/src/homebridge-ui/public/js/constants.ts +1 -0
- package/src/homebridge-ui/public/js/credentials.ts +100 -0
- package/src/homebridge-ui/public/js/devices-delete.ts +236 -0
- package/src/homebridge-ui/public/js/devices.ts +114 -0
- package/src/homebridge-ui/public/js/discovery.ts +1492 -0
- package/src/homebridge-ui/public/js/logger.ts +11 -0
- package/src/homebridge-ui/public/js/modal.ts +28 -0
- package/src/homebridge-ui/public/js/modals.ts +546 -0
- package/src/homebridge-ui/public/js/render.ts +1026 -0
- package/src/homebridge-ui/public/js/toast.ts +37 -0
- package/src/homebridge-ui/public/js/types.ts +26 -0
- package/src/homebridge-ui/server.ts +11 -43
- package/src/homebridge-ui/utils/config-parser.ts +108 -0
- package/src/homebridge-ui/utils/device-migration.ts +144 -0
- package/src/homebridge-ui/utils/logger.ts +17 -0
- package/src/index.ts +1 -3
- package/src/platform.ts +1585 -0
- package/src/settings.ts +12 -277
- package/src/switchbotClient.ts +251 -0
- package/src/utils.ts +48 -812
- package/test/accessory-restore.spec.ts +73 -0
- package/test/device-mapping.spec.ts +37 -0
- package/test/deviceFactory.spec.ts +18 -0
- package/test/e2e/run-e2e.spec.ts +52 -0
- package/test/fan-swing.spec.ts +29 -0
- package/test/helpers/matter-harness.ts +53 -0
- package/test/lock-users.spec.ts +44 -0
- package/test/matter-childbridge.spec.ts +59 -0
- package/test/matter-descriptors.spec.ts +97 -0
- package/test/matter-device-state.spec.ts +101 -0
- package/test/matter-integration.spec.ts +136 -0
- package/test/platform.integration.spec.ts +55 -0
- package/test/switchbot-client-debounce.spec.ts +131 -0
- package/test/switchbot-client-openapi.spec.ts +56 -0
- package/test/switchbotClient.spec.ts +10 -0
- package/test/utils.spec.ts +36 -0
- package/todo/COMPLETED.md +542 -0
- package/todo/README.md +59 -0
- package/todo/TODO.md +190 -0
- package/todo/mockups/filtering-sorting.svg +112 -0
- package/todo/mockups/modal-switchbot-theme.svg +66 -0
- package/todo/mockups/signal-strength-visualization.svg +94 -0
- package/vitest.config.ts +7 -0
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -15847
- package/coverage/coverage-final.json +0 -42
- package/coverage/docs/assets/dmt/dmt-component-data.js.html +0 -85
- package/coverage/docs/assets/dmt/dmt-components.js.html +0 -286
- package/coverage/docs/assets/dmt/index.html +0 -131
- package/coverage/docs/assets/hierarchy.js.html +0 -85
- package/coverage/docs/assets/icons.js.html +0 -136
- package/coverage/docs/assets/index.html +0 -146
- package/coverage/docs/assets/main.js.html +0 -265
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -191
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/device/blindtilt.ts.html +0 -3238
- package/coverage/src/device/bot.ts.html +0 -2803
- package/coverage/src/device/ceilinglight.ts.html +0 -2338
- package/coverage/src/device/colorbulb.ts.html +0 -2824
- package/coverage/src/device/contact.ts.html +0 -1465
- package/coverage/src/device/curtain.ts.html +0 -2869
- package/coverage/src/device/device.ts.html +0 -2500
- package/coverage/src/device/fan.ts.html +0 -2242
- package/coverage/src/device/hub.ts.html +0 -1408
- package/coverage/src/device/humidifier.ts.html +0 -2116
- package/coverage/src/device/index.html +0 -416
- package/coverage/src/device/iosensor.ts.html +0 -1375
- package/coverage/src/device/lightstrip.ts.html +0 -2617
- package/coverage/src/device/lock.ts.html +0 -1963
- package/coverage/src/device/meter.ts.html +0 -1372
- package/coverage/src/device/meterplus.ts.html +0 -1384
- package/coverage/src/device/meterpro.ts.html +0 -1618
- package/coverage/src/device/motion.ts.html +0 -1264
- package/coverage/src/device/plug.ts.html +0 -1372
- package/coverage/src/device/relayswitch.ts.html +0 -2284
- package/coverage/src/device/robotvacuumcleaner.ts.html +0 -1810
- package/coverage/src/device/waterdetector.ts.html +0 -1294
- package/coverage/src/homebridge-ui/index.html +0 -116
- package/coverage/src/homebridge-ui/server.ts.html +0 -229
- package/coverage/src/index.html +0 -161
- package/coverage/src/index.ts.html +0 -124
- package/coverage/src/irdevice/airconditioner.ts.html +0 -1687
- package/coverage/src/irdevice/airpurifier.ts.html +0 -844
- package/coverage/src/irdevice/camera.ts.html +0 -475
- package/coverage/src/irdevice/fan.ts.html +0 -766
- package/coverage/src/irdevice/index.html +0 -251
- package/coverage/src/irdevice/irdevice.ts.html +0 -1117
- package/coverage/src/irdevice/light.ts.html +0 -826
- package/coverage/src/irdevice/other.ts.html +0 -2458
- package/coverage/src/irdevice/tv.ts.html +0 -1222
- package/coverage/src/irdevice/vacuumcleaner.ts.html +0 -466
- package/coverage/src/irdevice/waterheater.ts.html +0 -469
- package/coverage/src/platform.ts.html +0 -8776
- package/coverage/src/settings.ts.html +0 -934
- package/coverage/src/utils.ts.html +0 -2092
- package/dist/baseMatterAccessory.test.d.ts +0 -2
- package/dist/baseMatterAccessory.test.d.ts.map +0 -1
- package/dist/baseMatterAccessory.test.js +0 -71
- package/dist/baseMatterAccessory.test.js.map +0 -1
- package/dist/devices-hap/airpurifier.d.ts +0 -54
- package/dist/devices-hap/airpurifier.d.ts.map +0 -1
- package/dist/devices-hap/airpurifier.js +0 -527
- package/dist/devices-hap/airpurifier.js.map +0 -1
- package/dist/devices-hap/blindtilt.d.ts +0 -90
- package/dist/devices-hap/blindtilt.d.ts.map +0 -1
- package/dist/devices-hap/blindtilt.js +0 -974
- package/dist/devices-hap/blindtilt.js.map +0 -1
- package/dist/devices-hap/bot.d.ts +0 -102
- package/dist/devices-hap/bot.d.ts.map +0 -1
- package/dist/devices-hap/bot.js +0 -811
- package/dist/devices-hap/bot.js.map +0 -1
- package/dist/devices-hap/ceilinglight.d.ts +0 -85
- package/dist/devices-hap/ceilinglight.d.ts.map +0 -1
- package/dist/devices-hap/ceilinglight.js +0 -701
- package/dist/devices-hap/ceilinglight.js.map +0 -1
- package/dist/devices-hap/colorbulb.d.ts +0 -88
- package/dist/devices-hap/colorbulb.d.ts.map +0 -1
- package/dist/devices-hap/colorbulb.js +0 -881
- package/dist/devices-hap/colorbulb.js.map +0 -1
- package/dist/devices-hap/contact.d.ts +0 -44
- package/dist/devices-hap/contact.d.ts.map +0 -1
- package/dist/devices-hap/contact.js +0 -409
- package/dist/devices-hap/contact.js.map +0 -1
- package/dist/devices-hap/curtain.d.ts +0 -73
- package/dist/devices-hap/curtain.d.ts.map +0 -1
- package/dist/devices-hap/curtain.js +0 -869
- package/dist/devices-hap/curtain.js.map +0 -1
- package/dist/devices-hap/device.d.ts +0 -98
- package/dist/devices-hap/device.d.ts.map +0 -1
- package/dist/devices-hap/device.js +0 -749
- package/dist/devices-hap/device.js.map +0 -1
- package/dist/devices-hap/fan.d.ts +0 -69
- package/dist/devices-hap/fan.d.ts.map +0 -1
- package/dist/devices-hap/fan.js +0 -649
- package/dist/devices-hap/fan.js.map +0 -1
- package/dist/devices-hap/hub.d.ts +0 -37
- package/dist/devices-hap/hub.d.ts.map +0 -1
- package/dist/devices-hap/hub.js +0 -392
- package/dist/devices-hap/hub.js.map +0 -1
- package/dist/devices-hap/humidifier.d.ts +0 -68
- package/dist/devices-hap/humidifier.d.ts.map +0 -1
- package/dist/devices-hap/humidifier.js +0 -628
- package/dist/devices-hap/humidifier.js.map +0 -1
- package/dist/devices-hap/iosensor.d.ts +0 -42
- package/dist/devices-hap/iosensor.d.ts.map +0 -1
- package/dist/devices-hap/iosensor.js +0 -382
- package/dist/devices-hap/iosensor.js.map +0 -1
- package/dist/devices-hap/lightstrip.d.ts +0 -79
- package/dist/devices-hap/lightstrip.d.ts.map +0 -1
- package/dist/devices-hap/lightstrip.js +0 -797
- package/dist/devices-hap/lightstrip.js.map +0 -1
- package/dist/devices-hap/lock.d.ts +0 -53
- package/dist/devices-hap/lock.d.ts.map +0 -1
- package/dist/devices-hap/lock.js +0 -561
- package/dist/devices-hap/lock.js.map +0 -1
- package/dist/devices-hap/meter.d.ts +0 -37
- package/dist/devices-hap/meter.d.ts.map +0 -1
- package/dist/devices-hap/meter.js +0 -379
- package/dist/devices-hap/meter.js.map +0 -1
- package/dist/devices-hap/meterplus.d.ts +0 -42
- package/dist/devices-hap/meterplus.d.ts.map +0 -1
- package/dist/devices-hap/meterplus.js +0 -384
- package/dist/devices-hap/meterplus.js.map +0 -1
- package/dist/devices-hap/meterpro.d.ts +0 -43
- package/dist/devices-hap/meterpro.d.ts.map +0 -1
- package/dist/devices-hap/meterpro.js +0 -468
- package/dist/devices-hap/meterpro.js.map +0 -1
- package/dist/devices-hap/motion.d.ts +0 -42
- package/dist/devices-hap/motion.d.ts.map +0 -1
- package/dist/devices-hap/motion.js +0 -345
- package/dist/devices-hap/motion.js.map +0 -1
- package/dist/devices-hap/plug.d.ts +0 -49
- package/dist/devices-hap/plug.d.ts.map +0 -1
- package/dist/devices-hap/plug.js +0 -395
- package/dist/devices-hap/plug.js.map +0 -1
- package/dist/devices-hap/relayswitch.d.ts +0 -96
- package/dist/devices-hap/relayswitch.d.ts.map +0 -1
- package/dist/devices-hap/relayswitch.js +0 -642
- package/dist/devices-hap/relayswitch.js.map +0 -1
- package/dist/devices-hap/robotvacuumcleaner.d.ts +0 -54
- package/dist/devices-hap/robotvacuumcleaner.d.ts.map +0 -1
- package/dist/devices-hap/robotvacuumcleaner.js +0 -523
- package/dist/devices-hap/robotvacuumcleaner.js.map +0 -1
- package/dist/devices-hap/waterdetector.d.ts +0 -41
- package/dist/devices-hap/waterdetector.d.ts.map +0 -1
- package/dist/devices-hap/waterdetector.js +0 -356
- package/dist/devices-hap/waterdetector.js.map +0 -1
- package/dist/devices-matter/BaseMatterAccessory.d.ts +0 -78
- package/dist/devices-matter/BaseMatterAccessory.d.ts.map +0 -1
- package/dist/devices-matter/BaseMatterAccessory.js +0 -220
- package/dist/devices-matter/BaseMatterAccessory.js.map +0 -1
- package/dist/devices-matter/ColorLightAccessory.d.ts +0 -20
- package/dist/devices-matter/ColorLightAccessory.d.ts.map +0 -1
- package/dist/devices-matter/ColorLightAccessory.js +0 -95
- package/dist/devices-matter/ColorLightAccessory.js.map +0 -1
- package/dist/devices-matter/ColorTemperatureLightAccessory.d.ts +0 -18
- package/dist/devices-matter/ColorTemperatureLightAccessory.d.ts.map +0 -1
- package/dist/devices-matter/ColorTemperatureLightAccessory.js +0 -76
- package/dist/devices-matter/ColorTemperatureLightAccessory.js.map +0 -1
- package/dist/devices-matter/ContactSensorAccessory.d.ts +0 -12
- package/dist/devices-matter/ContactSensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/ContactSensorAccessory.js +0 -34
- package/dist/devices-matter/ContactSensorAccessory.js.map +0 -1
- package/dist/devices-matter/DimmableLightAccessory.d.ts +0 -58
- package/dist/devices-matter/DimmableLightAccessory.d.ts.map +0 -1
- package/dist/devices-matter/DimmableLightAccessory.js +0 -167
- package/dist/devices-matter/DimmableLightAccessory.js.map +0 -1
- package/dist/devices-matter/DoorLockAccessory.d.ts +0 -14
- package/dist/devices-matter/DoorLockAccessory.d.ts.map +0 -1
- package/dist/devices-matter/DoorLockAccessory.js +0 -50
- package/dist/devices-matter/DoorLockAccessory.js.map +0 -1
- package/dist/devices-matter/ExtendedColorLightAccessory.d.ts +0 -21
- package/dist/devices-matter/ExtendedColorLightAccessory.d.ts.map +0 -1
- package/dist/devices-matter/ExtendedColorLightAccessory.js +0 -106
- package/dist/devices-matter/ExtendedColorLightAccessory.js.map +0 -1
- package/dist/devices-matter/FanAccessory.d.ts +0 -16
- package/dist/devices-matter/FanAccessory.d.ts.map +0 -1
- package/dist/devices-matter/FanAccessory.js +0 -81
- package/dist/devices-matter/FanAccessory.js.map +0 -1
- package/dist/devices-matter/HumiditySensorAccessory.d.ts +0 -12
- package/dist/devices-matter/HumiditySensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/HumiditySensorAccessory.js +0 -34
- package/dist/devices-matter/HumiditySensorAccessory.js.map +0 -1
- package/dist/devices-matter/LeakSensorAccessory.d.ts +0 -12
- package/dist/devices-matter/LeakSensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/LeakSensorAccessory.js +0 -33
- package/dist/devices-matter/LeakSensorAccessory.js.map +0 -1
- package/dist/devices-matter/LightSensorAccessory.d.ts +0 -12
- package/dist/devices-matter/LightSensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/LightSensorAccessory.js +0 -34
- package/dist/devices-matter/LightSensorAccessory.js.map +0 -1
- package/dist/devices-matter/OccupancySensorAccessory.d.ts +0 -12
- package/dist/devices-matter/OccupancySensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/OccupancySensorAccessory.js +0 -39
- package/dist/devices-matter/OccupancySensorAccessory.js.map +0 -1
- package/dist/devices-matter/OnOffLightAccessory.d.ts +0 -38
- package/dist/devices-matter/OnOffLightAccessory.d.ts.map +0 -1
- package/dist/devices-matter/OnOffLightAccessory.js +0 -110
- package/dist/devices-matter/OnOffLightAccessory.js.map +0 -1
- package/dist/devices-matter/OnOffOutletAccessory.d.ts +0 -14
- package/dist/devices-matter/OnOffOutletAccessory.d.ts.map +0 -1
- package/dist/devices-matter/OnOffOutletAccessory.js +0 -43
- package/dist/devices-matter/OnOffOutletAccessory.js.map +0 -1
- package/dist/devices-matter/OnOffSwitchAccessory.d.ts +0 -14
- package/dist/devices-matter/OnOffSwitchAccessory.d.ts.map +0 -1
- package/dist/devices-matter/OnOffSwitchAccessory.js +0 -42
- package/dist/devices-matter/OnOffSwitchAccessory.js.map +0 -1
- package/dist/devices-matter/RoboticVacuumAccessory.d.ts +0 -68
- package/dist/devices-matter/RoboticVacuumAccessory.d.ts.map +0 -1
- package/dist/devices-matter/RoboticVacuumAccessory.js +0 -334
- package/dist/devices-matter/RoboticVacuumAccessory.js.map +0 -1
- package/dist/devices-matter/SmokeCOAlarmAccessory.d.ts +0 -11
- package/dist/devices-matter/SmokeCOAlarmAccessory.d.ts.map +0 -1
- package/dist/devices-matter/SmokeCOAlarmAccessory.js +0 -49
- package/dist/devices-matter/SmokeCOAlarmAccessory.js.map +0 -1
- package/dist/devices-matter/TemperatureSensorAccessory.d.ts +0 -12
- package/dist/devices-matter/TemperatureSensorAccessory.d.ts.map +0 -1
- package/dist/devices-matter/TemperatureSensorAccessory.js +0 -36
- package/dist/devices-matter/TemperatureSensorAccessory.js.map +0 -1
- package/dist/devices-matter/ThermostatAccessory.d.ts +0 -19
- package/dist/devices-matter/ThermostatAccessory.d.ts.map +0 -1
- package/dist/devices-matter/ThermostatAccessory.js +0 -95
- package/dist/devices-matter/ThermostatAccessory.js.map +0 -1
- package/dist/devices-matter/VenetianBlindAccessory.d.ts +0 -19
- package/dist/devices-matter/VenetianBlindAccessory.d.ts.map +0 -1
- package/dist/devices-matter/VenetianBlindAccessory.js +0 -99
- package/dist/devices-matter/VenetianBlindAccessory.js.map +0 -1
- package/dist/devices-matter/WindowBlindAccessory.d.ts +0 -17
- package/dist/devices-matter/WindowBlindAccessory.d.ts.map +0 -1
- package/dist/devices-matter/WindowBlindAccessory.js +0 -80
- package/dist/devices-matter/WindowBlindAccessory.js.map +0 -1
- package/dist/devices-matter/custom/PowerStripAccessory.d.ts +0 -97
- package/dist/devices-matter/custom/PowerStripAccessory.d.ts.map +0 -1
- package/dist/devices-matter/custom/PowerStripAccessory.js +0 -265
- package/dist/devices-matter/custom/PowerStripAccessory.js.map +0 -1
- package/dist/devices-matter/custom/index.d.ts +0 -8
- package/dist/devices-matter/custom/index.d.ts.map +0 -1
- package/dist/devices-matter/custom/index.js +0 -8
- package/dist/devices-matter/custom/index.js.map +0 -1
- package/dist/devices-matter/index.d.ts +0 -29
- package/dist/devices-matter/index.d.ts.map +0 -1
- package/dist/devices-matter/index.js +0 -28
- package/dist/devices-matter/index.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -19
- package/dist/index.test.js.map +0 -1
- package/dist/irdevice/airconditioner.d.ts +0 -61
- package/dist/irdevice/airconditioner.d.ts.map +0 -1
- package/dist/irdevice/airconditioner.js +0 -472
- package/dist/irdevice/airconditioner.js.map +0 -1
- package/dist/irdevice/airpurifier.d.ts +0 -50
- package/dist/irdevice/airpurifier.d.ts.map +0 -1
- package/dist/irdevice/airpurifier.js +0 -213
- package/dist/irdevice/airpurifier.js.map +0 -1
- package/dist/irdevice/camera.d.ts +0 -32
- package/dist/irdevice/camera.d.ts.map +0 -1
- package/dist/irdevice/camera.js +0 -107
- package/dist/irdevice/camera.js.map +0 -1
- package/dist/irdevice/fan.d.ts +0 -36
- package/dist/irdevice/fan.d.ts.map +0 -1
- package/dist/irdevice/fan.js +0 -200
- package/dist/irdevice/fan.js.map +0 -1
- package/dist/irdevice/irdevice.d.ts +0 -68
- package/dist/irdevice/irdevice.d.ts.map +0 -1
- package/dist/irdevice/irdevice.js +0 -298
- package/dist/irdevice/irdevice.js.map +0 -1
- package/dist/irdevice/light.d.ts +0 -36
- package/dist/irdevice/light.d.ts.map +0 -1
- package/dist/irdevice/light.js +0 -206
- package/dist/irdevice/light.js.map +0 -1
- package/dist/irdevice/other.d.ts +0 -57
- package/dist/irdevice/other.d.ts.map +0 -1
- package/dist/irdevice/other.js +0 -778
- package/dist/irdevice/other.js.map +0 -1
- package/dist/irdevice/tv.d.ts +0 -45
- package/dist/irdevice/tv.d.ts.map +0 -1
- package/dist/irdevice/tv.js +0 -327
- package/dist/irdevice/tv.js.map +0 -1
- package/dist/irdevice/vacuumcleaner.d.ts +0 -28
- package/dist/irdevice/vacuumcleaner.d.ts.map +0 -1
- package/dist/irdevice/vacuumcleaner.js +0 -104
- package/dist/irdevice/vacuumcleaner.js.map +0 -1
- package/dist/irdevice/waterheater.d.ts +0 -30
- package/dist/irdevice/waterheater.d.ts.map +0 -1
- package/dist/irdevice/waterheater.js +0 -105
- package/dist/irdevice/waterheater.js.map +0 -1
- package/dist/platform-hap.d.ts +0 -149
- package/dist/platform-hap.d.ts.map +0 -1
- package/dist/platform-hap.js +0 -2861
- package/dist/platform-hap.js.map +0 -1
- package/dist/platform-matter.d.ts +0 -120
- package/dist/platform-matter.d.ts.map +0 -1
- package/dist/platform-matter.js +0 -999
- package/dist/platform-matter.js.map +0 -1
- package/dist/utils.test.d.ts +0 -2
- package/dist/utils.test.d.ts.map +0 -1
- package/dist/utils.test.js +0 -95
- package/dist/utils.test.js.map +0 -1
- package/dist/verifyconfig.test.d.ts +0 -2
- package/dist/verifyconfig.test.d.ts.map +0 -1
- package/dist/verifyconfig.test.js +0 -167
- package/dist/verifyconfig.test.js.map +0 -1
- package/src/baseMatterAccessory.test.ts +0 -88
- package/src/custom.d.ts +0 -7
- package/src/devices-hap/airpurifier.ts +0 -563
- package/src/devices-hap/blindtilt.ts +0 -1049
- package/src/devices-hap/bot.ts +0 -900
- package/src/devices-hap/ceilinglight.ts +0 -742
- package/src/devices-hap/colorbulb.ts +0 -904
- package/src/devices-hap/contact.ts +0 -457
- package/src/devices-hap/curtain.ts +0 -944
- package/src/devices-hap/device.ts +0 -811
- package/src/devices-hap/fan.ts +0 -711
- package/src/devices-hap/hub.ts +0 -439
- package/src/devices-hap/humidifier.ts +0 -669
- package/src/devices-hap/iosensor.ts +0 -427
- package/src/devices-hap/lightstrip.ts +0 -836
- package/src/devices-hap/lock.ts +0 -620
- package/src/devices-hap/meter.ts +0 -426
- package/src/devices-hap/meterplus.ts +0 -430
- package/src/devices-hap/meterpro.ts +0 -522
- package/src/devices-hap/motion.ts +0 -390
- package/src/devices-hap/plug.ts +0 -423
- package/src/devices-hap/relayswitch.ts +0 -727
- package/src/devices-hap/robotvacuumcleaner.ts +0 -568
- package/src/devices-hap/waterdetector.ts +0 -400
- package/src/devices-matter/BaseMatterAccessory.ts +0 -249
- package/src/devices-matter/ColorLightAccessory.ts +0 -110
- package/src/devices-matter/ColorTemperatureLightAccessory.ts +0 -90
- package/src/devices-matter/ContactSensorAccessory.ts +0 -41
- package/src/devices-matter/DimmableLightAccessory.ts +0 -192
- package/src/devices-matter/DoorLockAccessory.ts +0 -60
- package/src/devices-matter/ExtendedColorLightAccessory.ts +0 -122
- package/src/devices-matter/FanAccessory.ts +0 -95
- package/src/devices-matter/HumiditySensorAccessory.ts +0 -41
- package/src/devices-matter/LeakSensorAccessory.ts +0 -40
- package/src/devices-matter/LightSensorAccessory.ts +0 -41
- package/src/devices-matter/OccupancySensorAccessory.ts +0 -48
- package/src/devices-matter/OnOffLightAccessory.ts +0 -125
- package/src/devices-matter/OnOffOutletAccessory.ts +0 -51
- package/src/devices-matter/OnOffSwitchAccessory.ts +0 -51
- package/src/devices-matter/RoboticVacuumAccessory.ts +0 -407
- package/src/devices-matter/SmokeCOAlarmAccessory.ts +0 -59
- package/src/devices-matter/TemperatureSensorAccessory.ts +0 -43
- package/src/devices-matter/ThermostatAccessory.ts +0 -110
- package/src/devices-matter/VenetianBlindAccessory.ts +0 -115
- package/src/devices-matter/WindowBlindAccessory.ts +0 -92
- package/src/devices-matter/custom/PowerStripAccessory.ts +0 -309
- package/src/devices-matter/custom/index.ts +0 -8
- package/src/devices-matter/index.ts +0 -29
- package/src/index.test.ts +0 -24
- package/src/irdevice/airconditioner.ts +0 -533
- package/src/irdevice/airpurifier.ts +0 -252
- package/src/irdevice/camera.ts +0 -129
- package/src/irdevice/fan.ts +0 -226
- package/src/irdevice/irdevice.ts +0 -344
- package/src/irdevice/light.ts +0 -246
- package/src/irdevice/other.ts +0 -790
- package/src/irdevice/tv.ts +0 -378
- package/src/irdevice/vacuumcleaner.ts +0 -126
- package/src/irdevice/waterheater.ts +0 -127
- package/src/platform-hap.ts +0 -2997
- package/src/platform-matter.ts +0 -1124
- package/src/utils.test.ts +0 -96
- package/src/verifyconfig.test.ts +0 -197
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
# Batch Import & Discovery UI Enhancements ✅ COMPLETED
|
|
2
|
+
|
|
3
|
+
- [x] Add checkboxes to select multiple devices
|
|
4
|
+
- Users can now select multiple discovered devices using checkboxes in the discovery UI for batch actions.
|
|
5
|
+
- [x] Add "Add Selected to Config" button
|
|
6
|
+
- A prominent "Add Selected to Config" button enables batch import of all selected devices, streamlining onboarding.
|
|
7
|
+
- [x] Implement bulk configuration with smart defaults
|
|
8
|
+
- When importing multiple devices, the system applies smart defaults (type, name, MAC, etc.) and auto-fills config fields, reducing manual entry and errors.
|
|
9
|
+
- [x] Show firmware update available indicators
|
|
10
|
+
- Devices with available firmware updates display an orange "Update Available" badge in the discovery UI.
|
|
11
|
+
- [x] Show offline/unreachable warnings
|
|
12
|
+
- Devices that are offline or unreachable show a red "Offline" badge, based on status or last-seen timestamp.
|
|
13
|
+
- [x] Add "Needs Attention" section at top
|
|
14
|
+
- Devices needing action (low battery, firmware update, offline) are grouped in a "Needs Attention" section at the top of the discovery UI for quick access.
|
|
15
|
+
|
|
16
|
+
**Status:** All batch import and discovery UI features are implemented and live. Only battery level trending (historical data) remains as a future enhancement.
|
|
17
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
18
|
+
|
|
19
|
+
### Duplicate Detection ✅ COMPLETED
|
|
20
|
+
|
|
21
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries. Badges for recommended connection (BLE/API) are also shown based on signal/device type.
|
|
22
|
+
|
|
23
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice. Connection recommendation badges are also displayed.
|
|
24
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
25
|
+
|
|
26
|
+
### One-Click Device Import ✅ COMPLETED
|
|
27
|
+
|
|
28
|
+
- [x] Add "Add to Config" button next to each discovered device. Dramatically speeds up onboarding, reduces manual steps for users.
|
|
29
|
+
|
|
30
|
+
**Status:** Each discovered device in the UI now has an "Add to Config" button. This enables one-click import directly from the discovery list.
|
|
31
|
+
|
|
32
|
+
### Auto-populate Device Config Modal ✅ COMPLETED
|
|
33
|
+
|
|
34
|
+
- [x] When importing, the config modal is auto-filled with discovered values (name, type, MAC, etc). Reduces user error and makes adding devices nearly frictionless.
|
|
35
|
+
|
|
36
|
+
**Status:** The import modal pre-fills all relevant fields with discovered device data, streamlining the import process.
|
|
37
|
+
|
|
38
|
+
### Pre-fill MAC Address for BLE Devices ✅ COMPLETED
|
|
39
|
+
|
|
40
|
+
- [x] The import modal auto-fills the MAC address field with the discovered device's address, ensuring BLE devices are always added with the correct MAC.
|
|
41
|
+
|
|
42
|
+
**Status:** The MAC address is pre-filled in the config modal for BLE devices, preventing user error and connection issues.
|
|
43
|
+
|
|
44
|
+
### Duplicate Detection ✅ COMPLETED
|
|
45
|
+
|
|
46
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries.
|
|
47
|
+
|
|
48
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice.
|
|
49
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
50
|
+
|
|
51
|
+
### Duplicate Detection ✅ COMPLETED
|
|
52
|
+
|
|
53
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries.
|
|
54
|
+
|
|
55
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice.
|
|
56
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
57
|
+
|
|
58
|
+
### Pre-fill MAC Address for BLE Devices ✅ COMPLETED
|
|
59
|
+
|
|
60
|
+
- [x] The import modal auto-fills the MAC address field with the discovered device's address, ensuring BLE devices are always added with the correct MAC.
|
|
61
|
+
|
|
62
|
+
**Status:** The MAC address is pre-filled in the config modal for BLE devices, preventing user error and connection issues.
|
|
63
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
64
|
+
|
|
65
|
+
### One-Click Device Import ✅ COMPLETED
|
|
66
|
+
|
|
67
|
+
- [x] Add "Add to Config" button next to each discovered device. Dramatically speeds up onboarding, reduces manual steps for users.
|
|
68
|
+
|
|
69
|
+
**Status:** Each discovered device in the UI now has an "Add to Config" button. This enables one-click import directly from the discovery list.
|
|
70
|
+
|
|
71
|
+
### Auto-populate Device Config Modal ✅ COMPLETED
|
|
72
|
+
|
|
73
|
+
- [x] When importing, the config modal is auto-filled with discovered values (name, type, MAC, etc). Reduces user error and makes adding devices nearly frictionless.
|
|
74
|
+
|
|
75
|
+
**Status:** The import modal pre-fills all relevant fields with discovered device data, streamlining the import process.
|
|
76
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
77
|
+
- [x] Update device registry and class mapping to match node-switchbot
|
|
78
|
+
- [x] Add notification handling for BLE devices (per-command notification futures, unsolicited notification logging)
|
|
79
|
+
|
|
80
|
+
- [x] Map new device types to Homebridge plugin (HubMini Matter, Hub3, Keypad Vision/Pro, Plug Mini EU, Roller Shade, Garage Door Opener, Floor Lamp, Art Frame, RGBICWW variants, K10/K11/K20/S10/S20 vacuums, Lock Lite/Vision/Pro/WiFi, Circulator Fan, Smart Thermostat Radiator, Climate Panel, Evaporative Humidifier, Strip Light 3, etc.)
|
|
81
|
+
- [x] Expose new device features in UI (air quality, preset modes, calibration, direction, multi-command, extended info, segmented control, etc.)
|
|
82
|
+
- [x] Integrate BLE encryption for all supported devices (relay, lock, air purifier, light strip, bulb, etc.)
|
|
83
|
+
# BLE Response Length Validation ✅ COMPLETED
|
|
84
|
+
|
|
85
|
+
- [x] Implement response length validation for BLE status parsing
|
|
86
|
+
|
|
87
|
+
**Status:** All BLE status parsing now validates the response buffer/array length before parsing. Invalid responses are logged and rejected, improving robustness and diagnostics for all BLE devices.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
# Error Class Handling Integration ✅ COMPLETED
|
|
91
|
+
|
|
92
|
+
- [x] Add support for new error classes and improved error handling (SwitchbotOperationError, SwitchbotAuthenticationError, CharacteristicMissingError)
|
|
93
|
+
|
|
94
|
+
**Status:** The plugin now imports and uses node-switchbot v4 error classes, with robust instanceof-based handling and compatible fallbacks. All error types are logged and surfaced appropriately, and the code is ready for future node-switchbot error model changes.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
### Batch Enable/Disable Devices ✅ COMPLETED
|
|
98
|
+
|
|
99
|
+
- [x] Allow batch enable/disable of devices
|
|
100
|
+
|
|
101
|
+
**Status:** The UI now provides 'Enable Selected' and 'Disable Selected' buttons, allowing users to batch enable or disable devices directly from the discovery view.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Batch Operation Progress Indicator ✅ COMPLETED
|
|
106
|
+
|
|
107
|
+
- [x] Show progress for batch operations
|
|
108
|
+
|
|
109
|
+
**Status:** The UI now displays a progress indicator during batch add/configure operations, giving users real-time feedback on operation status and completion.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Real-Time RSSI Updates During Scan ✅ COMPLETED
|
|
114
|
+
|
|
115
|
+
- [x] Update RSSI values in real-time during scan
|
|
116
|
+
|
|
117
|
+
**Status:** The UI now polls for BLE scan results and updates device RSSI values live during the scan window, providing real-time signal strength feedback.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### Needs Attention Section in Discovery UI ✅ COMPLETED
|
|
122
|
+
|
|
123
|
+
- [x] Add 'Needs Attention' section at the top of the device discovery UI
|
|
124
|
+
|
|
125
|
+
**Status:** Devices with low battery (<20%), firmware updates available, or offline/unreachable status are now aggregated and displayed in a prominent 'Needs Attention' section at the top of the discovery UI. This helps users quickly identify and address devices that require action.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
# Completed TODOs
|
|
130
|
+
|
|
131
|
+
### Firmware Update Available Indicator ✅ COMPLETED
|
|
132
|
+
|
|
133
|
+
### Offline/Unreachable Warning Indicator ✅ COMPLETED
|
|
134
|
+
|
|
135
|
+
- [x] Show offline/unreachable warnings
|
|
136
|
+
|
|
137
|
+
**Status:** Devices that are offline or unreachable (either via a boolean property or if last seen > 1 hour ago) now display a red 'Offline' badge in the discovery UI next to the device name.
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
- [x] Show firmware update available indicators
|
|
141
|
+
|
|
142
|
+
**Status:** Devices with a firmware update available now display an orange 'Update Available' badge in the discovery UI next to the device name.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
This file tracks all completed features and improvements for the SwitchBot Homebridge Plugin.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Recent Completed Work
|
|
150
|
+
|
|
151
|
+
### Connection Testing (First Slice) ✅ COMPLETED
|
|
152
|
+
|
|
153
|
+
- [x] Added "Test Connection" button per device (discovered and configured cards)
|
|
154
|
+
- [x] Added backend connectivity check endpoint (`/test-connection`)
|
|
155
|
+
- [x] Attempted basic status read via device fetch during test
|
|
156
|
+
- [x] Added success/failure indicator with inline result details
|
|
157
|
+
- [x] Displayed measured connection latency (ms)
|
|
158
|
+
- [x] Displayed connection method result (BLE/OpenAPI/Auto)
|
|
159
|
+
|
|
160
|
+
**Status:** Users can now run per-device connection checks directly from the UI and immediately see method and latency results.
|
|
161
|
+
|
|
162
|
+
### Matter Neon Wire Rope Light Registration Verification ✅ COMPLETED
|
|
163
|
+
|
|
164
|
+
- [x] **Verify Matter registration for "Family Room Neon Wire Rope Light" succeeds without behavior rollback**
|
|
165
|
+
- [x] Added targeted Matter integration regression test for `RGBIC Neon Wire Rope Light`
|
|
166
|
+
- [x] Verified normalization to Matter type `lightstrip`
|
|
167
|
+
- [x] Verified `colorControl.colorMode` default is present (`0`) to satisfy conformance
|
|
168
|
+
- [x] Validated registration path end-to-end with Matter harness
|
|
169
|
+
|
|
170
|
+
**Status:** Neon Wire Rope Light registration now has regression coverage and registers with conformant ColorControl defaults.
|
|
171
|
+
|
|
172
|
+
### Matter Lightstrip Conformance ✅ COMPLETED
|
|
173
|
+
|
|
174
|
+
- [x] **Fix Matter lightstrip registration conformance requiring `colorControl.colorMode`**
|
|
175
|
+
- [x] **Issue:** Matter accessory initialization failed for color lightstrip devices with conformance errors
|
|
176
|
+
- [x] **Error:** `Conformance "M": Matter requires you to set this attribute ... colorControl.state.colorMode`
|
|
177
|
+
- [x] **Fix:** Added required `colorMode` default for lightstrip color control state while avoiding disallowed default writes
|
|
178
|
+
|
|
179
|
+
**Status:** Lightstrip accessories now provide required ColorControl state for Matter initialization.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Battery Warnings in Device List ✅ COMPLETED
|
|
183
|
+
|
|
184
|
+
- [x] Show battery warnings (< 20%) with yellow/red indicators
|
|
185
|
+
|
|
186
|
+
**Status:** Devices with battery below 20% now display a yellow (10–19%) or red (<10%) warning badge in the discovery UI, with a tooltip for low/critical battery.
|
|
187
|
+
|
|
188
|
+
### Streaming BLE Device Discovery ✅ COMPLETED
|
|
189
|
+
|
|
190
|
+
- [x] Show devices as they're discovered (streaming results via polling)
|
|
191
|
+
|
|
192
|
+
**Status:** Devices now appear in the UI as soon as they're discovered during BLE scan, providing a real-time streaming experience.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### Discovery Better Loading States ✅ COMPLETED
|
|
197
|
+
|
|
198
|
+
- [x] Show progress indicator phases: `Scanning BLE` → `Fetching OpenAPI` → `Complete`
|
|
199
|
+
- [x] Added spinner/progress visuals for each phase
|
|
200
|
+
- [x] Display partial discovery results while later phases continue
|
|
201
|
+
- [x] Show elapsed time for current phase and total discovery time
|
|
202
|
+
- [x] Added cancel button for long discovery runs
|
|
203
|
+
|
|
204
|
+
**Status:** Discovery UX now provides real-time progress and immediate partial feedback.
|
|
205
|
+
|
|
206
|
+
### Discovery Device Grouping ✅ COMPLETED
|
|
207
|
+
|
|
208
|
+
- [x] Implemented grouping by connection type
|
|
209
|
+
- [x] Implemented grouping by hub
|
|
210
|
+
- [x] Added expandable/collapsible group headers
|
|
211
|
+
- [x] Added group counts in headers
|
|
212
|
+
- [x] Persisted expanded/collapsed state in localStorage
|
|
213
|
+
|
|
214
|
+
**Status:** Discovery lists are grouped, collapsible, and stateful across sessions.
|
|
215
|
+
|
|
216
|
+
### Discovery Connection Recommendations ✅ COMPLETED
|
|
217
|
+
|
|
218
|
+
- [x] Added `⚡ Recommended: BLE` badge for strong RSSI devices
|
|
219
|
+
- [x] Added `☁️ Recommended: API` badge for hub-dependent devices
|
|
220
|
+
- [x] Added recommendation tooltips explaining reasoning
|
|
221
|
+
- [x] Applied device-type-aware recommendation heuristics
|
|
222
|
+
|
|
223
|
+
**Status:** Discovery cards now provide actionable connection guidance.
|
|
224
|
+
|
|
225
|
+
### Configurable BLE Scan ✅ COMPLETED
|
|
226
|
+
|
|
227
|
+
- [x] Added scan duration settings (3s/5s/10s/15s)
|
|
228
|
+
- [x] Added option to disable BLE scanning
|
|
229
|
+
- [x] Added adjustable BLE timeout setting
|
|
230
|
+
- [x] Persisted BLE scan preferences in localStorage
|
|
231
|
+
- [x] Added Bluetooth availability status indicator
|
|
232
|
+
|
|
233
|
+
**Status:** BLE discovery behavior is user-configurable and persisted.
|
|
234
|
+
|
|
235
|
+
### Discovery History/Cache ✅ COMPLETED
|
|
236
|
+
|
|
237
|
+
- [x] Cache last discovery results for 5 minutes
|
|
238
|
+
- [x] Show "Last scanned: X minutes ago" with timestamp
|
|
239
|
+
- [x] Add "Refresh" button to re-scan
|
|
240
|
+
- [x] Show cached results immediately on page load
|
|
241
|
+
- [x] Auto-refresh option with configurable interval
|
|
242
|
+
|
|
243
|
+
**Status:** Discovery now restores recent results instantly and supports manual/automatic refresh.
|
|
244
|
+
|
|
245
|
+
### Discovery UX Polish ✅ COMPLETED
|
|
246
|
+
|
|
247
|
+
- [x] Added `Hide Added` discovery filter to exclude already-configured devices
|
|
248
|
+
- [x] Improved BLE settings row alignment (`Scan`, `Timeout`, and units)
|
|
249
|
+
- [x] Reduced extra spacing between BLE settings row and Bluetooth adapter status
|
|
250
|
+
- [x] Hide `Scan` and `Timeout` controls when `Disable BLE scan` is enabled
|
|
251
|
+
|
|
252
|
+
**Status:** Discovery controls are cleaner and faster to use for repeat configuration workflows.
|
|
253
|
+
|
|
254
|
+
### Detailed Device Info Panel ✅ COMPLETED
|
|
255
|
+
|
|
256
|
+
- [x] Added click-to-expand toggle button (▾) to device cards with rotation animation
|
|
257
|
+
- [x] Created expandable details panel showing extended device information:
|
|
258
|
+
- [x] Device ID with copy button
|
|
259
|
+
- [x] MAC Address with copy button
|
|
260
|
+
- [x] Device Type
|
|
261
|
+
- [x] Model
|
|
262
|
+
- [x] Hub ID (if applicable)
|
|
263
|
+
- [x] Battery level (if available)
|
|
264
|
+
- [x] Firmware version (if available)
|
|
265
|
+
- [x] Cloud Service status (enabled/disabled)
|
|
266
|
+
- [x] Last Seen timestamp (human-readable format)
|
|
267
|
+
- [x] Implemented copy-to-clipboard functionality with visual feedback (📋 → ✓ for 2s)
|
|
268
|
+
- [x] Styled details panel with SwitchBot theme (light gray background, compact rows)
|
|
269
|
+
- [x] Persisted expand/collapse state in-session (resets on page reload)
|
|
270
|
+
|
|
271
|
+
**Status:** Device cards now provide quick access to extended metadata with one-click copying of ID and MAC. Details panel uses clean, readable table layout within the card.
|
|
272
|
+
|
|
273
|
+
### Extended Details in Configured Devices ✅ COMPLETED
|
|
274
|
+
|
|
275
|
+
- [x] Added expandable toggle (▾) to configured device cards in config section
|
|
276
|
+
- [x] Details panel shows same extended information as discovered devices:
|
|
277
|
+
- [x] Device ID with copy button
|
|
278
|
+
- [x] MAC Address with copy button
|
|
279
|
+
- [x] Device Type
|
|
280
|
+
- [x] Model
|
|
281
|
+
- [x] Hub ID (if applicable)
|
|
282
|
+
- [x] Battery level (if available)
|
|
283
|
+
- [x] Firmware version (if available)
|
|
284
|
+
- [x] Cloud Service status
|
|
285
|
+
- [x] Last Seen timestamp
|
|
286
|
+
- [x] Toggle button rotates when expanded/collapsed (smooth animation)
|
|
287
|
+
- [x] Details available directly from card without opening Edit modal
|
|
288
|
+
|
|
289
|
+
**Status:** Configured devices now have the same quick-access details panel as discovered devices, making it easy to view metadata without opening the Edit dialog.
|
|
290
|
+
|
|
291
|
+
### Real-Time BLE Scanning (Partial) ✅ PARTIALLY COMPLETED
|
|
292
|
+
|
|
293
|
+
- [x] Added animated "pulsing" indicator during active BLE scan using CSS animation
|
|
294
|
+
- [x] Implemented "X devices found..." counter that displays during scan
|
|
295
|
+
- Shows BLE device count after BLE phase completes
|
|
296
|
+
- Updates to merged count when OpenAPI phase completes
|
|
297
|
+
- Auto-hides when discovery finishes
|
|
298
|
+
- [x] Counter shows pulse animation (1.5s opacity fade cycle) while scanning
|
|
299
|
+
- [x] Gracefully removes pulse animation and hides counter on cancellation/error
|
|
300
|
+
- [ ] Real-time streaming results via polling (partial implementation - displays final count per phase)
|
|
301
|
+
- [ ] Real-time RSSI updates during scan (requires server-side streaming support)
|
|
302
|
+
|
|
303
|
+
**Status:** Discovery now shows visual feedback with a pulsing "X devices found" counter. Full streaming of individual results per-device would require backend support for Server-Sent Events (SSE) or WebSocket streaming. Current implementation displays phase-wise device counts (BLE count → merged final count).
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Code Refactoring & Architecture
|
|
308
|
+
|
|
309
|
+
### Server-Side Refactoring ✅ COMPLETED
|
|
310
|
+
|
|
311
|
+
- [x] **Split `server.ts` into modular structure**
|
|
312
|
+
- [x] Created `src/homebridge-ui/endpoints/discovery.ts` - Discovery endpoint
|
|
313
|
+
- [x] Created `src/homebridge-ui/endpoints/config.ts` - Config management endpoint
|
|
314
|
+
- [x] Created `src/homebridge-ui/endpoints/devices.ts` - Device CRUD operations
|
|
315
|
+
- [x] Created `src/homebridge-ui/endpoints/credentials.ts` - Credentials endpoint
|
|
316
|
+
- [x] Created `src/homebridge-ui/utils/config-parser.ts` - Config parsing helpers
|
|
317
|
+
- [x] Created `src/homebridge-ui/utils/logger.ts` - Logging utility
|
|
318
|
+
- [x] Updated `src/homebridge-ui/server.ts` - Main entry point (imports and registers endpoints)
|
|
319
|
+
|
|
320
|
+
**Status:** Server endpoints are fully modularized and organized by concern.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Bug Fixes
|
|
325
|
+
|
|
326
|
+
### Matter Window Covering Conformance ✅ COMPLETED
|
|
327
|
+
|
|
328
|
+
- [x] **Fix Matter window covering Drapery enum validation error**
|
|
329
|
+
- [x] **Issue:** Matter accessory registration failed for Curtain devices
|
|
330
|
+
- [x] **Error:** `Conformance "LF & !TL": Matter does not allow enum value Drapery (ID 4) here`
|
|
331
|
+
- [x] **Related Runtime Failure:** `[Matter/Server] Failed to register Matter accessory ... [endpoint-behaviors] Behaviors have errors` with rollback from Matter transaction initialization
|
|
332
|
+
- [x] **Root Cause:** `windowCovering.type` used `Drapery` for lift-only curtain mappings
|
|
333
|
+
- [x] **Fix:** Updated curtain Matter default to a compliant lift-only covering enum and added regression coverage
|
|
334
|
+
|
|
335
|
+
**Status:** Curtain-type Matter accessories now register without the Drapery conformance failure.
|
|
336
|
+
|
|
337
|
+
### Invalid Device Type Validation ✅ COMPLETED
|
|
338
|
+
|
|
339
|
+
- [x] **Fix invalid device type in config schema validation**
|
|
340
|
+
- [x] **Issue:** Config validation rejects devices with invalid `configDeviceType` values (e.g., "Lock Vision Pro" is not in valid enum)
|
|
341
|
+
- [x] **Error:** "Value is not accepted. Valid values: ..." error shown in Homebridge UI
|
|
342
|
+
- [x] **Root Cause:** Device types in existing configs may not match current DEVICE_TYPES enum (legacy names, typos, or renamed devices)
|
|
343
|
+
- [x] **Affected Devices:** Any device with `configDeviceType` not matching DEVICE_TYPES enum
|
|
344
|
+
- [x] **Solution:** Implemented device type validation migration and auto-correction
|
|
345
|
+
|
|
346
|
+
**Implementation:**
|
|
347
|
+
- Added `normalizeDeviceType()` — Validates and maps invalid types to valid equivalents
|
|
348
|
+
- Added `isValidDeviceType()` — Checks if device type is in DEVICE_TYPES enum
|
|
349
|
+
- Added `getValidDeviceTypes()` — Returns set of all valid device types
|
|
350
|
+
- Created `src/homebridge-ui/utils/device-migration.ts` — Migration utilities for batch validation
|
|
351
|
+
- Updated `src/homebridge-ui/endpoints/config.ts` — Device loading now validates types and warns about invalid ones
|
|
352
|
+
- Added migration mapping: `"Lock Vision Pro"` → `"Keypad Vision Pro"` (and others)
|
|
353
|
+
- Config endpoint returns `validationWarnings` with invalid device types and suggestions
|
|
354
|
+
|
|
355
|
+
**Status:** Device type validation is now automatic. Invalid types are detected and suggestions provided to users. Auto-correction mappings handle legacy/typo device names.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### Client-Side Refactoring
|
|
360
|
+
|
|
361
|
+
#### Phase 1: Quick Wins
|
|
362
|
+
|
|
363
|
+
##### Extract DEVICE_TYPES constant ✅ COMPLETED
|
|
364
|
+
|
|
365
|
+
- [x] Created `src/device-types.ts` as single source of truth
|
|
366
|
+
- [x] Updated `src/homebridge-ui/public/js/constants.ts` to import from shared source
|
|
367
|
+
- [x] Added `DEVICE_TYPE_NORMALIZATION_MAP` for plugin type lookups
|
|
368
|
+
- [x] Updated `src/deviceFactory.ts` to use normalized type mappings
|
|
369
|
+
- [x] Created `scripts/sync-device-types.mjs` to auto-sync config.schema.json
|
|
370
|
+
- [x] Integrated sync into build process (runs before tsc)
|
|
371
|
+
|
|
372
|
+
**Status:** Device types now single-sourced with auto-sync. Config schema, UI dropdown, and plugin type handling all stay aligned automatically.
|
|
373
|
+
|
|
374
|
+
##### Extract CSS styles ✅ COMPLETED
|
|
375
|
+
|
|
376
|
+

|
|
377
|
+
|
|
378
|
+
- [x] Created `src/homebridge-ui/public/css/styles.css`
|
|
379
|
+
- [x] Moved all inline styles from `src/homebridge-ui/public/index.html` (2.3kb)
|
|
380
|
+
- [x] Updated HTML to `<link rel="stylesheet" href="css/styles.css">`
|
|
381
|
+
- [x] Verified build copies CSS to dist/
|
|
382
|
+
- [x] Tested in browser to confirm styles still work
|
|
383
|
+
- [x] Added SwitchBot red color variables and theme
|
|
384
|
+
- [x] Enhanced modal styling with red accent borders
|
|
385
|
+
- [x] Improved button styling with hover animations
|
|
386
|
+
|
|
387
|
+
**Status:** CSS now externalized and properly linked. Build copies files correctly to dist/. Modal uses SwitchBot red theme with Homebridge-like appearance.
|
|
388
|
+
|
|
389
|
+
#### Phase 2: JavaScript Modularization ✅ COMPLETED
|
|
390
|
+
|
|
391
|
+
- [x] Created `src/homebridge-ui/public/js/api.ts` - API client functions
|
|
392
|
+
- [x] Created `src/homebridge-ui/public/js/discovery.ts` - Discovery UI rendering
|
|
393
|
+
- [x] Created `src/homebridge-ui/public/js/modals.ts` - Modal management
|
|
394
|
+
- [x] Created `src/homebridge-ui/public/js/credentials.ts` - Credentials UI
|
|
395
|
+
- [x] Created `src/homebridge-ui/public/js/toast.ts` & `modal.ts` - UI helpers
|
|
396
|
+
- [x] Created `src/homebridge-ui/public/js/app.ts` - Main app init
|
|
397
|
+
- [x] Updated `src/homebridge-ui/public/index.html` to use bundled app.js
|
|
398
|
+
|
|
399
|
+
**Status:** UI is modularized in TypeScript. Build bundles into app.js (47.0kb). Direct TypeScript imports provide type safety.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Discovery System Enhancements
|
|
404
|
+
|
|
405
|
+
### Signal Strength Visualization ✅ COMPLETED
|
|
406
|
+
|
|
407
|
+

|
|
408
|
+
|
|
409
|
+
- [x] Implement RSSI color-coding system:
|
|
410
|
+
- [x] Green: > -60 dBm (excellent)
|
|
411
|
+
- [x] Yellow: -60 to -75 dBm (good)
|
|
412
|
+
- [x] Orange: -75 to -85 dBm (fair)
|
|
413
|
+
- [x] Red: < -85 dBm (poor/unreliable)
|
|
414
|
+
- [x] Add signal strength bars visual indicator (4-bar system)
|
|
415
|
+
- [x] Add tooltip explaining signal quality
|
|
416
|
+
|
|
417
|
+
**Implementation:**
|
|
418
|
+
- Added `getRssiSignalQuality()` — Determines RSSI level, color, description, and bar count
|
|
419
|
+
- Added `renderSignalBars()` — Visual 4-bar indicator (filled based on signal strength)
|
|
420
|
+
- Added `renderSignalQualityBadge()` — Color-coded badge showing quality level (Excellent/Good/Fair/Poor)
|
|
421
|
+
- Updated `renderDiscoveredDevices()` — Displays bars and badges next to device names for BLE/wireless devices
|
|
422
|
+
- Tooltips show detailed signal info on hover
|
|
423
|
+
|
|
424
|
+
**Status:** Signal visualization now displays for all discovered devices with RSSI data. Color-coded bars and badges provide instant visual feedback about connection quality.
|
|
425
|
+
|
|
426
|
+
### Filtering & Sorting ✅ COMPLETED
|
|
427
|
+
|
|
428
|
+

|
|
429
|
+
|
|
430
|
+
- [x] Add filter buttons: "All | BLE Only | API Only | Both | IR Devices"
|
|
431
|
+
- [x] Add sort dropdown: "Signal Strength | Name | Type | Connection"
|
|
432
|
+
- [x] Add search box to filter by name/ID/type (real-time filtering)
|
|
433
|
+
- [x] Persist filter/sort preferences in localStorage
|
|
434
|
+
|
|
435
|
+
**Implementation:**
|
|
436
|
+
- Added `filterDevices()` — Filters by connection type (BLE/API/Both/IR) and search query (matches name/id/type/model)
|
|
437
|
+
- Added `sortDevices()` — Sorts by name (alphabetical), signal strength (RSSI descending), device type, or connection type
|
|
438
|
+
- Added `getDiscoveryPreferences()` & `setDiscoveryPreferences()` — Persist user preferences in localStorage
|
|
439
|
+
- Updated `discovery.ts` — Creates filter buttons, sort dropdown, and search input dynamically
|
|
440
|
+
- All filtering/sorting is client-side (instant, no API calls)
|
|
441
|
+
- Search is debounced (300ms) for smooth typing
|
|
442
|
+
- Filter buttons highlight active selection
|
|
443
|
+
- Status shows "Showing X of Y device(s)" when filtered
|
|
444
|
+
|
|
445
|
+
**Status:** Full filtering and sorting implemented with localStorage persistence. Discovery page now shows:
|
|
446
|
+
- Filter bar with 5 buttons (All/BLE/API/Both/IR)
|
|
447
|
+
- Sort dropdown with 4 options (Name/Signal Strength/Type/Connection)
|
|
448
|
+
- Real-time search box
|
|
449
|
+
- All preferences saved and restored on next discovery
|
|
450
|
+
|
|
451
|
+
### One-Click Device Import ✅ COMPLETED
|
|
452
|
+
|
|
453
|
+
- [x] Added "Add to Config" button for each discovered device
|
|
454
|
+
- [x] Added auto-populated import modal with discovered name/type defaults
|
|
455
|
+
- [x] Added BLE MAC pre-fill in import flow and persistence to config on single add
|
|
456
|
+
- [x] Added confirmation toast/status messaging on successful import
|
|
457
|
+
|
|
458
|
+
**Implementation:**
|
|
459
|
+
- Updated discovery row action in `render.ts` to use explicit "Add to Config" CTA
|
|
460
|
+
- Added `importDiscoveredDevice()` modal in `modals.ts` for prefilled import settings
|
|
461
|
+
- Extended single-add client payload in `api.ts` to include optional `address`, `model`, and `rssi`
|
|
462
|
+
- Extended `/add-device` endpoint in `devices.ts` to persist discovered metadata (MAC/model/RSSI)
|
|
463
|
+
|
|
464
|
+
**Status:** One-click import now supports prefilled configuration and BLE MAC carry-through for direct connection setup.
|
|
465
|
+
|
|
466
|
+
### Duplicate Detection ✅ COMPLETED
|
|
467
|
+
|
|
468
|
+
- [x] Check if discovered device ID already exists in config
|
|
469
|
+
- [x] Show badge: "✓ Already Added" (green) or "➕ New Device" (blue)
|
|
470
|
+
- [x] Disable/hide "Add" button for already-added devices
|
|
471
|
+
- [x] Add "View in Config" link for existing devices
|
|
472
|
+
|
|
473
|
+
**Implementation:**
|
|
474
|
+
- Discovery view now fetches configured device IDs and tags discovered rows as existing/new
|
|
475
|
+
- Existing devices show `Already Added` state with disabled add action
|
|
476
|
+
- Existing devices include a `View in Config` action that scrolls and highlights the configured entry
|
|
477
|
+
|
|
478
|
+
**Status:** Duplicate devices are clearly identified at discovery time, preventing accidental re-adds and improving navigation to existing config entries.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## Bug Fixes & Technical Debt
|
|
483
|
+
|
|
484
|
+
### Fix Discovery Not Showing Devices ✅ COMPLETED
|
|
485
|
+
|
|
486
|
+
- [x] **Issue:** No devices appear in discovery results after clicking "Discover Devices"
|
|
487
|
+
- [x] **Root Cause:** Discovery UI cleared the `#discoveredList` div (including the `<ul id="discoveredDevices">` element), but then tried to replace a non-existent element when rendering discovered devices
|
|
488
|
+
- [x] **Effect:** `document.getElementById('discoveredDevices')?.replaceWith(ul)` silently failed due to optional chaining, leaving the list empty
|
|
489
|
+
|
|
490
|
+
**Implementation:**
|
|
491
|
+
- Modified `discoverDevices()` in `discovery.ts` to create a new `<ul id="discoveredDevices">` container if it doesn't exist after clearing controls
|
|
492
|
+
- Updated `updateDiscoveryView()` to check if the element exists before using `replaceWith()`, with fallback to append if element is missing
|
|
493
|
+
- Added proper element lifecycle management for discovery list rendering
|
|
494
|
+
|
|
495
|
+
**Status:** Discovery now properly displays all discovered devices. Devices appear correctly with filters, sorting, and duplicate detection badges.
|
|
496
|
+
|
|
497
|
+
### Fix lint & lint:fix scripts ✅ COMPLETED
|
|
498
|
+
|
|
499
|
+
- [x] Update ESLint configuration to include `src/homebridge-ui/**/*.ts` files
|
|
500
|
+
- [x] Add HTML linting for `src/homebridge-ui/**/*.html` files
|
|
501
|
+
- [x] Installed `eslint-plugin-html` for inline JavaScript in HTML
|
|
502
|
+
- [x] Update `npm run lint` script to lint both plugin and UI code
|
|
503
|
+
- [x] Update `npm run lint:fix` script to auto-fix both plugin and UI code
|
|
504
|
+
- [x] Fixed existing ESLint errors (regex patterns, multi-statement lines)
|
|
505
|
+
- [x] Lint now passes successfully
|
|
506
|
+
- [x] Test that `npm run lint` runs successfully without errors
|
|
507
|
+
|
|
508
|
+
**Changes Made:**
|
|
509
|
+
- Installed `eslint-plugin-html` package
|
|
510
|
+
- Updated `eslint.config.js` to import and configure HTML plugin
|
|
511
|
+
- Added `html: true` to formatters in ESLint config
|
|
512
|
+
- Updated package.json scripts: `lint` and `lint:fix` now include `src/homebridge-ui/**/*.html`
|
|
513
|
+
- Moved regex patterns to module scope in `server.ts` and `genericDevice.ts`
|
|
514
|
+
- Split multi-statement lines to comply with `style/max-statements-per-line` rule
|
|
515
|
+
- All lint errors fixed - `npm run lint` passes with 0 errors
|
|
516
|
+
|
|
517
|
+
### Fix TypeScript compilation errors in discovery endpoint ✅ COMPLETED
|
|
518
|
+
|
|
519
|
+
- [x] Fixed: Changed `discover({ duration: 5000 })` to `discover({ timeout: 5000 })`
|
|
520
|
+
- [x] Fixed: Changed `switchbot.getDevices()` to use `switchbot.getAPIClient()?.getDevices()`
|
|
521
|
+
- [x] Reviewed node-switchbot v4.0.0-beta.3 API documentation and type definitions
|
|
522
|
+
- [x] Updated discovery implementation to use correct API types (APIDevice, APIInfraredRemote)
|
|
523
|
+
- [x] Fixed property names: `deviceId`, `deviceName`, `deviceType`, `remoteType`
|
|
524
|
+
- [x] Removed references to non-existent properties (`id`, `name`, `type`, `model`, `deviceModel`)
|
|
525
|
+
|
|
526
|
+
**Changes Made:**
|
|
527
|
+
- Updated BLE discovery to use `timeout` parameter instead of `duration`
|
|
528
|
+
- Changed OpenAPI access to use `switchbot.getAPIClient()?.getDevices()`
|
|
529
|
+
- Simplified response parsing: `apiData.deviceList` and `apiData.infraredRemoteList` (no `body` wrapper)
|
|
530
|
+
- Fixed all property accesses to match APIDevice and APIInfraredRemote interfaces
|
|
531
|
+
- Build now succeeds with 0 TypeScript errors
|
|
532
|
+
- All 39 tests still pass
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Notes
|
|
537
|
+
|
|
538
|
+
- All completed features have been tested and verified working
|
|
539
|
+
- Bundle size increased from 35.8kb → 47.0kb with new features
|
|
540
|
+
- Zero TypeScript compilation errors
|
|
541
|
+
- All lint checks passing
|
|
542
|
+
- UI mockups available in `todo/mockups/` directory
|
package/todo/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# TODO Documentation
|
|
2
|
+
|
|
3
|
+
This directory contains all task tracking and planning documentation for the SwitchBot Homebridge Plugin.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
todo/
|
|
9
|
+
├── README.md # This file
|
|
10
|
+
├── TODO.md # Active tasks and upcoming features
|
|
11
|
+
├── COMPLETED.md # Completed features and improvements
|
|
12
|
+
└── mockups/ # UI design mockups
|
|
13
|
+
├── signal-strength-visualization.svg
|
|
14
|
+
├── filtering-sorting.svg
|
|
15
|
+
└── modal-switchbot-theme.svg
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Files
|
|
19
|
+
|
|
20
|
+
### [TODO.md](TODO.md)
|
|
21
|
+
Active tasks and features planned for future releases. Organized by priority:
|
|
22
|
+
- **Must Do (Next Release)** - Critical features blocking next release
|
|
23
|
+
- **Should Do (Soon)** - Important features for near-term releases
|
|
24
|
+
- **Nice to Have (Future)** - Enhancement ideas for future consideration
|
|
25
|
+
|
|
26
|
+
### [COMPLETED.md](COMPLETED.md)
|
|
27
|
+
Archive of completed features and bug fixes. Each completed item includes:
|
|
28
|
+
- Implementation details
|
|
29
|
+
- Date completed
|
|
30
|
+
- Links to related code/files
|
|
31
|
+
- UI mockups (if applicable)
|
|
32
|
+
|
|
33
|
+
### [mockups/](mockups/)
|
|
34
|
+
SVG mockups showing UI designs for completed and planned features:
|
|
35
|
+
- **signal-strength-visualization.svg** - RSSI bars and quality badges for BLE devices
|
|
36
|
+
- **filtering-sorting.svg** - Discovery page filters, sort options, and search
|
|
37
|
+
- **modal-switchbot-theme.svg** - Edit device modal with SwitchBot red theme
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
|
|
41
|
+
1. **Planning** - New features start as unchecked items in TODO.md
|
|
42
|
+
2. **Development** - Mark items as in-progress while working
|
|
43
|
+
3. **Completion** - When complete, move entire section to COMPLETED.md with implementation details
|
|
44
|
+
4. **UI Features** - Create SVG mockup before or after implementation for documentation
|
|
45
|
+
|
|
46
|
+
## Priority Levels
|
|
47
|
+
|
|
48
|
+
- **Priority: Critical** - Bugs affecting functionality or compatibility
|
|
49
|
+
- **Priority: High** - Features needed for next release
|
|
50
|
+
- **Priority: Medium** - Quality of life improvements
|
|
51
|
+
- **Priority: Low** - Nice-to-have enhancements
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
- Always update COMPLETED.md when marking features as done
|
|
56
|
+
- Include implementation details and learnings
|
|
57
|
+
- Create mockups for all UI features
|
|
58
|
+
- Keep TODO.md focused on active/upcoming work
|
|
59
|
+
- Archive helps track project progress over time
|