Integrating Becker Motors in to Hassio

Good morning,

I moved my Smart Home from an older Raspberyy to another hw platform. All worked like a charm, except my becker usb stick that does not work.

I thought, that the pairing is done between the stick and the motor. But then why does the old stick does not control the motor from the new platform? Do I need to re-pair?

Or what else am I missing?

Appreciate any comments!

Best wishes

The important things:

  • enable debug an look if something seems to be wrong
  • reboot :wink:

Hi Rainer,

Are you saying, it should work without retraining?

Will check the log and reboot! Does the USB stick to be present at the time of booting?

Yes, there is no need to retrain, but you need to keep the unit - channel settings the same. The motor stores the id/unit/channel settings of all trained remotes (including the USB stick).
And yes, it’s better to connect the USB stick before boot time. Otherwise receiving of commands might not work. In addition automatic resynchronization been the USB stick and the motors is done after reboot.
Please also use the latest version v.0.2.1, as it has some improvements.

Thanks Rainer!

Worked like a charm, just finalized my move from RPi3 to an Intel platform without any re-configuration.

The key was to reboot WITH the stick already installed!

Thanks a lot and have a great Sunday!

1 Like

Hi @ all,

ich recently installed the custom extension via HACS even after reboot the extension can’t detect the USB-Stick. Here is the log entry of the extension:

Logger: homeassistant.components.cover
Source: custom_components/becker/pybecker/becker_helper.py:178 
Integration: Abdeckung (documentation, issues) 
First occurred: 6. Januar 2023 um 21:59:39 (1 occurrences) 
Last logged: 6. Januar 2023 um 21:59:39

Error while setting up becker platform for cover
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/becker/cover.py", line 105, 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 57, in __init__
    self.communicator = BeckerCommunicator(device_name, callback)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 216, in __init__
    self._connection = BeckerConnection(device=device)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 98, in __init__
    self._device, self._is_serial = self._validate_device(device)
  File "/config/custom_components/becker/pybecker/becker_helper.py", line 178, 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

my yaml looks like this:

cover:
  - platform: becker
    # Optional device path (useful when running from docker container)
    # Default device:
    # "/dev/serial/by-id/usb-BECKER-ANTRIEBE_GmbH_CDC_RS232_v125_Centronic-if00"
    #device: "/dev/beckercentronicusb"
    device: "/dev/serial/by-id/usb-BECKER-ANTRIEBE_GmbH_CDC_RS232_v125_Centronic-if00"
    # Optional database filename (database is stored in HA config folder)
    filename: "centronic-stick.db"
    covers:
      garden:
        friendly_name: "Sonnenschutz Terasse 1"
        # Using Unit 1 - Channel 1
        channel: "1:1"
        # Optional Travel Time to track cover position by time
        # one time is sufficient if up and down travel time is equal
        #travelling_time_up: 30
        # Optional Travel Time for direction down
        #travelling_time_down: 27
        # Optional Remote ID from your Becker Remote, e.g. your master sender (multiple ID's separated by comma are possible)
        # to find out the Remote ID of your Becker Remote enable debug log for becker
        #remote_id: "12345:2"
        
logger:
  default: info
  logs:
    custom_components.hacs: debug
    aiogithubapi: debug

And the console says, that the USB stick is there:

Can anyone see my mistake? I’m stuck here.

Kind Regards
MrIcemanLE

Are you using Docker or VM?
In this case you need to map the device into the container first.

My home assistant instance is running directly on a raspberry pi. Today I found, that path is case sensitive. As you can see my Sick comes with Antriebe and not ANTRIEBE. The same for BECKER. After fixing this there are no more messages in the log.

Unfortunately I cant’t get my master remote into pairing mode. The Receiver doesn’t “clack” when I am pushing the pair button.

I had to hold the pair button on my remote until the clack.

I also adjusted the case on my end when it didn’t work for me. After that, as you can read above, I got the hint that I should do a full reboot and then it worked. Maybe someone can check how the stick is recognized on their device, upper or lower case.

That’s the problem I’m stuck to. Turning off the power of the motor and turning on again makes no difference. I can’t get my master remote in pairing mode. So I can’t start the pairing script.

The pair command for the Becker Integration in Home Assistant represent the command for pressing the remote for 3 Seconds.
After power on, the motor is in pairing mode for 3 minutes. In this mode it will only possible to overwrite the master remote if I’m right.
After pressing the programming button of the master remote for 3 seconds, the motor is in pairing mode for additional remotes. Now run the pair command.
I suggest to read the manual, as there are many options.
German Centronic Motor Manual
English Centronic Motor Manual

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.