Nov 26, 2017

[howto] RF control for Viessmann Vitovent 200-D (HRM B55)

I installed 3 Viessmann Vitovent 200-D in my home for controlled air ventilation.

They come with the option for a seperate RF remote switch to control the airstream. Airstream can be set to different levels:

  • Blow air from outside to inside
  • Blow air from inside to outside
  • off
  • automatic mode (if you buy a airquality sensor for 150-200€)
  • 1 to 4 for slow to fast air ventilation.

The RF remote wall switch ZK02582 costs between 150-400€ and has 4 buttons for Up, Down, Max and Auto mode.

The plan was to integrate this somewhen into my home automation and control it by external sensors, depending on time or by occupancy state.

Unfortunately Viessmann did not share any futher information about the used protocol etc. So the idea was to buy a ZK02582, sniff and clone the radio traffic and sell it again :-)

Luckily I disassembled the indoor cover and found a USB connector behind a sticker and an EnOcean TCM module!



So I ordered an EnOcean USB300 adapter and played some hours with it (without success). After half a year I started again. Now here are the results ;-)

EnOcean provides a development application named DolphinStudio with that you can send custom commands using the USB300.



DolphinView did NOT work with the TCM module inside the Vitovent. Probably they are using another firmware. I would not recommend to override it (if possible at all). In case you want to play with it, make sure that you do not have a dangerous voltage on the USB connector!!

So let's take a look on the RF protocol.

EnOcean uses different protocols:
  • ESP: Serial protocol
  • ERP: Radio protocol (wrapped inside ESP)
  • EEP: Equipment profile (wrapped inside ERP)
I found a document that describes some of the possible EEPs and also figured out that the wall switch might be similiar to a rocker switch with 4 buttons. This means the RORG (radio telegram type) must be set to RPS (Repeated Switch).

The sender ID must be probably in the range of BaseID + 127. BaseID you can read out using Set ID in DolphinView.

Sending data 00 and status 00 to broadcast destination (0xFF FF FF FF) let me allow to pair the Vitovent! Voilá!

Now just needed to analyse and try some bits in data and status field. They are quite similiar to what you can find in the EEP document.

The binary data format is ###x$$$$, where ### is the button, x is the state of the button (pressed = 1, released = 0) and $$$$ seems to be unused or not recognized. (DolphinView expects hex data.)
  • 0b0001 0000 = 0x10 (down button)
  • 0b0011 0000 = 0x30 (up button)
  • 0b0101 0000 = 0x50 (auto button)
  • 0b0111 0000 = 0x70 (max button)
Possible buttons 4-7 are not recognized. The first 4 bits of the status field seems to be ignored. The last 4 bits are the repeating count (probably used for telegram routing). Easiest is to just leave status field untouched at 0x00.

That's it :)


I think that most EnOcean rocker switches with 4 buttons will work fine with Vitovent. So you can choose your prefered style and price :)

I will not test it, 'cause the next step is to integrate it into domoticz. If you tested any other wall switch it would be nice if you leave a comment.


Update 26.11.17
Integration in domoticz was easier than expected.

  1. Add USB300 under hardware setup. Choose the right USB port. If you have more USB devices connected it might be that they are reordered on a new boot.
  2. In Switches create a manual switch.
  3. Select Blinds and EnOcean, give it a name and that ID to e.g. 1. Use Rocker ID 1 for Up/Down.
  4. On the vitovent select the first channel C1 in RC menu.
  5. Press test in domoticz. Vitovent stops blinking, indicating that it is paired now.
  6. Click on Save.
If you also want to have Max/Auto you have to add a second switch with Rocker ID 2. Selectors do not seem to work yet with EnOcean. You can also chooses other switch types, but Blinds with its two buttons were most satisfying for me.


Nov 8, 2016

Z-Wave experiences

I bought some Z-Wave danfoss living connect LC-13 and some Popp radiator thermostats to embed them into my home automation by Z-Wave.

I decided to go with this combination 'cause the Popp thermostats also return the current temperature. For the cheaper Eurotronics thermostats it is said that they do not return a manually set setpoint.

Unfortunately my radiators and valves are 30 years old and the adapters (RA & K) supplied with the danfoss do not fit. I figured out that I need a RAVL adapter (packaged with RAV adapter and a stuffing box), which adds another 7€ per radiator.

The Popp thermostats look like the danfoss ones, just the logo is not printed. But they have the same cheap looking plastic cage, ugly display with very limited viewing angle and the buttons with an inaccurate pressure point.

The first Popp thermostat worked for around 24 hours. Then it reported the settings every second and drained the battery in a few hours. Additionally it returned negative temperature measurements for a room that was at 18°C. Resetting to factory settings did not work, so this one is out for RMA.

The other 2 Popp thermostats worked out of the box, same like 2 out of 3 danfoss thermostats. I don't like the menu and the general user interface. It is not explained in a good way and the menu Pb (for the size adjustment of the radiator) is not mentioned in the official manual.

The 3rd danfoss could not be paired with my Z-Wave controller. Since it was also missing batteries I expected that this was already in use and paired with another Z-Wave controller. But after the second factory reset it seems to work fine. Probably pushing the middle button for a longer time also resets the embedded Z-Wave chip.

Interesting is also that the Popp manual names the product ZWE Connect and the manufacturer ZWE GmbH (which is Z-Wave Europe GmbH). Popp and ZWE have own manuals on their website for it.


As gateway I use a Raspberry Pi with the Aeon Z-Wave Gen5 Stick and domoticz. This works fine so far. Tried homegenie before but the UI did not satisfy me. (hanging, notifications blocking functionality and out of the screen). domoticz is quite compact, but with the scripting feature it looks promising.

I also use a danalock v2, but this is not completly included yet (idea is to have the blue lock from the official app somehow done with Z-Wave). For including the danalock it is important to use a secure inclusion, else it will not work. Probably it is also wise to use a own secret key for security devices ;)

Just my first impressions... maybe more about this topic in the future ;)

Update 26.11.2017
After using Z-Wave for around a year now I gained some more experience with it.
It looks like some devices just do not act as good as others.

Problematic devices at least with domoticz and Aeon Z-Wave stick:
Eurotronic Comet-Z: This thermostat is quite cheap but it did never run longer than 2 weeks without a new pairing.

Aeon Micro Switch (2nd Edition): Inside the controller range it works fine. But as soon as it is outside the range and a switch command can not be executed it will also fail permanent back inside the range. Not sure what is exactly the reason - a repeating node was just 4-5 meters away...

Btw. if you need RAVL or RAV adapters you can get it quite cheap from Eurotronics. Just 1,20€ per set instead of 7€!! Without stuffing box. Btw. 30-year old danfoss RAVL thermostats did not loose any value if you're going to sell them :)

Now I'm playing a bit with self build sensors from mysensors.org. Looks promising (cheap, open source and better debugging) but also has some bottlenecks. Signing and security is by default not activated and you might have trouble if you buy cheap chinese clones... Also a lot of time is needed to build these sensors. Hope that someone will create some ready to solder kits and sell it :-)

Oct 8, 2015

[fix] Feuchtigkeit und Teufel Decoderstation 5

Schrauben... Schrauben... Schrauben...

vorher... (sind wohl ein paar Regentropfen durch die Lüftungsschlitze gekommen :))

nachher... (Isoprop Ultraschall)


huch... :-) (nachträglich eingelötete Widerstände)

Update: Die Reinigung hat leider nicht ganz geholfen. Der PT2258 (Lautstärke Controller für 6 Kanäle) produzierte jede Menge Rauschen. Ausgelötet und nochmals gereinigt hat zwar das Rauschen aufgehört, dafür hat ein Kanal gar nicht mehr funktioniert. Mit neuem Bauteil (PT2258) für ca. 8€ aus England funktioniert die Decoderstation jetzt wieder, wie sie soll :)

Oct 30, 2014

[howto] flashing arduino nano with avrdude using integrated bootloader

just a short one, since a lot of stuff spreaded that just doesn't work for me..
avrdude -p atmega168 -P com60 -V -F -b57600 -c arduino -U flash:w:main.hex
As programmer just use arduino, not stk500v1 or v2 or tinyusb. change com60 and main.hex to your settings. Instead of atmega168 you might also use atmega328(p) which is more common on the nano nowadays. -V -F arguments are probably optional (no-verify, no signature check) :)

Mar 29, 2014

[workaround] Displaylink and DirectX9

If you're using a Displaylink device to connect additional screens through USB, you might get in trouble when trying to run any application or game that is based on DirectX9 or lower.

You will get error messages about DirectX and the application is not useable:
  • WARCRAFT III failed to initialize DirectX. Please check that you have DirectX 8.1 or later installed...
  • Ein unbekannter DirectX-Fehler ist aufgetreten, sodass League of Legends nicht gestartet werden kann...
  • DEVICE_CREATE_ERROR - An invalid parameter was passed to the returning function.
Displaylink does not address this issue for at least a year now. I also contacted Displaylink by mail and on forum begging them to fix that issue.

Disabling the Displaylink device in the device manager or removing the USB device does not help. One workaround is to uninstall the drivers completly. But that's a bit annoying if you only want to do this once.

Another more smart workaround is to temporarily disable the drivers. This is possible with Autoruns from SysInternals:
  1. Start Autoruns
  2. Switch to run as administrator
  3. Go to drivers tab
  4. Remove both the checks on dlkmd DisplayLink WDDM KMD and dlkmdldr DisplayLink WDDM KMD Loader
  5. Reboot your machine

Displaylink will autoinstall the drivers again after the reboot, but if you decide not to reboot this time you're able to run all the games during this session. On the next startup everything will be back to original state. Of course during the drivers disabled you can NOT use your additional monitors.

Nov 21, 2013

[howto] DJI PC Groundstation on Windows XP

The DJI Groundstation is an application to remote control a DJI copter with waypoints, flight trace and this stuff. The Groundstation is available for PC and iPad.

First some annotiations:
  • You need a free CAN slot. If you do not have one, you can extend it with DJI CAN hub - but this is just an expansive box which is connecting the wires :-) So in theory you can also cut the cables and solder it.
  • You need the DJI 2,4GHz datalink: This is a sender and a receiver.
  • If you want to use it with your iPad you also need the DJI BTU (Bluetooth Unit)
  • Make sure that your iPad supports BT 4.0. I think this is the case for iPad 3 and up. On iPad you can not install the groundstation app.
  • The Groundstation for PC is only available on CD which is shipped inside the package. It looks like it is downloading the latest version from internet somehow.
  • There are different versions of the datalink module with different certificates (FCC, CE) and different transmit power
Ok, now back to the topic. Since you might want to use an old notebook for the groundstation running Windows XP you need to take care about the drivers by your own. It is shipped with a Prolific 2303 serial driver, but this driver is not really fitting to the product and even downloading other versions did not solve the issue. The issue is a yellow exclamation mark in the device manager :-)

Plugging it to a newer windows version you can see, that it uses operating system included CDC serial drivers. Unfortunately the CDC drivers are not available on Windows XP (or can not be accessed automatically), but you can trick it a bit.

Microchip has an example for that. Unfortunately this is in an executable file. So download the alternative drivers from e.g. obddiag.net and unzip them to a folder. Edit the mchpcdc.inf and look for the lines where it is written %DESCRIPTION%=DriverInstall, USB\VID_????&PID_????. Change both the lines to %DESCRIPTION%=DriverInstall, USB\VID_FFF0&PID_0008. After that go to the device manager and reinstall by using the custom folder where you just edited the .inf file.

Remember the port and set it in the groundstation.

Oct 8, 2013

[howto] recompile & modify ubuntu package

Since I had some problems with my ZNC IRC bouncer I decided to recompile it with the TCP feature KEEPALIVE. Before I compared ZNC and weechat behaviour and found out that weechat uses KEEPALIVE while ZNC does not. I hope this will solve my connection instability.

To change it on my ubuntu system I had todo the following steps. If you know the commands, it's quite an easy task :-)

Create a new directory and change to it:
mkdir znc
cd znc
Get the source code:
apt-get source znc
Get the tools needed to recompile:
sudo apt-get build-dep znc
Do your changes...

Goto to the source directory:
cd ~/znc/znc-1.0
Start recompilation:
sudo dpkg-buildpackage -rfakeroot -uc -b
If fakeroot is missing, get it and try again:
sudo apt-get install fakeroot
If the package is already installed, I think it is easiest to remove it (else you might get some errors about dependencies if the package consist of more .debs):
sudo apt-get remove znc
Change to the parent folder and install the newly compiled .debs:
sudo dpkg --install *.deb

That's it - enjoy :)

Update: My ZNC connection is not really more stable wth keepalive. keepalive usually takes more than 2 hours to be used.

Update 2: I fixed the connection issue by using a smaller timeout for the ZNC initiated ping. Might be that any device (probably provider) on the route kills connections that are just listening.