This howto describes how to setup the RFXCOM RFXtrx433E transceiver to control Somfy rollershutters using the Paper UI. It was successfully tested on a Raspberry Pi 3 (raspbian) and the nightly build from 30 December 2016.
Prerequisites
- OpenHAB2 has been installed and is running.
- The Somfy rollershutters can be controlled using the RFXmngr utility or an openHAB 1.x installation.
Preperation
Connect the RFXtrx433E to the openHAB2 host by plugging in the USB cable into a free USB slot.
Open a command line (e.g. ssh into the openHAB2 host).
Add the openhab user to the dialout group:
$ sudo usermod -a -G dialout openhab
If youāre using more than one serial device then create symlinks to these devices using udev rules (see https://github.com/openhab/openhab/wiki/symlinks).
After creating the udev rule reboot. After the reboot completes make sure that the symlink has been created:
$ ls -l /dev/ttyRFXCOM
lrwxrwxrwx 1 root root 7 Dec 30 18:42 /dev/ttyRFXCOM -> ttyUSB0
Note: This guide assumes that you are using symlinks and that the symlink for the RFXtrx433E device is called /dev/ttyRFXCOM
.
RFXCOM Binding Installation
Open the Paper UI and select Add-ons from the left menu.
Scroll down to the RFXCOM binding or type RFXCOM in the search box to quickly find the RFXCOM binding and press install.
Wait for the installation to finish.
Manually Creating an RFXCOM Thing
Open the Configuration menu select Things.
Click the Add Things link or the blue circle with the plus sign to manually add a new thing. Select the RFXCOM binding. Select Add Manually. Scroll down and select the RFXCOM USB Transceiver (do not use the RFXtrx433E USB 433.92MHz Transceiver!). Configure the Serial Port by entering /dev/ttyRFXCOM
(if you used a different name or in case you do not use symlinks then specifiy the correct serial port name here, e.g. /dev/ttyUSB0
).
The newly added RFXCOM USB Transceiver thing should now be online.
Manually Adding a Rollershutter Thing
The Somfy RTS motors do not transmit any data so openHAB is not aware of their existence. Hence the rollershutters will not automatically appear in the openHAB Inbox and need to be added manually.
In Paper UI open the Configuration menu and select Things. Press the blue circle containing the plus sign. Select the RFXCOM binding. Click Add Manually. Scroll down and select RFXCOM Rfy Actuator.
Optionally give the thing a name and location. Select RFXCOM USB Tranceiver bridge. Specify the Device Id (see Calculating the Device Id below).
Set the Sub Type to RFY.
Click the blue circle to save the changes.
Click on the newly created RFXCOM Rfy Actuator thing. Select the Shutter channel. Create a new Item. Fill in the Item name (or keep the default one). Give it a label and optionally a category. Make sure the Type is set to Rollershutter and press the Link link.
The rollershutter is now setup and can be tested using the Paper UI.
Testing
In Paper UI open the Control menu item. Select the correct location or if you did not fill in a location then select Other.
Your rollershutter should now be visible and you should be able to control it using the down/stop/up buttons.
Calculating the Device Id
Device Ids consist of a Unit Id and a Unit Code seperated by a dot. The Device Id needs to be in decimals, not hex values. Letās assume you have assigned your rollershutter the Unit ID of 0E 0A 03 with Unit Code 1. In decimals 0E0A03 equals 920067. So the resulting Device Id becomes 920067.1. (Do not use leading zeros).
Migrating From openHAB 1.x
Device Ids in openHAB 1.x were written as 14.10.3.1, where the first three numbers were the Unit Id. These old Device Ids need to be translated to the new format. To do so the Unit Id must first be converted to a HEX value.
So in the example above 14.10.3 becomes:
14 -> 0E
10 -> 0A
3 -> 03
The new Unit Id in HEX is 0E0A03. In decimals, the Unit Id is 920067. So the new Device Id now becomes 920067.1. (Do not use leading zeros).