Skip to content

Conversation

@DerDreschner
Copy link
Contributor

This pull request includes various enhancements and fixes for the Bosch BMCT-SLZ (Light/shutter control unit II).

Here is a list of the changes I made and the reasons behind them:

  • Decouple switch from output: In the last firmware updates, Bosch included the possibility to decouple the switch from the output. This means that the output state doesn't change when the switch is being used. I offer the same options as the Bosch app does, which means that the decoupled and only_short_press_decoupled options are not available when using the device for shutter control.
  • Switch state report: The BMCT-SLZ reports any switch changes as a command to the coordinator. Unfortunately, there is no real separation between the inputs as Bosch uses the same command for both. This results in only one action attribute with several states depending on the used switch type, the input and what happened lastly. If there are any suggestions on how I can improve that situation, I'm open for comments!
  • Automatic turn-off in light mode: When using the BMCT-SLZ via the Bosch app, you can automatically turn off each light. This is based on a time schedule for regular changes (which are being stored and executed on the Bosch SHC) as well as two separate attributes on the BMCT-SLZ itself for more short-term changes. The latter is being supported by this pull request. To use it, it's necessary to set the desired amount of time to disable the light as well as enable the feature. If the light is already on when enabling the feature, the internal counter starts from that moment. Otherwise, it's counted from the moment the light is turned on.
  • Reset the used energy reading: Bosch provides a custom command to reset the internal energy meter. This pull request enables the use of that command via Z2M as older firmware versions may have an error which leads to abnormal energy readings (see Bosch Light / Shutter control II: Wrong conversion or unit for Power Monitoring  #9768 for example). By resetting the internal energy meter, at least the abnormal energy reading is gone.
  • Reduce the minimum change value for seMetering and haElectricalMeasurement to 1: By default, the electricityMeter function uses a minimum change for the seMetering and haElectricalMeasurement clusters of 5. As lights may use very little energy, this may be a bit high. Therefore, I change the minimum change value to 1 as that fits the use case better, in my opinion (and the Bosch SHC uses it as well).
  • Fix for periodic rejoin requests: During development on this pull request, I realized the LED is blinking in regular intervals even without any change from my side. I digged into that phenomenon and found out that the BMCT-SLZ is under the impression it falls off the network every 10 minutes. The reason is an unanswered zclVersion read from the BMCT-SLZ to the coordinator. As Z2M uses the reported zclVersion from the device, this information isn't available during the interview stage, which explains why the request isn't answered at all. To mitigate that, I created a customReadResponse function and mimicked the answer from the Bosch Smart Home Controller II.
  • Fix for unreliable on/off updates in light mode: The on_off state for both light outputs wasn't updated reliably. I fixed that by using the force_multiendpoint version of the on_off converter.
  • Inclusion of none as switch type: Bosch officially supports the use of the BMCT-SLZ without any switch connected to it. This wasn't possible with Z2M up until now as the required value couldn't be set as switch type.
  • Fix for some attributes not being read by default: I discovered that not all attributes are being read during the configuration stage. As it's quite irritating when options are in such an "undefined" state, I included them in the configure function. Since I was already there, I also split the configurations into separate functions to make it clear what is being used for which mode (light or shutter). Unfortunately, there is no possibility to trigger a reconfiguration programmatically when setting the deviceMode. In that case, we wouldn't have attributes in the state that don't fit into the selected deviceMode. This was the initial reason I did the separation in the first place (until I realized that it was not possible) to be honest.
  • Inclusion of newly discovered attributes: During development, I also used the Bosch app to use the device for shutter control. As I don't have any shutters to connect to the BMCT-SLZ, I didn't want to make any real change here. But I tried to document any findings and guesses in the code for someone else to continue as I have to return the devices now.

This (partially) fixes #9129 and #9768.

@Koenkk Koenkk merged commit 2902e7c into Koenkk:master Aug 27, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Aug 27, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Bosch Light/Shutter Control II, Dimmer and Relay decoupled mode

2 participants