it looks really complicated for me. There are not so many users, who do use the “very-open” HA and the “very-closed” Rademacher DuoFern together.
I’m using DuoFern radio-controlled rollershutter together with a “Rademacher Homepilot 2”.
With a HomePilot and HA you can use HTTP Requests like
# Homepilot Rollershutter cover: - platform: command_line covers: arbeitszimmerseite: command_open: "/usr/bin/curl -X GET \"http://192.168.178.23/deviceajax.do?cid=9&did=10002&goto=0&command=1\"" command_close: "/usr/bin/curl -X GET \"http://192.168.178.23/deviceajax.do?cid=9&did=10002&goto=80&command=1\"" command_stop: "/usr/bin/curl -X GET \"http://192.168.178.23/deviceajax.do?cid=2&did=10002&command=1\"" friendly_name: Arbeitszimmer Seite
in your configuration.yaml.
Not perfect, but it works.
thank you for info, last days i had time to test - with the “command line tools” it is working!
Do you also have experience with the “DuoFern Umweltsensor 9475”?
No, sorry. But for the beginning you can try
http://192.168.1xx.xx/deviceajax.do?sensors (change IP to your Homepilot)
in your browser and format the answer to json. Can you see any values here?
yesss! i can see my sensors “Umweltsensor” and “Handsender”… then i will try it with the component “Command Line Sensor” next free time…
I recently ported some of the FHEM code to python to get my Duofern rollershutters to work with HomeAssistant and a USB Duofern stick. Currently the python module lives as pyudofern on github.
Since I did not find the time to polish it sufficently to submit to homeassistant one still needs to put custom component code into the conf dir to get it working with homeassistant. Homeassistant-specific documentation can be found in the examples folder of the git repo. Before getting it to work with homeassistant one needs to pair devices via the command line interface (described on the main github page).
Since I have no remotes, no Homepilot and or “Umweltsensor” type devices for testing, I wasn’t able to port support for these yet. However, Rollershutter support is solid and also reports the current opening percentage as sent by the device when operated manually. Thanks to a borrowed switch device I was also able to add rudimentary
light support for the remote-controlled duofern switches.
Feel free to open an issue or a pull request on the repo if you find documentation or implementation is lacking. I initially wrote it only for myself and then added some documentation when my father asked to run a copy, so documentation may be a bit on the thin side.
I am currently working on asyncio support and plan to push to pypi in once I’m done. Doing so is a required step for official integration into homeassistant according to the dev manuals. If I ever go around to do that.
I had no greater problems with the documentation. The integration runs great for my Rollershuters and I configured all automation I need.
Thanx a lot
I have a problem with the custom_component. I installed it in a virtual environment and get the following error on HA startup:
2018-04-19 20:16:18 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.cover.duofern. Make sure all dependencies are installed
Traceback (most recent call last):
File “/opt/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/cover/duofern.py”, line 14, in
from pyduofern.duofern_stick import DuofernStickThreaded
ModuleNotFoundError: No module named ‘pyduofern’
I solved this by copying the folder pyduofern and serial into the virtual environment, but now:
2018-04-19 20:28:13 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package pyduofern: Could not find a version that satisfies the requirement pyduofern (from versions: )
No matching distribution found for pyduofern
2018-04-19 20:28:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1524162493.705419, level=ERROR, message=Unable to install package pyduofern: Could not find a version that satisfies the requirement pyduofern (from versions: )
No matching distribution found for pyduofern, exception=, source=util/package.py>
2018-04-19 20:28:13 ERROR (MainThread) [homeassistant.requirements] Not initializing cover.duofern because could not install requirement pyduofern
2018-04-19 20:28:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform cover.duofern: Could not install all requirements.
2018-04-19 20:28:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1524162493.7348485, level=ERROR, message=Not initializing cover.duofern because could not install requirement pyduofern, exception=, source=requirements.py>
2018-04-19 20:28:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1524162493.7537558, level=ERROR, message=Unable to prepare setup for platform cover.duofern: Could not install all requirements., exception=, source=setup.py>
2018-04-19 20:28:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:- cover.duofern
Could it be a python3.6. problem?
I’m guessing homeassistant tries to pull the package from pypi but does not find it there as I have not gotten around to uploading it in pypi (wanting to polish it up a bit first).
pyduofern manually in your virtualenv via
pip3 install git+https://github.com/gluap/pyduofern.git should fix he error you got. (if it complains about missing git you may need to install git first, likely
apt install git or your distributions equivalent).
Once pyduofern is set up you’ll have to do some steps to pair your blinds outside of homeassistant, the workflow is described on the start page of https://github.com/gluap/pyduofern . There’s an assciinema on https://pgoergen.de/2018/03/setting-up-pyduofern/ showing the non-homeassistant part of the setup.
Feel free to get back to me if you encounter problems.
Is this stick working with a DuoFern radio-controlled rollershutter?
Which one do I need for using with a RPI with HA?
The 70000093 works with my shutters. In the picture with the two sticks the right one without antenna wire looks like the one I have.
IIRC the one with the antenna wire is for a different RF protocol.
Works fine now. The problem was, that I have forgotten to switch into the venv.
I have another problem. Last week I got another Rollotron 1400 and it was pairable but not controllable (up/down) from HA and pyduofern. Ordered a new one and it is the same behavior. I think it is no problem of the distance from sender to the Rollotron.
The debug log is ok.
What else can I do?
Ok, it seems, that the devices with id cc are not working:
entering pairing mode
2018-05-04 20:21:52,646: sending 04000000000000000000000000000000000000000000 from write queue, 0 msgs left in queue
2018-05-04 20:21:59,740: got pairing reply
2018-05-04 20:21:59,740: detected unknown device, ID=40ccc3
2018-05-04 20:21:59,740: DUOFERN device paired, ID 40ccc3
2018-05-04 20:21:59,740: paired new device 40b7c2
2018-05-04 20:21:59,740: paired new device 40b7bb
2018-05-04 20:21:59,740: paired new device 40a9f3
2018-05-04 20:21:59,740: paired new device 40cc53
2018-05-04 20:21:59,740: paired new device 40ccc3
2018-05-04 20:22:52,369: sending 05000000000000000000000000000000000000000000 from write queue, 1 msgs left in queue
2018-05-04 20:22:52,383: sending 05000000000000000000000000000000000000000000 from write queue, 0 msgs left in queue
2018-05-04 20:22:52,929: paired new device 40b7c2
2018-05-04 20:22:52,929: paired new device 40b7bb
2018-05-04 20:22:52,929: paired new device 40a9f3
2018-05-04 20:22:52,929: paired new device 40cc53
2018-05-04 20:22:52,929: paired new device 40ccc3
The first three are working fine, the last two are not working. Difference is the middle part of the id.
EDIT: If I change the position at the Rollotron, the position is shown correctly in HA. But up and down is impossible. The Rollotron has a distance of 4m to the stick. A working one has 20m distance.
I think you pointed me right at the problem and I hope I fixed it. Try
pip3 install --ugprade git+https://github.com/gluap/pyduofern.git in your virtualenv and see if it fixes the problem. (restart homeassistant after updating the duofern module).
Edit: the problem was a location where
cc in the command string was replaced by the channel ID. Because the device ID is also part of the string, the
cc from the device id were mistakenly replaced by the channel…
meanwhile I have also received my Rademacher Duofern stick.
I have successfully set it up.
I can control the shutter via the python scripts and home assistant.
In the example for HA the custom component is named cover and light.
In Home Assistant the roller shutter is now shown as Cover or translated into German as Abdeckung in the overview menu.
How can I change this to roller shutter, shutter or Rolladen?
Cover sounds a bit strange
I’m happy to hear it works for you!
The naming and translations are part of homeassistant core and were not chosen by me: when implementing a module for an existing device class (like cover), you don’t get to chose your own translation (at least not by default). Abdeckung is a strange word indeed, but possibly the best match for the english “cover”. I think it was chosen by homeassistant developers to cover a wide range of devices. A cover can be a roller shutter, but also a garage door or window blinds.
If you find a way to adapt the translation for a custom component I’d be glad to use it for renaming. I don’t think Rademacher provides garage door openers so “Rolladen” or “Jalusie” would likely be a sensible German component description for a duofern based cover module.
do I need the directory light in homeassistant/custom_components/ for controlling my shutters with homeassistant? I want to keep my installation clean and simple. So I want to get rid of unneeded stuff.
no need to copy the light folder if unless you use Rademacher light switches! If you leave it out you can also skip the respective config file lines.