Integrating Becker Motors in to Hassio

Are you using the latest release v.0.2.2? I had some pairing issues with Roto shutters in the previous versions.

Hi Rainer,

Iā€™m running the version 0.2.2 and I also read the manual. When I turn off the power and turn it on again. Then I press and hold the pairing button on the master remote (and hold it ā€¦ and hold it ā€¦ and hold it) but no ā€œclackā€ of the motors to signal the pairing mode on the motor side. And according to the manual the display should say, that the settings are being transferred. But thatā€™s not the case.

My Setup is:
Remote: SWC745-II
Receiver: VC470-II
Sun/Wind: SC861

I think Iā€™ll dive into the manuals of the Sun/Wind and/or the receiver to get more information

Hi guys,
This plugin is really great however I struggle with getting it up and running with (latest) home assistant anf RPy. I successfully managed to get it paired and working under native MacOS. When switching over to hassio nothing is working which makes me think that I might need to unpair it and pair it under hassio services. The code even has the option, which is however not exposed to optArgs. When running it from RPy terminal I also recognized that the serial module requires installation. Does anyone have experience with cross platforms and pair/unpair? The debug verbosity tells me that run_codes gets executed.
Thanks a lot
Wolfgang

There is no need to re-pair if you used pypecker or centronic.py. BUT you loose the database when switching between devices. If you use this integration, the database will be re-build for all configured units.
Have a look at the Readme and enable debug in case there are still any issues.

Hi all,
I am also trying to add my becker motors into HomeAssistant.

I am running HA with Docker. The integration is installed via HACS (v0.3.0).
Installation steps are followed. Stick can be seen but not in HA.
I did add the following in HA configuration.yaml

cover:
  - platform: becker
    device: "/dev/serial/by-id/usb-BECKER-ANTRIEBE_GmbH_CDC_RS232_v125_Centronic-if00"
    #device: "/dev/becker"
    # Optional database filename (database is stored in HA config folder)
    filename: "centronic-stick.db"    
    covers:
      # Use unique names for each cover like kitchen, bedroom or living_room
      kitchen:
        friendly_name: "Kitchen Cover"
        # Becker Centronic USB stick provides up to five units (1-5) with up to seven (1-7) channels
        # Unit 1 - Channel 1
        channel: "1"

But after a reboot of HA nothing is getting visible in HA yet. Should there be something visible already after following the four installation steps?

When I go to Integrations then do Add Integration and search for becker it finds Becker but when I click on it it is telling me that the device can not be added from the UI and should be done in the ā€˜configuration.yamlā€™ but there is already the above code. I have not paired any cover yet.

Additional note: I have just followed the four installation steps. I have not been fiddling around with pybecker or centronics.py. Have I missed some steps?

Anyone who can get me on track because I am a bit lost nowā€¦ and you could call me a noob too.

Thanks for your help.

When you use docker you first need to map the USB stick into yor HA docker container.
The device path in configuration.yaml must match the path of the USB stick you mapped into the docker container.
Have a look into your home-assistant.log file if you see any errors related to becker.
If everything is OK, you should now have your cover available in. In your example the name of the entity will be cover.kitchen_cover.
Now enable debug for becker, press the halt key on your remote, open your home-assistant.log, search for Received packet: unit_id and add the following code as remote_id into the configuration.yaml.
Also add the travel_time of your cover to properly track the position.
Now you need to pair your cover with the Becker USB stick. Use the same unit and channel settings from your Becker cover configuration in configuration.yaml.
Thatā€™s it :wink:

1 Like

Yes, I got it working.

But now the sad thing, my Pi crashed and I donā€™t know what caused it. Had to take the power off to get it back alive again. Now my Pi is running again but my HA Docker container will not start. I get the message Request failed with status code 500 which avoids my HA container to start.

I have no backup yet with paired motors, but I can copy the centronic-stick.db and configuration.yaml.

When I restore with my backup do I then need to pair the motors again? Or is it sufficient to copy the centronic-stick.db and configuration.yaml when the backup is running?

And just to be sure, I assume I can tweak the configuration afterwards so not required prior to pairing?

Like said, I am very new on all this and still learning a lot but also insecure on some steps afraid to mess up.

I can see the packet in the trace however the shade is not moving. No error messages.
My configuration:

cover:
  - platform: becker
    device: "/dev/serial/by-id/usb-Becker-Antriebe_GmbH_CDC_RS232_v125_Centronic-if00"
    filename: "centronic-stick.db"
    covers:
      terrasse:
        friendly_name: "shade sail"
        channel: "1"
        #travelling_time_up: 30
        remote_id: "1737B"

The log:

2023-02-10 19:45:45.595 DEBUG (Thread-3) [custom_components.becker.pybecker.becker_helper] Sent packet: unit_id: 1737B, channel: 1, command: HALT, argument: 0, packet: b'\x020000000002010B008A0000001737B021010100103A\x03'
2023-02-10 19:45:46.981 DEBUG (MainThread) [custom_components.becker.cover] shade sail is travelling from position 50 to 0 in 0.0 seconds
2023-02-10 19:45:46.981 DEBUG (MainThread) [custom_components.becker.cover] shade sail update ha-state now
2023-02-10 19:45:46.994 DEBUG (Thread-3) [custom_components.becker.pybecker.becker_helper] Sent packet: unit_id: 1737B, channel: 1, command: DOWN, argument: 0, packet: b'\x020000000002010B008B0000001737B0210101004009\x03'
2023-02-10 19:45:57.132 DEBUG (MainThread) [custom_components.becker.cover] shade sail stopped at position 50
2023-02-10 19:45:57.132 DEBUG (MainThread) [custom_components.becker.cover] shade sail update ha-state now
2023-02-10 19:45:57.148 DEBUG (Thread-3) [custom_components.becker.pybecker.becker_helper] Sent packet: unit_id: 1737B, channel: 1, command: HALT, argument: 0, packet: b'\x020000000002010B008C0000001737B0210101001038\x03'

I guess there is no handshake between stick and the motor and there would not be any error message as soon as the packet is sent over RF. Not sure if itā€™s the RF distance but I could control it with the MacBook from where I placed the RPi now. Can ignore the 0.0 seconds travelling time in the log?

Thanks a lot!
Wolfgang

Yes, there is no feedback from the motor.
You have not set travel time, therefore itā€™s 0. I recommend to set the correct travel time.

Some things to try:

  • Reboot Home Assistant
  • Are you using the right unit and channel?
  • A USB extension cable (1-2m length) is a good thing to improve the RF distance. This allows to place the stick away from any disturbances like the Raspberry Pi itself.
  • Move the Raspberry Pi closer to the cover to exclude any RF distance issues
  • Press at least 10 times the cover stop button within a few seconds in Home Assistant. Sending multiple commands within a short time will re-synchronize the USB stick with the motor.
  • Pair the USB stick again

Hope this helps.

No worries. Thereā€™s no need to restore the db. Theoretically everything will be restored once you add your Becker configuration again.
If the covers are not responding press at least 10 times the cover stop button within a few seconds in Home Assistant. Sending multiple commands within a short time will re-synchronize the USB stick with the motor.

1 Like

Thanks for taking my worries away. Got it all back up and running again.

Even more thanks for this HA Becker motor integration to you and all the others who made it possible.
I had a very poor solution for controlling one cover and now I can control all my covers.

Hello!

I have an issue with pairing.
Everytime I try to call the service becker.pair an error appears: Failed to call service becker.pair. Unknown error.

Log shows this:

2023-05-05 22:35:53.249 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140605042462432] Error handling message: Unknown error (unknown_error) Martin from 192.168.1.169 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 647, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1533, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 410, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 454, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 477, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/becker/rf_device.py", line 73, in handle_pair
    await cls.becker.pair(f"{unit}:{channel}")
AttributeError: 'NoneType' object has no attribute 'pair'

Hope anyone can help me.

Reboot Home Assistant after you plugged in the USB stick and after you change something in your config YAML file.

Are there any other errors in the log related to Becker after reboot?

Enable Debug for Becker, see Readme for instructions.

Try GO TO YAML MODE and select FILL EXAMPLE DATA and change the unit and channel setting according to your needs.

Yeah, thereā€™s an issue:

2023-05-05 23:05:45.915 ERROR (MainThread) [homeassistant.components.cover] Error while setting up becker platform for cover
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/becker/cover.py", line 108, in async_setup_platform
    PyBecker.setup(hass, device=device, filename=filename)
  File "/config/custom_components/becker/rf_device.py", line 58, in setup
    cls.becker = Becker(device_name=device, init_dummy=False, db_filename=filename, callback=callback)
  File "/config/custom_components/becker/pybecker/becker.py", line 58, in __init__
    self.communicator = BeckerCommunicator(device_name, callback)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 217, in __init__
    self._connection = BeckerConnection(device=device)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 99, in __init__
    self._device, self._is_serial = self._validate_device(device)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 179, in _validate_device
    raise BeckerConnectionError("{} is not existing".format(device))
custom_components.becker.pybecker.becker_helper.BeckerConnectionError: /dev/serial/by-id/usb-BECKER-ANTRIEBE_GmbH_CDC_RS232_v125_Centronic-if00 is not existing

Seems itā€™s not getting the stick. But it exists:

Untitled

Case Sensitive issue?

usb-BECKER-ANTRIEBE_GmbH_CDC_RS232_v125_Centronic-if00
vs
usb_Becker-Antriebe_GmbH_CDC_RS232_v125_Centronic-if00

Correct.

The older USB stick used to be uppercase for BECKER-ANTRIEBE. Thatā€™s the default for the Becker integration.
You can add device to your configuration to fix this.

cover:
  - platform: becker
    device: "Add the correct path here"

USB Stick handling would be a good thing to improve in a next revision.

Thanks a lot Sir, it finally worked.
One small question remaining: How can I add 2 remotes in the configuration.yaml?
With:
remote_id: "12345:2", "23456:2"
?

Both IDs in one string should work

remote_id: "12345:2, 23456:2"

Yeah, that works. Thanks a lot.

Do you have anything where I can contribute?

Hi Rainer and thanks for the integrationā€¦ itā€™s awesome and worked like a charm with the Becker usb stick.

I have a question/issue: today I have programmed 5 shutters one by one (they work) and as 6th channel the ā€œall groupā€ (for example night zone). It works and it open/close all shutters together.
In Home Assistant I have the correct feedback as status/position (open/close 0-100) ONLY if I use the original Becker remote. If I close/open by ā€œnight zoneā€ virtual coverā€¦ shutters start to move correctly but each shutter status doesnā€™t change. I have the correct feedback only for the single virtual cover.
Have I made a mistake during configuration or is it normal? In this situation, do I have to update each single status ā€œmanuallyā€ according to the ā€œglobal virtualā€ status?

Thanks, Lucio