Rademacher DuoFern

I am stuck. I added the entries to the config, added the custom components like in https://github.com/dhzl84/Home-Assistant-Configuration but it always complains:

2019-02-14 19:37:00 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.cover.duofern. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 117, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/cover/duofern.py", line 14, in <module>
    from pyduofern.duofern_stick import DuofernStickThreaded
ModuleNotFoundError: No module named 'pyduofern'

This is hass.io.

Any advice?

It somehow started working after installing the pip module manually in the homeassistant container. But this should not be the normal way, right?

Hi, this should not be necessary. Which custom_component did you use? The original from @gluap or mine.

Uhm. The original? Where is yours? :blush:

I made a fork of gluaps repository to add a hass.io addon for pairing (instead of using CLI) but now that we are talking about, this fork relation somehow got lost on GitHub …

I see that gluaps custom_component installs a specific version (0.23.2) of pyduofern via REQUIREMENTS = ['pyduofern==0.23.2'] in duofern.py.
Meanwhile he release version 0.23.4 of the pyduofern package but I can’t tell if this is causing any issues.

Ok cool. Thanks.

At least we wrote it here for future reference :slight_smile:

Hey guys, anyone else having issues with 0.89?
Setup of duofern fails since then.


EDIT: Got it working, see referenced GitHub issue.

Hi, I’m new to this thread and I would like to say thank you first for creating this component. I was using FHEM + MQTT as a bridge for a while, but this one is much better.

Yesterday I tried to move to this component and set it up like described here: https://github.com/gluap/pyduofern/tree/master/examples and after fiddling around I got working with hass.io - almost.

Almost because I can not control any roller shutter. Pairing worked well, all roller shutter actors appeared in HA, if I control a roller shutter via remote control I receive the updated position and open/close status in HA as well.

Only controlling via HA does not work. I already enabled debug log for the component and it looks like messages are send:

2019-03-14 14:17:16 DEBUG (SyncWorker_13) [/config/deps/lib/python3.7/site-packages/pyduofern/duofern_stick.py] sending 0D01070300000000000000000000006fdeda42597a00
2019-03-14 14:17:16 DEBUG (SyncWorker_13) [/config/deps/lib/python3.7/site-packages/pyduofern/duofern_stick.py] added 0D01070300000000000000000000006fdeda42597a00 to write queue
2019-03-14 14:17:16 INFO (Thread-3) [/config/deps/lib/python3.7/site-packages/pyduofern/duofern_stick.py] sending 0D01070300000000000000000000006fdeda42597a00 from write queue, 0 msgs left in queue
2019-03-14 14:17:16 DEBUG (Thread-3) [/config/deps/lib/python3.7/site-packages/pyduofern/duofern_stick.py] writing  0D01070300000000000000000000006fdeda42597a00
2019-03-14 14:17:18 DEBUG (Thread-3) [/config/deps/lib/python3.7/site-packages/pyduofern/duofern_stick.py] writing  81000000000000000000000000000000000000000000

But the roller shutters don’t move. Any idea?

Never mind I got it working using the same network code I used in the FHEM setup.

@ gluap, Paul

The have changed the directory structure of custom components beginning with HA 0.88.

See blog post: https://developers.home-assistant.io/blog/2019/02/19/the-great-migration.html

Duofern is still working but needs to be modified to work with the new structure.

I have made the modification as suggested in the log and it is working as expected.

Are there any further modifications need to be done?

Could you please help and have a look at the issue?

2019-03-23 20:29:36 WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change cover/duofern.py to duofern/cover.py. This will stop working soon.

Hey Tom, when did you setup/update your DuoFern custom component?

It seems your proposed change already exists in his GitHub repository: https://github.com/gluap/pyduofern/tree/master/examples/homeassistant/custom_components/duofern

eXtatic you are right. I have installed it long time ago short after Paul has released the component.
After that I have done one or two updates. Since I haven’t looked in the repository for any updates again because the component was working without issues for me. This warning get my attention after I upgraded home assistant from 84.7 to 90.1. I had to modify some things due to breaking changes in the newer version so everything is working as expected again.

After installing pyduofern-0.25 the cover isn’t detected anymore :frowning:

Successfully installed pyduofern-0.25

Error while setting up platform duofern

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/haadmin/.homeassistant/custom_components/duofern/cover.py", line 19, in setup_platform
    stick = hass.data[DOMAIN]['stick']
KeyError: 'duofern'

I have also replaced my old custom component files with the new files from github:


What’s wrong? What must I do that the component is working again?

Sorry, got it working. It is always good to read the documentation. :slight_smile: My configuration of the duofern component was wrong in my configuration.yaml file. The old configuration with “cover” did not work anymore. I have to use “duofern” instead.

edit 14/09/2019: can’t answer below my own post, so I have to edit this one.

After switching from homeassistant to hassio and docker I have the same problem again.

I can’t use the friendly name I have set after pairing.

In my .duofern.json

The following devices are configured:
id: 61474b    name: schlafzimmer
id: 614730    name: wohnzimmer_klein
id: 61474c    name: wohnzimmer_gross

If I use cover.wohnzimmer_klein or cover.wohnzimmer_gross I got
“Entität nicht verfügbar / Entity not available.”

Strange. Why?

But cover.schlafzimmer is working.

If I use the id it is working.

cover.614730 and cover.61474c

Used on card view in lovelace-ui.yaml

 - type: entities
        title: Wohnzimmer
        show_header_toggle: true
            - cover.614730
            - climate.wt_heizung_wohnzimmer
            - cover.61474c
            - climate.heizung_wohnzimmer
- type: entities
       title: Schlafzimmer
       show_header_toggle: true
           - climate.heizung_schlafzimmer
           - cover.schlafzimmer

Has anyone an idea what is wrong with the config?

I think you can safely update to the new firmware. Here’s a tutorial on how to use it in Home Assistant: Rademacher Homepilot in Home Assistant
Would still be nice to have this supported natively.

So this sounds like a possible solution to integrate RolloTron rollershutter via DuoFern into Home Assistant, right?

I‘m completely new to the Smart Home and especially Home Assistant game but my first priority is to automate rollershutters with tightener systems without needing to use expensive vendor bridges.

I only found one article where someone managed to get it work on FHEM. So I‘m glad to discover this topic here, maybe things are possible! :slight_smile:

I tried to figure out what components are actually needed. Can someone please point me in the right direction:

  1. Rademacher Rollershutter e. g. RolloTron Comfort DuoFern 1800-UW (https://www.amazon.de/dp/B0085IEK7S)
  2. USB sender on 434,5 MHz (no idea which one is suitable, what range can be expected and if the signal interferes with ZigBee stick next to it) attached to Home Assistant server. The one mentioned in this topic (https://www.amazon.de/Rademacher-USB-Stick-7000-00-93/dp/B00IZAGLSM) seems to not be available any longer :frowning:
  3. Most difficult part: software integration part (this topic). Is it possible to do for a newbie (with a bit of technical skills and motivation but without programming skills)?

I try to go through the rest of this topic but maybe someone can give me a kick start on this first smart home project.

Update: I really digged through all the information currently available on this.

It looks like the most convenient way to get @gluap´s great work going when using HASS OS is to use the HACS integration (currently only by setting it as a custom repository, not yet in the official repo).

  1. First implementation (basis):
    pure Python - https://github.com/gluap/pyduofern
  2. Second implementation for HASS OS users:
    using custom component - https://github.com/gluap/pyduofern/tree/master/examples
  3. Third implementation for HASS OS users (kinda same like #2):
    using custom component - forked and archived https://github.com/dhzl84/pyduofern#setup-custom-component
  4. Latest implementation approach for HASS OS users:
    HACS integration https://github.com/gluap/pyduofern-hacs

It would be great to have an update on the current plans by @gluap and all other HASS OS users having implemented it on how it works on a long-term view.

All that information makes me feel quite confident to finally get one of those rarely available DuoFern USB sticks (70000093) now.

@e-raser Incidentally today I updated the HACS integration adding a config flow dialog for setting up the stick (or rather making it visible). I’m a bit hesitant getting it into the official HACS repo, as the prerequisites are not entirely clear to me, especially two steps:

Check Brands: will require me to upload a brand logo to the brands repository – I don’t own neither the name nor the logo of duofern and so don’t think I’m legally permitted to submit these.

Check Wheels: Will require me to add the required packages to a home-assistant “wheels-custom-integrations” repository. While I am not opposed to it, it is unclear to me why it is required.

I guess with enough digging I could answer at least #2 or even both but din’t quickly find them so decided that “add custom repo in HACS” isn’t that big a hurdle for adopters.

Wow, thanks for the view behind the scenes. We users simply are not aware of those many tasks needed to finish for developers. I feel sorry to be not helpful in any way :frowning:

For the copyright thing (#1): there are a lot of addons/custom integrations especially of the community using brand elements. I use ShellyForHass from HACS which uses the official Shelly logo (as does the official integration), for sure there are many others too. I would hesitate too in such copyright topics but all the other devs seem to have found a way. Shouldn’t there be guiding material for maintainers?

For me adding a custom repo in HACS is no big thing, I have fears of everything needed to be done after that easy thing :slight_smile: DuoFern stick is ordered and on the way, hope to continue next weekend and I‘ll go with the HACS way, as obviously the most convenient. As few users proved (in this topic) even on HASS OS it’s possible, I just hope to not spend hours or even days to integrate my first Rademacher roller shutter device.

Big thanks again for porting the FHEM base to Home Assistant, you guys rock! :love_you_gesture:t3::smiley:

@gluap Have a look how the Schellenberg community worked on this (freshly released an addon), maybe you get an inspiration related to brands topic: