diff --git a/CHANGELOG.md b/CHANGELOG.md index 20e8f10a..6ed1a399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Devices - - HMIP-PCBS2 (Switch Circuit Board - 2x channels) + - HMIP-PCBS2 (Switch Circuit Board - 2x channels) + - HMIP-BBL (Blind Actuator for brand switches) - Async implementation of HmIP-PCBS-BAT (Printed Curcuit Board Switch Battery) ## [0.10.7] - 2019-04-09 ### Added - Devices - - HMIP-MIOB (Multi IO Box for floor heating & cooling) + - HMIP-MIOB (Multi IO Box for floor heating & cooling) - API - FunctionalChannels: ANALOG_OUTPUT_CHANNEL, GENERIC_INPUT_CHANNEL - WeatherCondition.STRONG_WIND diff --git a/README.rst b/README.rst index 007fbcd7..ae6b336b 100644 --- a/README.rst +++ b/README.rst @@ -71,7 +71,7 @@ Homematic IP Devices: - [X] HMIP-ASIR, HMIP-ASIR-B1 (Alarm Siren - indoor) - [ ] HMIP-ASIR-O (Alarm Siren - outdoor) -- [ ] HMIP-BBL (Blind Actuator for brand switches) +- [X] HMIP-BBL (Blind Actuator for brand switches) - [X] HMIP-BDT (Dimming Actuator for brand switches) - [X] HMIP-BRC2 (Remote Control for brand switches – 2x channels) - [X] HMIP-BROLL (Shutter Actuator - brand-mount) diff --git a/homematicip/aio/class_maps.py b/homematicip/aio/class_maps.py index b844a96e..84362c8f 100644 --- a/homematicip/aio/class_maps.py +++ b/homematicip/aio/class_maps.py @@ -7,6 +7,7 @@ TYPE_CLASS_MAP = { DeviceType.DEVICE: AsyncDevice, DeviceType.ALARM_SIREN_INDOOR: AsyncAlarmSirenIndoor, + DeviceType.BRAND_BLIND:AsyncBrandBlind, DeviceType.BRAND_DIMMER: AsyncBrandDimmer, DeviceType.BRAND_SHUTTER: AsyncFullFlushShutter, DeviceType.BRAND_PUSH_BUTTON: AsyncBrandPushButton, diff --git a/homematicip/aio/device.py b/homematicip/aio/device.py index 71b96b48..0ecfc710 100644 --- a/homematicip/aio/device.py +++ b/homematicip/aio/device.py @@ -270,6 +270,8 @@ async def set_slats_level(self, slatsLevel=0.0, shutterLevel=None): *super().set_slats_level(slatsLevel, shutterLevel) ) +class AsyncBrandBlind(BrandBlind, AsyncFullFlushBlind): + """ HMIP-BBL (Blind Actuator for brand switches) """ class AsyncDimmer(Dimmer, AsyncDevice): """Base dimmer device class""" diff --git a/homematicip/base/enums.py b/homematicip/base/enums.py index dd6e1c55..94fe526a 100644 --- a/homematicip/base/enums.py +++ b/homematicip/base/enums.py @@ -182,6 +182,7 @@ class ClientType(AutoNameEnum): class DeviceType(AutoNameEnum): DEVICE = auto() ALARM_SIREN_INDOOR = auto() + BRAND_BLIND = auto() BRAND_DIMMER = auto() BRAND_PUSH_BUTTON = auto() BRAND_SHUTTER = auto() diff --git a/homematicip/class_maps.py b/homematicip/class_maps.py index a6a2d331..279784c0 100644 --- a/homematicip/class_maps.py +++ b/homematicip/class_maps.py @@ -13,6 +13,7 @@ TYPE_CLASS_MAP = { DeviceType.DEVICE: Device, DeviceType.ALARM_SIREN_INDOOR: AlarmSirenIndoor, + DeviceType.BRAND_BLIND: BrandBlind, DeviceType.BRAND_DIMMER: BrandDimmer, DeviceType.BRAND_PUSH_BUTTON: BrandPushButton, DeviceType.BRAND_SHUTTER: FullFlushShutter, diff --git a/homematicip/device.py b/homematicip/device.py index d0a7972f..9cfb6ed2 100644 --- a/homematicip/device.py +++ b/homematicip/device.py @@ -1015,6 +1015,8 @@ def __str__(self): super().__str__(), self.slatsLevel, self.blindModeActive ) +class BrandBlind(FullFlushBlind): + """ HMIP-BBL (Blind Actuator for brand switches) """ class LightSensor(Device): """ HMIP-SLO (Light Sensor outdoor) """ diff --git a/homematicip_demo/json_data/home.json b/homematicip_demo/json_data/home.json index 8fe4a71b..87b0d37d 100644 --- a/homematicip_demo/json_data/home.json +++ b/homematicip_demo/json_data/home.json @@ -8,6 +8,71 @@ } }, "devices": { + "3014F71100000000000BBL24": { + "availableFirmwareVersion": "1.6.2", + "firmwareVersion": "1.6.2", + "firmwareVersionInteger": 67074, + "functionalChannels": { + "0": { + "configPending": false, + "deviceId": "3014F71100000000000BBL24", + "dutyCycle": false, + "functionalChannelType": "DEVICE_BASE", + "groupIndex": 0, + "groups": [ + "00000000-0000-0000-0000-000000000034" + ], + "index": 0, + "label": "", + "lowBat": null, + "routerModuleEnabled": false, + "routerModuleSupported": false, + "rssiDeviceValue": -64, + "rssiPeerValue": -76, + "unreach": false + }, + "1": { + "blindModeActive": true, + "bottomToTopReferenceTime": 54.88, + "changeOverDelay": 0.5, + "delayCompensationValue": 12.7, + "deviceId": "3014F71100000000000BBL24", + "endpositionAutoDetectionEnabled": true, + "functionalChannelType": "BLIND_CHANNEL", + "groupIndex": 1, + "groups": [ + ], + "index": 1, + "label": "", + "previousShutterLevel": null, + "previousSlatsLevel": null, + "processing": false, + "profileMode": "AUTOMATIC", + "selfCalibrationInProgress": null, + "shutterLevel": 0.885, + "slatsLevel": 1.0, + "slatsReferenceTime": 1.6, + "supportingDelayCompensation": true, + "supportingEndpositionAutoDetection": true, + "supportingSelfCalibration": true, + "topToBottomReferenceTime": 53.68, + "userDesiredProfileMode": "MANUAL" + } + }, + "homeId": "00000000-0000-0000-0000-000000000001", + "id": "3014F71100000000000BBL24", + "label": "Jalousie Schiebet\u00fcr", + "lastStatusUpdate": 1558464454532, + "liveUpdateState": "LIVE_UPDATE_NOT_SUPPORTED", + "manufacturerCode": 1, + "modelId": 332, + "modelType": "HmIP-BBL", + "oem": "eQ-3", + "permanentlyReachable": true, + "serializedGlobalTradeItemNumber": "3014F7110000000000000024", + "type": "BRAND_BLIND", + "updateState": "UP_TO_DATE" + }, "3014F7110000000000BCBB11": { "availableFirmwareVersion": "0.0.0", "firmwareVersion": "1.10.10", diff --git a/tests/test_devices.py b/tests/test_devices.py index 515fa7ac..188a7c5d 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -881,6 +881,18 @@ def test_full_flush_blind(fake_home: Home): "slatsLevel(0.8) blindModeActive(True)" ) +def test_brand_blind(fake_home:Home): + with no_ssl_verification(): + d = BrandBlind(fake_home._connection) + d = fake_home.search_device_by_id("3014F71100000000000BBL24") + assert isinstance(d, BrandBlind) + + assert str(d) == ( + "HmIP-BBL Jalousie Schiebetür lowbat(None) unreach(False) " + "rssiDeviceValue(-64) rssiPeerValue(-76) configPending(False) " + "dutyCycle(False) shutterLevel(0.885) topToBottom(53.68) bottomToTop(54.88) " + "slatsLevel(1.0) blindModeActive(True)" +) def test_alarm_siren_indoor(fake_home: Home): with no_ssl_verification():