A custom Home Assistant integration for Rademacher DuoFern roller shutters via the DuoFern USB stick (model 7000). If anyone has model 9000 please let me know if you experience troubles.
This integration communicates directly with the DuoFern USB stick using the native serial protocol — no cloud, no additional gateway, fully local.
| Device Type | Code | Description |
|---|---|---|
| RolloTron Standard | 0x40 | Roller shutter actuator |
| RolloTron Comfort | 0x41 | Roller shutter actuator (comfort) |
| RolloTron Pro | 0x42 | Roller shutter actuator (pro) |
| Additional types | 0x47, 0x49, 0x4B, 0x4C, 0x4E, 0x61, 0x70 | Various shutter actuators |
USB Stick: Rademacher DuoFern USB-Stick (VID: 0x0403, PID: 0x6001)
- Open / Close / Stop / Set Position for roller shutters
- Real-time position reporting (push-based, no polling)
- USB auto-discovery
- Config flow with 2-step setup (connection + device registration)
- Options flow for adding/removing devices after setup
- Standalone CLI tools for testing and device pairing
- Open HACS (HomeAssistant Custom Solution) in Home Assistant
- Click the three dots menu (top right) and select Custom repositories
- Add
https://github.com/MSchenkl/homeassistant-duofernwith category Integration - Search for "Rademacher DuoFern" and install
- Restart Home Assistant
- Copy the
custom_components/duofern/folder to your Home Assistant config directory:/config/custom_components/duofern/ - Restart Home Assistant
Go to Settings > Devices & Services > Add Integration > DuoFern
- Serial Port: Select your DuoFern USB stick (e.g.,
/dev/ttyUSB0) - System Code: The 6-digit hex code of your USB stick (starts with
6F, e.g.,6F1A2B). This is the dongle serial number, found in your previous FHEM config or on the stick itself.
Enter the 6-digit hex codes of your paired DuoFern devices, separated by commas:
e.g. 406B2D, 4090AE, 40B690,
These are the device codes from your previous FHEM configuration.
Go to Settings > Devices & Services > DuoFern > Configure to add or remove device codes at any time. The integration will reload automatically.
The tools/ directory contains standalone Python scripts for testing and device management without Home Assistant.
pip install pyserial pyserial-asyncio-fastHAOS (Home Assistant OS) Note: On HAOS the system Python is externally managed. You need to run:
apk add py3-pip pip install --break-system-packages pyserial-asyncio-fastThis is only needed for the CLI tools. The integration itself installs dependencies automatically via
manifest.json.
Control roller shutters directly from the command line:
python3 tools/test_duofern.py 4053B8 up # Open one shutter
python3 tools/test_duofern.py 4053B8 down # Close one shutter
python3 tools/test_duofern.py 4053B8 stop # Stop one shutter
python3 tools/test_duofern.py 4053B8 position 50 # Set one to 50%
python3 tools/test_duofern.py 4053B8 status # Status of one device
python3 tools/test_duofern.py up # Open ALL shutters
python3 tools/test_duofern.py down # Close ALL shutters
python3 tools/test_duofern.py position 50 # Set ALL to 50%
python3 tools/test_duofern.py status # Status of ALL devices
python3 tools/test_duofern.py statusall # Broadcast status requestPair and unpair DuoFern devices without FHEM:
python3 tools/pair_duofern.py pair # Start pairing (60s window)
python3 tools/pair_duofern.py unpair # Start unpairing
python3 tools/pair_duofern.py list # List all devices with status
python3 tools/pair_duofern.py pair --timeout 120 -v # Extended timeout + debugImportant: The HA integration must be disabled while using CLI tools, as only one process can access the serial port at a time.
This integration implements the DuoFern serial protocol from scratch:
- Frame format: Fixed 22-byte (44 hex char) frames over UART at 115200 baud
- Init sequence: 7-step handshake (Init1, Init2, SetDongle, Init3, SetPairs, InitEnd, StatusBroadcast)
- ACK-gated send queue: One command in-flight at a time with 5-second timeout
- Push-based status: Devices report status changes proactively
- Position convention: DuoFern uses 0=open/100=closed, Home Assistant uses 0=closed/100=open (converted transparently)
Protocol implementation based on analysis of FHEM modules 10_DUOFERNSTICK.pm and 30_DUOFERN.pm.
- Note your system code and device codes from your old configuration
- Install this integration and enter the codes during setup
- Device pairing is preserved in the USB stick — no re-pairing needed
- For new devices, you can always use
pair_duofern.py
MIT License - see LICENSE for details.