RFXCOM 2.0 binding

You could add your comment to this issue: https://github.com/openhab/openhab2-addons/issues/648
I will already update the title.

Just to add to the choir, Running a RPI, Openhab 2 on Jessie, and I am having the same problem with RFXCOM staying Offline. This happens after trying to add it manually, though I think I may have missed some steps (I could not see a obvious place to add the config line mentioned).

I’ll have to retest later today… :slightly_smiling:

Probably a different problem.
Take a look at https://github.com/openhab/openhab2-addons/issues/625

Thanks Lolodomo, think I found the right place to get it to online from your link. It discovers when I press buttons now. All buttons come up as initializing, but not sure if it matters. First time user, and have a long way of configuring and learing to do, so have yet not had time to add to try to see if I can execute a command. Small steps… :slight_smile:

Don’t you encounter the problem we have with things remaining in state INITIALIZING ?

Yes, sorry if I was unclear on that. I have added a couple of Nexa remotes, that where discovered when I pressed their buttons. But they remain in state INITIALIZING.

What I tried to say was that since I am a first time user, I was unsure if this is a problem and if it is the same problem as you have. I have still in the process of trying to understand how to add items (more precise, Nexa self learning switches to start with). From there, it seems quite straight forward to link command from remote to a item though, and I thought maybe although it is stated as INITIALIZING, maybe I’d test if it actually cause any problems for me before reading up on more subjects/forums… But i’ll continue try to find some relevant reading on how to add the nexa self learning switches.

I do also have problems with RFXCOM things that stay in INITIALIZING.
Since it have been a bit of struggle along the way to get a Openhab2 system up and running I’m not sure if I do wrong or not.

I use Raspberry Pi2, Raspbian, Openhab2_offline_snapshot (Feb 14),Habmin2_snapshot(Feb 14) rfxcom USB-binding, Mysensors-binding (+2multi sensors), some NEXA switches, termometers.

I would like to, and thought it was possile, to define my things/items in there config files but I can not get it to work.
The rfxcom things just stays in INITIALIZING.
The bridge itself works since I can receive values from a thermometer.
If I remove the things definition and do a discovery via Paper UI I can get it to work. But I think things and links look a bit duplicated when I list with openhab CLI. See below (i have removed some lines to make it shorter)

Same for the MySensors, I have to use the Paper UI for sucessul discovery, not enough to define in things file.

Do I do something wrong or is it the rfxcom-binding/things descovery that does?

Bridge rfxcom:bridge:usbrfx [ serialPort="/dev/USBrfxcom" ] {
//lighting2 16402754_1 [deviceId=“16402754.1”, subType=“AC”]
//lighting2 16402754_2 [deviceId=“16402754.2”, subType=“AC”]
//lighting2 16402754_3 [deviceId=“16402754.3”, subType=“AC”]

lighting2 15764638_1 [deviceId="15764638.1", subType="AC"]


Switch Extra_lampa1 (gSunset) { channel=“rfxcom:lighting2:usbrfx:16402754_1:command” } //Vardagsrum vid spisen
Switch Extra_lampa2 (gSunset) { channel=“rfxcom:lighting2:usbrfx:16402754_2:command” } //Nattlampa övre våningen
Switch Extra_lampa3 (gSunset) { channel=“rfxcom:lighting2:usbrfx:16402754_3:command” } //Vardagsrum stora fönstret

Switch nexa1 { channel=“rfxcom:lighting2:usbrfx:15764638_1:command” } //Orginal

openhab> smarthome:things
rfxcom:lighting2:usbrfx:16402754_1 (Type=Thing, Status=OFFLINE, Bridge=rfxcom:bridge:usbrfx)
rfxcom:lighting2:usbrfx:16402754_2 (Type=Thing, Status=OFFLINE, Bridge=rfxcom:bridge:usbrfx)
rfxcom:lighting2:usbrfx:16402754_3 (Type=Thing, Status=OFFLINE, Bridge=rfxcom:bridge:usbrfx)
rfxcom:temperature:usbrfx:27395 (Type=Thing, Status=OFFLINE, Bridge=rfxcom:bridge:usbrfx)
rfxcom:bridge:usbrfx (Type=Bridge, Status=ONLINE, Bridge=null)
rfxcom:lighting2:usbrfx:15764638_1 (Type=Thing, Status=INITIALIZING, Bridge=rfxcom:bridge:usbrfx)

openhab> smarthome:links
Extra_lampa1 -> rfxcom:lighting2:usbrfx:16402754_1:command
Extra_lampa2 -> rfxcom:lighting2:usbrfx:16402754_2:command
Extra_lampa3 -> rfxcom:lighting2:usbrfx:16402754_3:command
nexa1 -> rfxcom:lighting2:usbrfx:15764638_1:command
OutdoorTemperatureAltan -> rfxcom:temperature:usbrfx:27395:temperature

rfxcom_lighting2_usbrfx_16402754_1 -> rfxcom:lighting2:usbrfx:16402754_1
rfxcom_lighting2_usbrfx_16402754_2 -> rfxcom:lighting2:usbrfx:16402754_2
rfxcom_lighting2_usbrfx_16402754_3 -> rfxcom:lighting2:usbrfx:16402754_3
rfxcom_temperature_usbrfx_27395 -> rfxcom:temperature:usbrfx:27395

openhab> smarthome:items
gSunset (Type=GroupItem, Members=3, State=NULL, Label=null, Category=null)
Extra_lampa1 (Type=SwitchItem, State=NULL, Label=null, Category=null)
Extra_lampa2 (Type=SwitchItem, State=NULL, Label=null, Category=null)
Extra_lampa3 (Type=SwitchItem, State=NULL, Label=null, Category=null)
nexa1 (Type=SwitchItem, State=NULL, Label=null, Category=null)

OutdoorTemperatureAltan (Type=NumberItem, State=1.100000000000000088817841970012523233890533447265625, Label=Temperature Altan:, Category=null)
rfxcom_lighting2_usbrfx_16402754_1 (Type=GroupItem, Members=0, State=NULL, Label=LIGHTING2-16402754.1, Category=null, Tags=[thing])
rfxcom_lighting2_usbrfx_16402754_2 (Type=GroupItem, Members=0, State=NULL, Label=LIGHTING2-16402754.2, Category=null, Tags=[thing])
rfxcom_lighting2_usbrfx_16402754_3 (Type=GroupItem, Members=0, State=NULL, Label=LIGHTING2-16402754.3, Category=null, Tags=[thing])
rfxcom_temperature_usbrfx_27395 (Type=GroupItem, Members=0, State=NULL, Label=TEMPERATURE-27395, Category=null, Tags=[thing])

I’ve tried to get rfxcom binding working with the latest OH2 snapshot. I’ve tried to configure it both using a things file and through the paperUI manual configuration. It does not work in either case. I cannot.use discovery since I have to have the FTDI drivers installed for my mysensors gateway to work. My things file look like this:

Bridge rfxcom:bridge:rfxtrx [ serialPort="/dev/rfxtrxUSB" ] {

The log does not give any good description of what is wrong, but this is what I have been able to discover:

One point that might be interesting finding the issue with the rfxcom binding is that when I initialising as the first binding I get the simple error message:

15:59:14.740 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Checking RFXCOM transceiver connection, thing status = OFFLINE
15:59:14.741 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Connecting to RFXCOM transceiver
15:59:14.741 [DEBUG] [rnal.connector.RFXComSerialConnector] - Disconnecting
15:59:14.741 [DEBUG] [rnal.connector.RFXComSerialConnector] - Closed
15:59:14.777 [ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed: null

However, as soon as I install the mysensor binding the error changes to this:

16:00:11.205 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysensors.things'
16:00:11.232 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'mysensors:bridge-ser:gateway' has been added.
16:00:11.256 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:gateway' changed from UNINITIALIZED to INITIALIZING
16:00:11.294 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:gateway' changed from INITIALIZING to ONLINE
16:00:11.295 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'mysensors.things'
16:00:13.637 [WARN ] [essage.ApplicationUpdateMessageClass] - Got ApplicationUpdateMessage without request, ignoring. Last message was SendData.
16:00:14.740 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Checking RFXCOM transceiver connection, thing status = OFFLINE
16:00:14.740 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Connecting to RFXCOM transceiver
16:00:14.741 [DEBUG] [rnal.connector.RFXComSerialConnector] - Disconnecting
16:00:14.741 [DEBUG] [rnal.connector.RFXComSerialConnector] - Closed
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..mysensorsUSB: File exists. It is mine

eP$ testRead() Lock file failed
16:00:14.742 [ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed: null

I initially thought this was related to the lock file as indicated by the second batch of log messages, so there is an issue open for it here with all the details: https://github.com/openhab/openhab2-addons/issues/671

Are there any plans to add support for the newer types soon? (e.g., Chime support which is currently lacking)

Thanks in advance

Hi Guys,

Does any one have any working examples for setting up a ‘BLINDS1’ item, together with commands. The new documentation for this binding is still a little short of detail, i.e no examples.

I have been working with RFXcom to get the tranceiver to talk to my Motorlux blind motors and as of today this is now working. :slight_smile:

Now I an starting to work on getting openHAB 2 to talk to the RFXcom transceiver and some examples for the OH2 binding would be really helpful.


Further to my last message…

I now have the RFXCOM transceiver set up on openHAB 2 as a thing. Where I need guidance is the correct syntax for setting up items and then sending commands via the binding.

Following is what the the RFXmngr outputs when a command is sent to my test blind from RFXmngr.

Details of the RFXtrx433 after discovery in the Paper UI are as follows.

Any help would be greatly appreciated.


In my item file I have tried the following options (plus many more) but no success yet:

Rollershutter BR_Blind "MAIN BLIND" (GF_Mancave) {channel = "rfxcom:RFXtrx433:A18RHMF:Shutter " }

This item at least links to the RFXtrx433, but did nothing, I guess mainly due to the fact that there is no addressing info for the blind motor.

Rollershutter BR_Blind "Main Blind" (GF_Mancave) { rfxcom = ">" }

This at least sends the commands from the UI, but no action from the transceiver.

I am sure my problem is just a syntax issue, but with no examples I am struggling to solve my issue.

Any help or advice would be appreciated.

Did you try this:

Edit: here are some more examples:

Thanks for the reply and yes I did look at this.

The ID code is: 00 00 01 which is “1” in decimal and same for the unit code which is also “1”, so no conversion needed.

I also saw the other post and have tried various combinations including the following:

Rollershutter BR_Blind "Main Blind" (GF_Mancave) { rfxcom = ">1.1:BLINDS1.A-OK AC114:Shutter" }

Rollershutter BR_Blind "Main Blind" (GF_Mancave) { rfxcom = ">1.1:BLINDS1.A-OK_AC114:Shutter" }

Rollershutter BR_Blind "Main Blind" (GF_Mancave) { rfxcom = ">1.1:BLINDS1.AC114:Shutter" }

I am starting to wonder if the issue is the space in “A-OK AC114” as this is what the screen on RFXmngr shows after a transmission, but I am not seeing any error messages in the OH2 log using log:tail.

I also just tried the following (from the post linked above) and go not response from the transceiver (watching the LED’s for activity): Note: the unit is showing as ONLINE in the Paper UI.

Rollershutter rsCurtain_BR "Curtains" (GF_Mancave) { rfxcom=">1.1:BLINDS1.DC106:Shutter" }

Could the issue be associated with the fact that the RFXtrx device was set up using the Paper UI using discovery. Do I need to manually set it up in the things file?

I might try a manual setup of the “thing” later tonight based on the following “only” example from the documentation for the binding:

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/tty.usbserial-06VVEG1Y" ] {
    Thing lighting2 100001_1 [deviceId="100001.1", subType="AC"]

However this defeats the purpose of the discovery function in the Paper UI.

OK, after 3 days of frustration and trying many different options, I now have this working (all configured via the Paper UI and sorry the process was not obvious!!). :sweat:

I still have a few gremlins to sort out, but when I am done I will document my findings here to help anyone who also wants to go down this path. This info may also be useful to add to the documentation for the binding.

1 Like

Any dokumentation on the Rfxcom setup process?

I’ve just managed to set up the rfxcom on my pi.

After many failed attempts to get it working I checked and the openhab service is started as the openhab user, which doesnt have access to /dev/ttyUSB0
Add it to the correct group and it should start working.

Hopefully that helps.


I’m trying my best to get to grips with Raspberry Pi & OpenHAB. How do I add /dev/ttyUSB0 to the correct group?


Run this: sudo usermod openhab -a -G dialout

Then restart the openhab service and watch the log, you should see if confirm that it finds the RFXCOM