@switchbot/homebridge-switchbot 5.0.0-beta.70 → 5.0.0-beta.71
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/workflows/ci.yml +61 -0
- package/.github/workflows/manual-e2e.yml +103 -0
- package/CHANGELOG.md +20 -0
- package/E2E-VERIFICATION.md +121 -0
- package/MIGRATION.md +44 -0
- package/README.md +11 -0
- package/config.schema.json +99 -1940
- package/dist/deviceFactory.d.ts +13 -0
- package/dist/deviceFactory.d.ts.map +1 -0
- package/dist/deviceFactory.js +81 -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 +283 -0
- package/dist/devices/genericDevice.d.ts.map +1 -0
- package/dist/devices/genericDevice.js +1035 -0
- package/dist/devices/genericDevice.js.map +1 -0
- package/dist/homebridge-ui/public/index.html +72 -440
- package/dist/homebridge-ui/server.d.ts +3 -1
- package/dist/homebridge-ui/server.d.ts.map +1 -1
- package/dist/homebridge-ui/server.js +47 -10
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/platform.d.ts +27 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +404 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.d.ts +10 -317
- 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 +259 -0
- package/dist/switchbotClient.js.map +1 -0
- package/dist/utils.d.ts +36 -248
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -1367
- package/dist/utils.js.map +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/index.html +50 -15
- package/docs/variables/default.html +1 -1
- package/package.json +19 -18
- 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/generate-matter-maps.js +60 -0
- package/scripts/run-e2e-local.sh +14 -0
- package/src/deviceFactory.ts +122 -0
- package/src/devices/deviceBase.ts +141 -0
- package/src/devices/genericDevice.ts +965 -0
- package/src/homebridge-ui/public/index.html +72 -440
- package/src/homebridge-ui/server.ts +52 -10
- package/src/index.ts +3 -5
- package/src/platform.ts +395 -0
- package/src/settings.ts +12 -352
- package/src/switchbotClient.ts +266 -0
- package/src/utils.ts +47 -1456
- 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 +50 -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 +55 -0
- package/test/matter-descriptors.spec.ts +97 -0
- package/test/matter-device-state.spec.ts +101 -0
- package/test/matter-integration.spec.ts +70 -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 +20 -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/devices-hap/airpurifier.d.ts +0 -54
- package/dist/devices-hap/airpurifier.d.ts.map +0 -1
- package/dist/devices-hap/airpurifier.js +0 -533
- 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 -822
- 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 -707
- 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 -921
- 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 -108
- package/dist/devices-hap/device.d.ts.map +0 -1
- package/dist/devices-hap/device.js +0 -821
- 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 -655
- 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 -393
- package/dist/devices-hap/hub.js.map +0 -1
- package/dist/devices-hap/humidifier.d.ts +0 -73
- package/dist/devices-hap/humidifier.d.ts.map +0 -1
- package/dist/devices-hap/humidifier.js +0 -716
- 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 -397
- 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 -827
- 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 -569
- 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 -380
- 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 -385
- 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 -469
- 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 -400
- 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 -530
- 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 -90
- package/dist/devices-matter/BaseMatterAccessory.d.ts.map +0 -1
- package/dist/devices-matter/BaseMatterAccessory.js +0 -264
- 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 -61
- package/dist/devices-matter/RoboticVacuumAccessory.d.ts.map +0 -1
- package/dist/devices-matter/RoboticVacuumAccessory.js +0 -544
- 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 -131
- 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/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 -69
- package/dist/irdevice/irdevice.d.ts.map +0 -1
- package/dist/irdevice/irdevice.js +0 -339
- 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 -160
- package/dist/platform-hap.d.ts.map +0 -1
- package/dist/platform-hap.js +0 -3041
- package/dist/platform-hap.js.map +0 -1
- package/dist/platform-matter.d.ts +0 -188
- package/dist/platform-matter.d.ts.map +0 -1
- package/dist/platform-matter.js +0 -2545
- package/dist/platform-matter.js.map +0 -1
- package/dist/test/apiRequestTracker.test.d.ts +0 -2
- package/dist/test/apiRequestTracker.test.d.ts.map +0 -1
- package/dist/test/apiRequestTracker.test.js +0 -392
- package/dist/test/apiRequestTracker.test.js.map +0 -1
- package/dist/test/hap/device-webhook-context.test.d.ts +0 -2
- package/dist/test/hap/device-webhook-context.test.d.ts.map +0 -1
- package/dist/test/hap/device-webhook-context.test.js +0 -128
- package/dist/test/hap/device-webhook-context.test.js.map +0 -1
- package/dist/test/hap/platform-hap.logging.test.d.ts +0 -2
- package/dist/test/hap/platform-hap.logging.test.d.ts.map +0 -1
- package/dist/test/hap/platform-hap.logging.test.js +0 -33
- package/dist/test/hap/platform-hap.logging.test.js.map +0 -1
- package/dist/test/hap/platform-hap.test.d.ts +0 -2
- package/dist/test/hap/platform-hap.test.d.ts.map +0 -1
- package/dist/test/hap/platform-hap.test.js +0 -62
- package/dist/test/hap/platform-hap.test.js.map +0 -1
- package/dist/test/helpers/platform-fixtures.d.ts +0 -9
- package/dist/test/helpers/platform-fixtures.d.ts.map +0 -1
- package/dist/test/helpers/platform-fixtures.js +0 -30
- package/dist/test/helpers/platform-fixtures.js.map +0 -1
- package/dist/test/homebridge-ui/server.test.d.ts +0 -2
- package/dist/test/homebridge-ui/server.test.d.ts.map +0 -1
- package/dist/test/homebridge-ui/server.test.js +0 -445
- package/dist/test/homebridge-ui/server.test.js.map +0 -1
- package/dist/test/index.test.d.ts +0 -2
- package/dist/test/index.test.d.ts.map +0 -1
- package/dist/test/index.test.js +0 -19
- package/dist/test/index.test.js.map +0 -1
- package/dist/test/matter/devices-matter/baseMatterAccessory.test.d.ts +0 -2
- package/dist/test/matter/devices-matter/baseMatterAccessory.test.d.ts.map +0 -1
- package/dist/test/matter/devices-matter/baseMatterAccessory.test.js +0 -71
- package/dist/test/matter/devices-matter/baseMatterAccessory.test.js.map +0 -1
- package/dist/test/matter/platform-matter.additional.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.additional.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.additional.test.js +0 -35
- package/dist/test/matter/platform-matter.additional.test.js.map +0 -1
- package/dist/test/matter/platform-matter.bleparse.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.bleparse.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.bleparse.test.js +0 -43
- package/dist/test/matter/platform-matter.bleparse.test.js.map +0 -1
- package/dist/test/matter/platform-matter.cleanup.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.cleanup.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.cleanup.test.js +0 -70
- package/dist/test/matter/platform-matter.cleanup.test.js.map +0 -1
- package/dist/test/matter/platform-matter.keepstale.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.keepstale.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.keepstale.test.js +0 -27
- package/dist/test/matter/platform-matter.keepstale.test.js.map +0 -1
- package/dist/test/matter/platform-matter.logging.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.logging.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.logging.test.js +0 -29
- package/dist/test/matter/platform-matter.logging.test.js.map +0 -1
- package/dist/test/matter/platform-matter.mapping.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.mapping.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.mapping.test.js +0 -43
- package/dist/test/matter/platform-matter.mapping.test.js.map +0 -1
- package/dist/test/matter/platform-matter.openapi-mapping.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.openapi-mapping.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.openapi-mapping.test.js +0 -84
- package/dist/test/matter/platform-matter.openapi-mapping.test.js.map +0 -1
- package/dist/test/matter/platform-matter.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.test.js +0 -117
- package/dist/test/matter/platform-matter.test.js.map +0 -1
- package/dist/test/matter/platform-matter.unregister.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.unregister.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.unregister.test.js +0 -30
- package/dist/test/matter/platform-matter.unregister.test.js.map +0 -1
- package/dist/test/matter/platform-matter.webhook.test.d.ts +0 -2
- package/dist/test/matter/platform-matter.webhook.test.d.ts.map +0 -1
- package/dist/test/matter/platform-matter.webhook.test.js +0 -46
- package/dist/test/matter/platform-matter.webhook.test.js.map +0 -1
- package/dist/test/utils.test.d.ts +0 -2
- package/dist/test/utils.test.d.ts.map +0 -1
- package/dist/test/utils.test.js +0 -95
- package/dist/test/utils.test.js.map +0 -1
- package/dist/test/verifyconfig.test.d.ts +0 -2
- package/dist/test/verifyconfig.test.d.ts.map +0 -1
- package/dist/test/verifyconfig.test.js +0 -167
- package/dist/test/verifyconfig.test.js.map +0 -1
- package/src/custom.d.ts +0 -7
- package/src/devices-hap/airpurifier.ts +0 -568
- package/src/devices-hap/blindtilt.ts +0 -1049
- package/src/devices-hap/bot.ts +0 -910
- package/src/devices-hap/ceilinglight.ts +0 -747
- package/src/devices-hap/colorbulb.ts +0 -940
- package/src/devices-hap/contact.ts +0 -457
- package/src/devices-hap/curtain.ts +0 -944
- package/src/devices-hap/device.ts +0 -890
- package/src/devices-hap/fan.ts +0 -716
- package/src/devices-hap/hub.ts +0 -440
- package/src/devices-hap/humidifier.ts +0 -762
- package/src/devices-hap/iosensor.ts +0 -442
- package/src/devices-hap/lightstrip.ts +0 -863
- package/src/devices-hap/lock.ts +0 -627
- package/src/devices-hap/meter.ts +0 -427
- package/src/devices-hap/meterplus.ts +0 -431
- package/src/devices-hap/meterpro.ts +0 -523
- package/src/devices-hap/motion.ts +0 -390
- package/src/devices-hap/plug.ts +0 -427
- package/src/devices-hap/relayswitch.ts +0 -727
- package/src/devices-hap/robotvacuumcleaner.ts +0 -574
- package/src/devices-hap/waterdetector.ts +0 -400
- package/src/devices-matter/BaseMatterAccessory.ts +0 -302
- 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 -621
- 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 -135
- 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/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 -383
- 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 -3193
- package/src/platform-matter.ts +0 -2703
- package/src/test/apiRequestTracker.test.ts +0 -417
- package/src/test/hap/device-webhook-context.test.ts +0 -136
- package/src/test/hap/platform-hap.logging.test.ts +0 -36
- package/src/test/hap/platform-hap.test.ts +0 -70
- package/src/test/helpers/platform-fixtures.ts +0 -33
- package/src/test/homebridge-ui/server.test.ts +0 -486
- package/src/test/index.test.ts +0 -24
- package/src/test/matter/devices-matter/baseMatterAccessory.test.ts +0 -88
- package/src/test/matter/platform-matter.additional.test.ts +0 -44
- package/src/test/matter/platform-matter.bleparse.test.ts +0 -47
- package/src/test/matter/platform-matter.cleanup.test.ts +0 -86
- package/src/test/matter/platform-matter.keepstale.test.ts +0 -37
- package/src/test/matter/platform-matter.logging.test.ts +0 -33
- package/src/test/matter/platform-matter.mapping.test.ts +0 -57
- package/src/test/matter/platform-matter.openapi-mapping.test.ts +0 -109
- package/src/test/matter/platform-matter.test.ts +0 -144
- package/src/test/matter/platform-matter.unregister.test.ts +0 -39
- package/src/test/matter/platform-matter.webhook.test.ts +0 -54
- package/src/test/utils.test.ts +0 -96
- package/src/test/verifyconfig.test.ts +0 -198
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.bleparse.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.bleparse.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
describe('platform-matter BLE advertisement parser', () => {
|
|
5
|
-
it('parses extended serviceData fields correctly', () => {
|
|
6
|
-
const updateAccessoryState = vi.fn();
|
|
7
|
-
const api = makeApiStub({ updateAccessoryState });
|
|
8
|
-
const log = makeLogStub();
|
|
9
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
10
|
-
const dev = { deviceId: 'DEV-TEST' };
|
|
11
|
-
const sd = {
|
|
12
|
-
temp: 22.3,
|
|
13
|
-
humid: 45,
|
|
14
|
-
pm25: 12,
|
|
15
|
-
pm10: 34,
|
|
16
|
-
voc: 120,
|
|
17
|
-
co2: 420,
|
|
18
|
-
motion: 1,
|
|
19
|
-
open: 0,
|
|
20
|
-
leak: 0,
|
|
21
|
-
position: 30,
|
|
22
|
-
fanSpeed: 75,
|
|
23
|
-
battery: 88,
|
|
24
|
-
rgb: '255:128:64',
|
|
25
|
-
};
|
|
26
|
-
const parsed = platform.parseAdvertisementForDevice(dev, sd);
|
|
27
|
-
expect(parsed).toBeTruthy();
|
|
28
|
-
expect(parsed.temperature).toBeCloseTo(22.3);
|
|
29
|
-
expect(parsed.humidity).toBe(45);
|
|
30
|
-
expect(parsed.pm25).toBe(12);
|
|
31
|
-
expect(parsed.pm10).toBe(34);
|
|
32
|
-
expect(parsed.voc).toBe(120);
|
|
33
|
-
expect(parsed.co2).toBe(420);
|
|
34
|
-
expect(parsed.motion).toBeTruthy();
|
|
35
|
-
expect(parsed.contact).toBeDefined();
|
|
36
|
-
expect(parsed.leak).toBeFalsy();
|
|
37
|
-
expect(parsed.position).toBe(30);
|
|
38
|
-
expect(parsed.fanSpeed).toBe(75);
|
|
39
|
-
expect(parsed.battery).toBe(88);
|
|
40
|
-
expect(parsed.color).toEqual({ r: 255, g: 128, b: 64 });
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=platform-matter.bleparse.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.bleparse.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.bleparse.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACxD,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,oBAAoB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;QACpC,MAAM,GAAG,GAAQ,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAA;QAEtD,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAC9B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE,EAAS,EAAE,GAAG,CAAC,CAAA;QAExE,MAAM,GAAG,GAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAA;QACzC,MA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,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAChC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.cleanup.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.cleanup.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { formatDeviceIdAsMac } from '../../utils.js';
|
|
4
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
5
|
-
describe('platform-matter lifecycle cleanup', () => {
|
|
6
|
-
it('clearDeviceResources removes timers, instances and BLE handler entries', async () => {
|
|
7
|
-
// Setup stubbed API and logs
|
|
8
|
-
const handlers = {};
|
|
9
|
-
const api = makeApiStub({ registerPlatformAccessories: vi.fn(), unregisterPlatformAccessories: vi.fn(), clusterNames: { OnOff: 'OnOff' } });
|
|
10
|
-
api._handlers = handlers;
|
|
11
|
-
// keep api.on as a single-statement arrow to satisfy lint
|
|
12
|
-
api.on = (ev, fn) => (handlers[ev] = fn);
|
|
13
|
-
const log = makeLogStub();
|
|
14
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
15
|
-
// Insert a fake timer, accessory instance, and BLE handler
|
|
16
|
-
const deviceId = 'AA:BB:CC:11:22:33';
|
|
17
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
18
|
-
const timer = setInterval(() => { }, 100000);
|
|
19
|
-
platform.refreshTimers.set(nid, timer);
|
|
20
|
-
platform.accessoryInstances.set(nid, { dummy: true });
|
|
21
|
-
platform.bleEventHandler[deviceId.toLowerCase()] = () => { };
|
|
22
|
-
// Ensure they exist prior
|
|
23
|
-
expect(platform.refreshTimers.get(nid)).toBeDefined();
|
|
24
|
-
expect(platform.accessoryInstances.get(nid)).toBeDefined();
|
|
25
|
-
expect(platform.bleEventHandler[deviceId.toLowerCase()]).toBeDefined();
|
|
26
|
-
platform.clearDeviceResources(deviceId);
|
|
27
|
-
// Now they should be removed
|
|
28
|
-
expect(platform.refreshTimers.get(nid)).toBeUndefined();
|
|
29
|
-
expect(platform.accessoryInstances.get(nid)).toBeUndefined();
|
|
30
|
-
expect(platform.bleEventHandler[deviceId.toLowerCase()]).toBeUndefined();
|
|
31
|
-
});
|
|
32
|
-
it('shutdown handler clears all timers and handlers when invoked', async () => {
|
|
33
|
-
// Setup stubbed API and logs
|
|
34
|
-
const handlers = {};
|
|
35
|
-
const api = makeApiStub({ registerPlatformAccessories: vi.fn(), unregisterPlatformAccessories: vi.fn(), clusterNames: { OnOff: 'OnOff' } });
|
|
36
|
-
api._handlers = handlers;
|
|
37
|
-
// keep api.on as a single-statement arrow to satisfy lint
|
|
38
|
-
api.on = (ev, fn) => (handlers[ev] = fn);
|
|
39
|
-
const log = makeLogStub();
|
|
40
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
41
|
-
// Add two timers to the platform (using normalized ids)
|
|
42
|
-
const ids = ['devA', 'devB'];
|
|
43
|
-
for (const id of ids) {
|
|
44
|
-
const nid = platform.normalizeDeviceId(id);
|
|
45
|
-
const t = setInterval(() => { }, 100000);
|
|
46
|
-
platform.refreshTimers.set(nid, t);
|
|
47
|
-
platform.accessoryInstances.set(nid, { dummy: true });
|
|
48
|
-
try {
|
|
49
|
-
const mac = formatDeviceIdAsMac(id).toLowerCase();
|
|
50
|
-
platform.bleEventHandler[mac] = () => { };
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
// ignore formatting errors in this test
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Invoke didFinishLaunching to ensure the platform registered its shutdown handler
|
|
57
|
-
await Promise.resolve(api._handlers.didFinishLaunching?.());
|
|
58
|
-
// Shutdown handler should now be registered on api._handlers.shutdown
|
|
59
|
-
expect(typeof api._handlers.shutdown).toBe('function');
|
|
60
|
-
// Call the shutdown handler
|
|
61
|
-
await Promise.resolve(api._handlers.shutdown());
|
|
62
|
-
// All refresh timers should be cleared
|
|
63
|
-
for (const id of ids) {
|
|
64
|
-
const nid = platform.normalizeDeviceId(id);
|
|
65
|
-
expect(platform.refreshTimers.get(nid)).toBeUndefined();
|
|
66
|
-
expect(platform.accessoryInstances.get(nid)).toBeUndefined();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=platform-matter.cleanup.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.cleanup.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.cleanup.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,EAAE,CAAC,wEAAwE,EAAE,KAAK,IAAI,EAAE;QACtF,6BAA6B;QAC7B,MAAM,QAAQ,GAA4C,EAAE,CAAA;QAC5D,MAAM,GAAG,GAAQ,WAAW,CAAC,EAAE,2BAA2B,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,6BAA6B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file":"platform-matter.keepstale.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.keepstale.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
describe('keepStaleAccessories config flag behavior', () => {
|
|
5
|
-
it('keeps previously-registered accessories when options.keepStaleAccessories=true', async () => {
|
|
6
|
-
const unregister = vi.fn();
|
|
7
|
-
const register = vi.fn();
|
|
8
|
-
const api = makeApiStub({ unregisterPlatformAccessories: unregister, registerPlatformAccessories: register });
|
|
9
|
-
const log = makeLogStub();
|
|
10
|
-
// Create platform with keepStaleAccessories = true
|
|
11
|
-
const platform = new SwitchBotMatterPlatform(log, { options: { keepStaleAccessories: true } }, api);
|
|
12
|
-
platform.discoveredDevices = [{ deviceId: 'DEV1', deviceType: 'Plug', deviceName: 'Device 1' }];
|
|
13
|
-
// Insert a stale accessory into matterAccessories
|
|
14
|
-
const staleUuid = api.matter.uuid.generate('stale-device');
|
|
15
|
-
const staleAcc = { uuid: staleUuid, displayName: 'Stale', context: { deviceId: 'STALE_DEVICE' } };
|
|
16
|
-
platform.matterAccessories.set(staleUuid, staleAcc);
|
|
17
|
-
// Mock createAccessoryFromDevice to return a simple accessory for DEV1
|
|
18
|
-
vi.spyOn(platform, 'createAccessoryFromDevice').mockResolvedValue({ displayName: 'Device 1', uuid: 'uuid-DEV1', context: { deviceId: 'DEV1' } });
|
|
19
|
-
// Run registration which includes stale-removal logic
|
|
20
|
-
await platform.registerMatterAccessories();
|
|
21
|
-
// Expect unregister NOT called (we kept stale accessory)
|
|
22
|
-
expect(unregister).not.toHaveBeenCalled();
|
|
23
|
-
// Stale accessory should still be present in matterAccessories
|
|
24
|
-
expect(platform.matterAccessories.get(staleUuid)).toBeDefined();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=platform-matter.keepstale.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.keepstale.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.keepstale.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACzD,EAAE,CAAC,gFAAgF,EAAE,KAAK,IAAI,EAAE;QAC9F,MAAM,UAAU,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;QAC1B,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;QACxB,MAAM,GAAG,GAAQ,WAAW,CAAC,EAAE,6BAA6B,EAAE,UAAU,EAAE,2BAA2B,EAAE,QAAQ,EAAE,CAAC,CAAA;QAElH,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAE9B,mDAAmD;QACnD,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE,EAAE,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAS,EAAE,GAAG,CAAC,CAGhH;QAAC,QAAgB,CAAC,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAA;QAEzG,kDAAkD;QAClD,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;QAC1D,MAAM,QAAQ,GAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,CACrG;QAAC,QAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;QAE7D,uEAAuE;QACvE,EAAE,CAAC,KAAK,CAAC,QAAe,EAAE,2BAA2B,CAAC,CAAC,iBAAiB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAS,CAAC,CAAA;QAE9J,sDAAsD;QACtD,MAAO,QAAgB,CAAC,yBAAyB,EAAE,CAAA;QAEnD,yDAAyD;QACzD,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QAEzC,+DAA+D;QAC/D,MAAM,CAAE,QAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IAC1E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.logging.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.logging.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
/**
|
|
5
|
-
* Verifies that debug logger formats arguments so that accessory displayName
|
|
6
|
-
* appears in the output for cached accessory load logs.
|
|
7
|
-
*/
|
|
8
|
-
describe('platform-matter logging', () => {
|
|
9
|
-
it('prints accessory name when loading cached Matter accessory', async () => {
|
|
10
|
-
const api = makeApiStub();
|
|
11
|
-
const log = makeLogStub();
|
|
12
|
-
const platform = new SwitchBotMatterPlatform(log, {
|
|
13
|
-
name: 'SwitchBot',
|
|
14
|
-
credentials: {},
|
|
15
|
-
options: { logging: 'debug' },
|
|
16
|
-
}, api);
|
|
17
|
-
// Simulate Homebridge restoring a cached Matter accessory
|
|
18
|
-
const acc = { uuid: 'uuid-TEST', displayName: 'Test Device', context: { deviceId: 'DEV1' } };
|
|
19
|
-
platform.configureMatterAccessory(acc);
|
|
20
|
-
// debugLog is async and gated; yield to allow the logger to run
|
|
21
|
-
await new Promise(resolve => setTimeout(resolve, 0));
|
|
22
|
-
// In 'debug' mode, debugLog uses log.info with a [DEBUG] prefix
|
|
23
|
-
// Ensure one of the info calls contains the message with the device name
|
|
24
|
-
const calls = log.info.mock.calls;
|
|
25
|
-
const hasLine = calls.some(args => String(args[0]).includes('Loading cached Matter accessory: Test Device'));
|
|
26
|
-
expect(hasLine).toBe(true);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=platform-matter.logging.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.logging.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.logging.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E;;;GAGG;AACH,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QAC1E,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAC9B,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAE9B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE;YACvD,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;SACvB,EAAE,GAAG,CAAC,CAAA;QAEd,0DAA0D;QAC1D,MAAM,GAAG,GAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAChG;QAAC,QAAgB,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAA;QAChD,gEAAgE;QAChE,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;QAEpD,gEAAgE;QAChE,yEAAyE;QACzE,MAAM,KAAK,GAAI,GAAG,CAAC,IAAY,CAAC,IAAI,CAAC,KAAwB,CAAA;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC,CAAC,CAAA;QAC5G,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.mapping.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.mapping.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
describe('platform-matter mapping helper', () => {
|
|
5
|
-
it('prefers accessory instance update methods for battery and falls back to api.matter.updateAccessoryState', async () => {
|
|
6
|
-
const updateAccessoryState = vi.fn();
|
|
7
|
-
const api = makeApiStub({ updateAccessoryState, clusterNames: { OnOff: 'OnOff', LevelControl: 'LevelControl', ColorControl: 'ColorControl', PowerSource: 'powerSource' } });
|
|
8
|
-
const log = makeLogStub();
|
|
9
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
10
|
-
// Create a fake accessory instance with updateBatteryPercentage
|
|
11
|
-
const deviceId = 'DEV123';
|
|
12
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
13
|
-
const fakeInstance = { updateBatteryPercentage: vi.fn() };
|
|
14
|
-
platform.accessoryInstances.set(nid, fakeInstance);
|
|
15
|
-
// Call the private helper with different battery field names
|
|
16
|
-
await platform.applyStatusToAccessory('uuid-test', { deviceId }, { batteryPercentage: 55 });
|
|
17
|
-
expect(fakeInstance.updateBatteryPercentage).toHaveBeenCalled();
|
|
18
|
-
platform.accessoryInstances.delete(nid);
|
|
19
|
-
await platform.applyStatusToAccessory('uuid-test', { deviceId }, { battery: 30 });
|
|
20
|
-
expect(updateAccessoryState).toHaveBeenCalled();
|
|
21
|
-
});
|
|
22
|
-
it('handles temperature and humidity synonyms', async () => {
|
|
23
|
-
const updateAccessoryState = vi.fn();
|
|
24
|
-
const api = makeApiStub({ updateAccessoryState });
|
|
25
|
-
const log = makeLogStub();
|
|
26
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
27
|
-
const deviceId = 'DEV-TEMP';
|
|
28
|
-
await platform.applyStatusToAccessory('uuid-temp', { deviceId }, { temp: 21.5, humid: 48 });
|
|
29
|
-
// Expect updateAccessoryState to have been called for temperature and humidity
|
|
30
|
-
expect(updateAccessoryState).toHaveBeenCalled();
|
|
31
|
-
});
|
|
32
|
-
it('applies VOC and PM10 mappings when present', async () => {
|
|
33
|
-
const updateAccessoryState = vi.fn();
|
|
34
|
-
const api = makeApiStub({ updateAccessoryState });
|
|
35
|
-
const log = makeLogStub();
|
|
36
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
37
|
-
const deviceId = 'DEV-AQ';
|
|
38
|
-
await platform.applyStatusToAccessory('uuid-aq', { deviceId }, { voc: 123, pm10: 56 });
|
|
39
|
-
// Expect updateAccessoryState (or safeUpdate fallback) to have been called for voc and pm10
|
|
40
|
-
expect(updateAccessoryState).toHaveBeenCalled();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=platform-matter.mapping.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.mapping.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.mapping.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,yGAAyG,EAAE,KAAK,IAAI,EAAE;QACvH,MAAM,oBAAoB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;QACpC,MAAM,GAAG,GAAQ,WAAW,CAAC,EAAE,oBAAoB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,CAAC,CAAA;QAEhL,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAC9B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE,EAAS,EAAE,GAAG,CAAC,CAAA;QAExE,gEAAgE;QAChE,MAAM,QAAQ,GAAG,QAAQ,CAAA;QACzB,MAAM,GAAG,GAAI,QAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;QACzD,MAAM,YAAY,GAAG,EAAE,uBAAuB,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CACxD;QAAC,QAAgB,CAAC,kBAAkB,CAAC,G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AAG,GAAQ,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAA;QAEtD,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAC9B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE,EAAS,EAAE,GAAG,CAAC,CAAA;QAExE,MAAM,QAAQ,GAAG,QAAQ,CAAA;QACzB,MAAO,QAAgB,CAAC,sBAAsB,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAS,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;QAEtG,4FAA4F;QAC5F,MAAM,CAAC,oBAAoB,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.openapi-mapping.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.openapi-mapping.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
describe('platform-matter OpenAPI -> Matter mapping', () => {
|
|
5
|
-
it('maps light OpenAPI status (on/off, brightness, color, battery) to accessory instance helpers', async () => {
|
|
6
|
-
const api = makeApiStub();
|
|
7
|
-
const log = makeLogStub();
|
|
8
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
9
|
-
const deviceId = 'LIGHT-1';
|
|
10
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
11
|
-
const instance = {
|
|
12
|
-
updateOnOffState: vi.fn(),
|
|
13
|
-
updateBrightness: vi.fn(),
|
|
14
|
-
updateHueSaturation: vi.fn(),
|
|
15
|
-
updateBatteryPercentage: vi.fn(),
|
|
16
|
-
};
|
|
17
|
-
platform.accessoryInstances.set(nid, instance);
|
|
18
|
-
const status = { power: true, brightness: 80, color: '255:128:64', battery: 92 };
|
|
19
|
-
await platform.applyStatusToAccessory('uuid-light', { deviceId }, status);
|
|
20
|
-
expect(instance.updateOnOffState).toHaveBeenCalled();
|
|
21
|
-
expect(instance.updateBrightness).toHaveBeenCalled();
|
|
22
|
-
expect(instance.updateHueSaturation).toHaveBeenCalled();
|
|
23
|
-
expect(instance.updateBatteryPercentage).toHaveBeenCalled();
|
|
24
|
-
});
|
|
25
|
-
it('maps MeterPro OpenAPI status (temp, humid, co2, pm25, voc) to accessory instance helpers', async () => {
|
|
26
|
-
const api = makeApiStub();
|
|
27
|
-
const log = makeLogStub();
|
|
28
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
29
|
-
const deviceId = 'METERPRO-1';
|
|
30
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
31
|
-
const instance = {
|
|
32
|
-
updateTemperature: vi.fn(),
|
|
33
|
-
updateHumidity: vi.fn(),
|
|
34
|
-
updateCO2: vi.fn(),
|
|
35
|
-
updatePM25: vi.fn(),
|
|
36
|
-
updateVOC: vi.fn(),
|
|
37
|
-
};
|
|
38
|
-
platform.accessoryInstances.set(nid, instance);
|
|
39
|
-
const status = { temp: 21.4, humid: 45, co2: 410, pm25: 12, voc: 85 };
|
|
40
|
-
await platform.applyStatusToAccessory('uuid-meter', { deviceId }, status);
|
|
41
|
-
expect(instance.updateTemperature).toHaveBeenCalled();
|
|
42
|
-
expect(instance.updateHumidity).toHaveBeenCalled();
|
|
43
|
-
expect(instance.updateCO2).toHaveBeenCalled();
|
|
44
|
-
expect(instance.updatePM25).toHaveBeenCalled();
|
|
45
|
-
expect(instance.updateVOC).toHaveBeenCalled();
|
|
46
|
-
});
|
|
47
|
-
it('maps lock OpenAPI status to lock helper', async () => {
|
|
48
|
-
const api = makeApiStub();
|
|
49
|
-
const log = makeLogStub();
|
|
50
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
51
|
-
const deviceId = 'LOCK-1';
|
|
52
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
53
|
-
const instance = { updateLockState: vi.fn() };
|
|
54
|
-
platform.accessoryInstances.set(nid, instance);
|
|
55
|
-
const status = { lock: true };
|
|
56
|
-
await platform.applyStatusToAccessory('uuid-lock', { deviceId }, status);
|
|
57
|
-
expect(instance.updateLockState).toHaveBeenCalled();
|
|
58
|
-
});
|
|
59
|
-
it('maps curtain position synonyms to lift position helper', async () => {
|
|
60
|
-
const api = makeApiStub();
|
|
61
|
-
const log = makeLogStub();
|
|
62
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
63
|
-
const deviceId = 'CURTAIN-1';
|
|
64
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
65
|
-
const instance = { updateLiftPosition: vi.fn() };
|
|
66
|
-
platform.accessoryInstances.set(nid, instance);
|
|
67
|
-
await platform.applyStatusToAccessory('uuid-cur', { deviceId, deviceType: 'Curtain' }, { position: 25 });
|
|
68
|
-
await platform.applyStatusToAccessory('uuid-cur', { deviceId, deviceType: 'Curtain' }, { slidePosition: 75 });
|
|
69
|
-
expect(instance.updateLiftPosition).toHaveBeenCalled();
|
|
70
|
-
});
|
|
71
|
-
it('maps robot vacuum run state / on to updateRunMode or updateOperationalState', async () => {
|
|
72
|
-
const api = makeApiStub();
|
|
73
|
-
const log = makeLogStub();
|
|
74
|
-
const platform = new SwitchBotMatterPlatform(log, {}, api);
|
|
75
|
-
const deviceId = 'RVC-1';
|
|
76
|
-
const nid = platform.normalizeDeviceId(deviceId);
|
|
77
|
-
const instance = { updateRunMode: vi.fn(), updateOperationalState: vi.fn() };
|
|
78
|
-
platform.accessoryInstances.set(nid, instance);
|
|
79
|
-
await platform.applyStatusToAccessory('uuid-rvc', { deviceId, deviceType: 'K10+' }, { runState: 'cleaning', power: true });
|
|
80
|
-
const calls = (instance.updateRunMode.mock?.calls?.length || 0) + (instance.updateOperationalState.mock?.calls?.length || 0);
|
|
81
|
-
expect(calls).toBeGreaterThan(0);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=platform-matter.openapi-mapping.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.openapi-mapping.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.openapi-mapping.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACzD,EAAE,CAAC,8FAA8F,EAAE,KAAK,IAAI,EAAE;QAC5G,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAC9B,MAAM,GAAG,GAAG,WAAW,EAAE,CAAA;QACzB,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAU,EAAE,EAAS,EAAE,GAAG,CAAC,CAAA;QAExE,MAAM,QAAQ,GAAG,SAAS,CAAA;QAC1B,MAAM,GAAG,GAAI,QAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;QAEzD,MAAM,QAAQ,GAAG;YACf,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE;YACzB,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE;YACzB,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE;YAC5B,uBAAuB,EAAE,EAAE,CAAC,EAAE,EAAE;SACjC,CACA;QAAC,QAAgB,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAExD,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK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Q,CAAC,CAAA;QAEzD,MAAM,QAAQ,GAAQ,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAChF;QAAC,QAAgB,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAExD,MAAO,QAAgB,CAAC,sBAAsB,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAS,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAE1I,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,CAAA;QAC5H,MAAM,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;IAClC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { PLATFORM_NAME, PLUGIN_NAME } from '../../settings.js';
|
|
4
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
5
|
-
describe('platform-matter discovered devices', () => {
|
|
6
|
-
it('uses discovered devices and registers them (platform + robotic)', async () => {
|
|
7
|
-
const mockRegister = vi.fn();
|
|
8
|
-
const api = makeApiStub({
|
|
9
|
-
registerPlatformAccessories: mockRegister,
|
|
10
|
-
clusterNames: { OnOff: 'OnOff', LevelControl: 'LevelControl', ColorControl: 'ColorControl' },
|
|
11
|
-
deviceTypes: { RoboticVacuumCleaner: 'rvc' },
|
|
12
|
-
});
|
|
13
|
-
const log = makeLogStub();
|
|
14
|
-
const config = {};
|
|
15
|
-
const platform = new SwitchBotMatterPlatform(log, config, api);
|
|
16
|
-
platform.discoveredDevices = [
|
|
17
|
-
{ deviceId: 'dev1', deviceName: 'Lamp', deviceType: 'Plug' },
|
|
18
|
-
{ deviceId: 'vac1', deviceName: 'Vac', deviceType: 'K10+' },
|
|
19
|
-
];
|
|
20
|
-
platform.createAccessoryFromDevice = async (dev) => ({ displayName: dev.deviceName, uuid: api.matter.uuid.generate(dev.deviceId) });
|
|
21
|
-
await platform.registerMatterAccessories();
|
|
22
|
-
// Ensure registerPlatformAccessories was called at least once
|
|
23
|
-
expect(mockRegister).toHaveBeenCalled();
|
|
24
|
-
// Sum total accessories registered across all calls
|
|
25
|
-
const totalRegistered = mockRegister.mock.calls.reduce((sum, call) => sum + ((call[2] && call[2].length) || 0), 0);
|
|
26
|
-
expect(totalRegistered).toBe(2);
|
|
27
|
-
// Verify PLUGIN_NAME and PLATFORM_NAME were used in the calls
|
|
28
|
-
for (const call of mockRegister.mock.calls) {
|
|
29
|
-
expect(call[0]).toBe(PLUGIN_NAME);
|
|
30
|
-
expect(call[1]).toBe(PLATFORM_NAME);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
it('applies per-device config overrides when deviceId matches discovered device', async () => {
|
|
34
|
-
const mockRegister = vi.fn();
|
|
35
|
-
const api = {
|
|
36
|
-
matter: {
|
|
37
|
-
uuid: { generate: (s) => `uuid-${s}` },
|
|
38
|
-
registerPlatformAccessories: mockRegister,
|
|
39
|
-
clusterNames: { OnOff: 'OnOff', LevelControl: 'LevelControl', ColorControl: 'ColorControl' },
|
|
40
|
-
deviceTypes: { RoboticVacuumCleaner: 'rvc' },
|
|
41
|
-
},
|
|
42
|
-
isMatterAvailable: () => true,
|
|
43
|
-
isMatterEnabled: () => true,
|
|
44
|
-
on: () => { },
|
|
45
|
-
};
|
|
46
|
-
const log = { info: vi.fn(), warn: vi.fn(), debug: vi.fn(), error: vi.fn() };
|
|
47
|
-
const config = {
|
|
48
|
-
options: {
|
|
49
|
-
devices: [{ deviceId: 'dev1', configDeviceName: 'Configured Lamp', logging: 'debug' }],
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
const platform = new SwitchBotMatterPlatform(log, config, api);
|
|
53
|
-
platform.discoveredDevices = [{ deviceId: 'dev1', deviceName: 'Lamp', deviceType: 'Plug' }];
|
|
54
|
-
const seen = [];
|
|
55
|
-
platform.createAccessoryFromDevice = async (dev) => {
|
|
56
|
-
seen.push(dev);
|
|
57
|
-
return {
|
|
58
|
-
displayName: dev.deviceName ?? dev.configDeviceName,
|
|
59
|
-
uuid: api.matter.uuid.generate(dev.deviceId),
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
await platform.registerMatterAccessories();
|
|
63
|
-
// createAccessoryFromDevice should have been called once with merged config
|
|
64
|
-
expect(seen.length).toBe(1);
|
|
65
|
-
expect(seen[0].deviceId).toBe('dev1');
|
|
66
|
-
// per-device config values should be present on the merged device
|
|
67
|
-
expect(seen[0].configDeviceName).toBe('Configured Lamp');
|
|
68
|
-
expect(seen[0].logging).toBe('debug');
|
|
69
|
-
});
|
|
70
|
-
it('ignores config-only devices by default but includes them when allowConfigOnlyDevices=true', async () => {
|
|
71
|
-
const mockRegister = vi.fn();
|
|
72
|
-
const api = {
|
|
73
|
-
matter: {
|
|
74
|
-
uuid: { generate: (s) => `uuid-${s}` },
|
|
75
|
-
registerPlatformAccessories: mockRegister,
|
|
76
|
-
clusterNames: { OnOff: 'OnOff', LevelControl: 'LevelControl', ColorControl: 'ColorControl' },
|
|
77
|
-
deviceTypes: { RoboticVacuumCleaner: 'rvc' },
|
|
78
|
-
},
|
|
79
|
-
isMatterAvailable: () => true,
|
|
80
|
-
isMatterEnabled: () => true,
|
|
81
|
-
on: () => { },
|
|
82
|
-
};
|
|
83
|
-
const log = { info: vi.fn(), warn: vi.fn(), debug: vi.fn(), error: vi.fn() };
|
|
84
|
-
// config-only device (cfg1) and one discovered device (dev1)
|
|
85
|
-
const cfgOnly = { deviceId: 'cfg1', configDeviceName: 'OnlyInConfig', deviceType: 'Plug' };
|
|
86
|
-
const configDefault = { options: { devices: [cfgOnly] } };
|
|
87
|
-
const platformDefault = new SwitchBotMatterPlatform(log, configDefault, api);
|
|
88
|
-
platformDefault.discoveredDevices = [{ deviceId: 'dev1', deviceName: 'Lamp', deviceType: 'Plug' }];
|
|
89
|
-
const seenDefault = [];
|
|
90
|
-
platformDefault.createAccessoryFromDevice = async (dev) => {
|
|
91
|
-
seenDefault.push(dev);
|
|
92
|
-
return {
|
|
93
|
-
displayName: dev.deviceName ?? dev.configDeviceName,
|
|
94
|
-
uuid: api.matter.uuid.generate(dev.deviceId),
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
await platformDefault.registerMatterAccessories();
|
|
98
|
-
// Should only see discovered device (cfg1 ignored)
|
|
99
|
-
expect(seenDefault.find((d) => d.deviceId === 'cfg1')).toBeUndefined();
|
|
100
|
-
// Now opt-in to include config-only devices
|
|
101
|
-
const configOptIn = { options: { devices: [cfgOnly], allowConfigOnlyDevices: true } };
|
|
102
|
-
const platformOptIn = new SwitchBotMatterPlatform(log, configOptIn, api);
|
|
103
|
-
platformOptIn.discoveredDevices = [{ deviceId: 'dev1', deviceName: 'Lamp', deviceType: 'Plug' }];
|
|
104
|
-
const seenOptIn = [];
|
|
105
|
-
platformOptIn.createAccessoryFromDevice = async (dev) => {
|
|
106
|
-
seenOptIn.push(dev);
|
|
107
|
-
return {
|
|
108
|
-
displayName: dev.deviceName ?? dev.configDeviceName,
|
|
109
|
-
uuid: api.matter.uuid.generate(dev.deviceId),
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
await platformOptIn.registerMatterAccessories();
|
|
113
|
-
// Should include the config-only device now
|
|
114
|
-
expect(seenOptIn.find((d) => d.deviceId === 'cfg1')).toBeDefined();
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=platform-matter.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1E,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAClD,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;QAC5B,MAAM,GAAG,GAAQ,WAAW,CAAC;YAC3B,2BAA2B,EAAE,YAAY;YACzC,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE;YAC5F,WAAW,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE;SAC7C,CAAC,CAAA;QAEF,MAAM,GAAG,GAAQ,WAAW,EAAE,CAAA;QAE9B,MAAM,MAAM,GAAQ,EAAE,CAAA;QAEtB,MAAM,QAAQ,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAG7D;QAAC,QAAgB,CAAC,iBAAiB,GAAG;YACrC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;YAC5D,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,E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AC1F,MAAM,aAAa,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,CACvE;QAAC,aAAqB,CAAC,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAQ,CAAA;QACjH,MAAM,SAAS,GAAU,EAAE,CAC1B;QAAC,aAAqB,CAAC,yBAAyB,GAAG,KAAK,EAAE,GAAQ,EAAE,EAAE;YACrE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACnB,OAAO;gBACL,WAAW,EAAE,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,gBAAgB;gBACnD,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;aACtC,CAAA;QACV,CAAC,CAAA;QACD,MAAO,aAAqB,CAAC,yBAAyB,EAAE,CAAA;QACxD,4CAA4C;QAC5C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IACzE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.unregister.test.d.ts","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.unregister.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { SwitchBotMatterPlatform } from '../../platform-matter.js';
|
|
3
|
-
import { makeApiStub, makeLogStub } from '../helpers/platform-fixtures.js';
|
|
4
|
-
describe('removeDisabledAccessories and unregister edge cases', () => {
|
|
5
|
-
it('clears resources and unregisters accessory even with invalid timer and non-MAC deviceId', async () => {
|
|
6
|
-
// Prepare API stub
|
|
7
|
-
const unregister = vi.fn();
|
|
8
|
-
const api = makeApiStub({ unregisterPlatformAccessories: unregister });
|
|
9
|
-
const log = makeLogStub();
|
|
10
|
-
const platform = new SwitchBotMatterPlatform(log, { enableOnOffLight: false }, api);
|
|
11
|
-
// Build a fake serialized accessory matching the generated UUID for OnOff Light
|
|
12
|
-
const uuid = api.matter.uuid.generate('matter-onoff-light');
|
|
13
|
-
const accessory = { uuid, displayName: 'OnOff Light', context: { deviceId: 'NOT-A-MAC' } };
|
|
14
|
-
// Put invalid timer object into refreshTimers to ensure code handles it
|
|
15
|
-
const nid = platform.normalizeDeviceId(accessory.context.deviceId);
|
|
16
|
-
platform.refreshTimers.set(nid, null);
|
|
17
|
-
platform.accessoryInstances.set(nid, { dummy: true });
|
|
18
|
-
platform.matterAccessories.set(uuid, accessory);
|
|
19
|
-
// Spy on clearDeviceResources
|
|
20
|
-
const spyClear = vi.spyOn(platform, 'clearDeviceResources');
|
|
21
|
-
// Call removeDisabledAccessories directly
|
|
22
|
-
await platform.removeDisabledAccessories();
|
|
23
|
-
// Expect unregister was called and matterAccessories cleared
|
|
24
|
-
expect(unregister).toHaveBeenCalled();
|
|
25
|
-
expect(platform.matterAccessories.get(uuid)).toBeUndefined();
|
|
26
|
-
// clearDeviceResources should have been called with the accessory.deviceId
|
|
27
|
-
expect(spyClear).toHaveBeenCalledWith(accessory.context.deviceId);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=platform-matter.unregister.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-matter.unregister.test.js","sourceRoot":"","sources":["../../../src/test/matter/platform-matter.unregister.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,WAAW,EAA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