RFXCOM 2.0 binding

I’ve the same issue and added openhab to group dailout. That doesn’t work for me and i get the ERROR

[ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed
java.io.IOException: device not found (2)

OH throws an exception during discovery:

2016-11-08 16:56:14.114 [ERROR] [rnal.discovery.RFXComBridgeDiscovery] - Error occured during discovery
java.io.IOException: device not found (2)
        at jd2xx.JD2XX.listDevices(Native Method)
        at jd2xx.JD2XX.listDevicesByDescription(JD2XX.java:826)


Greatings Peter

I’ve also tried this, but get the following exception:

2016-11-18 20:58:33.321 [ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed
java.io.IOException: device not opened (3)
	at jd2xx.JD2XX.openEx(Native Method)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at jd2xx.JD2XX.openBySerialNumber(JD2XX.java:806)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at org.openhab.binding.rfxcom.internal.connector.RFXComJD2XXConnector.connect(RFXComJD2XXConnector.java:49)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler.connect(RFXComBridgeHandler.java:167)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler.access$8(RFXComBridgeHandler.java:142)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler$1.run(RFXComBridgeHandler.java:115)[205:org.openhab.binding.rfxcom:2.0.0.201611161557]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_101]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

Cheers
James

@james_2_roberts: Linux have native FTDI drivers, which prevent JD2XX driver to open device. You should add manually “RFXCOM USB Transceiver” which use traditional serial port driver rather than JD2XX.

As many user struggles with this “device not open (3)” error, I’m planning to add following information to log.

2016-11-19 12:25:49.330 [ERROR] [.r.handler.RFXComBridgeHandler:217 ] - Connection to RFXCOM transceiver failed, reason java.io.IOException: device not opened (3)
at jd2xx.JD2XX.openEx(Native Method)
at jd2xx.JD2XX.openBySerialNumber(JD2XX.java:806)
at org.openhab.binding.rfxcom.internal.connector.RFXComJD2XXConnector.connect(RFXComJD2XXConnector.java:49)
at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler.connect(RFXComBridgeHandler.java:162)
at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler.access$8(RFXComBridgeHandler.java:142)
at org.openhab.binding.rfxcom.handler.RFXComBridgeHandler$1.run(RFXComBridgeHandler.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

2016-11-19 12:25:49.331 [INFO ] [.r.handler.RFXComBridgeHandler:220 ] - Automatically Discovered RFXCOM bridges use FTDI chip driver (D2XX). Reason for this error normally is related to operating system native FTDI drivers, which prevent D2XX driver to open device. To solve this problem, uninstall OS FTDI native drivers or add manually universal bridge ‘RFXCOM USB Transceiver’, which use normal serial port driver rather than D2XX.

Could this help user to understand the reason for the error and how to solve it?

I updated to the newest SNAPSHOT, rfxcom is working nice. It discovers new items, but when i try to add from the inbox to my things i get a error:

17:15:04.155 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'rfxcom:lighting1:ac76c43e:A_1' changed from UNINITIALIZED to INITIALIZING
17:15:04.174 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'rfxcom:lighting1:ac76c43e:A_1' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
17:15:04.172 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'rfxcom:lighting1:ac76c43e:A_1': java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_111]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_111]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[98:org.eclipse.smarthome.core:0.9.0.201611102032]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[98:org.eclipse.smarthome.core:0.9.0.201611102032]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[98:org.eclipse.smarthome.core:0.9.0.201611102032]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.run(ThingManager.java:761)[105:org.eclipse.smarthome.core.thing:0.9.0.201611102032]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_111]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
        at org.openhab.binding.rfxcom.handler.RFXComHandler.initialize(RFXComHandler.java:110)
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:764)
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_111]
        ... 3 more

Hi Pauli,

It helps understand the problem, it doesn’t help me understand what I need to do:

  1. Uninstall native OS FTDI drivers - I assume there’ll be implications with this?
  2. Add it manually - presumably as a thing, this would be my prefered option, however, the only details I have are those which were those auto-discovered which I assume would need to be different - .things file:
Bridge rfxcom:bridge:usb0 [ serialPort="/dev/tty.usbserial-06VVEG1Y" ]

Thanks
James

@james_2_roberts you can add the bridge (RFXCOM USB Transceiver) via Paper UI, its about 3/4 of the way down the list under “add manually” option from the inbox screen

@pauli_anttila yep i think that looks like a good idea to add in. I would just change the last bit to say

“To solve this problem, uninstall OS FTDI native drivers or add manually the universal bridge ‘RFXCOM USB Transceiver’ item via paperUI, which use normal serial port driver rather than D2XX.”

Thanks @James_Hiscott I’ll give that a go - I assume adding into a .thing file isn’t possible?

James

@james_2_roberts TBH i didnt try.

Both paperUI and file based installations are supported. Things can also be installed via habmin and in future with many other ways, so that’s also the reason why I didn’t want to mention paperUI on rfxcom binding error message as binding itself is fully separated from the installation tools.

Thanks @James_Hiscott and @pauli_anttila,

I’ve been playing around the last couple of days.

Installing the bridge and a couple of Lighting5 Things via .things file:

Bridge rfxcom:bridge:rfxcom [ serialPort="/dev/ttyUSB0" ] {
	Thing lighting5 15770872_16 "Mood" @ "Lounge" [deviceId="15770872.16", subType="LightwaveRF,Siemens"]
	Thing lighting5 15776004_16 "Mood" @ "Bedroom 1" [deviceId="15770872.16", subType="LightwaveRF,Siemens"]
	}

I’ve defined Items and, I assume, Links manually in a .items file:

Number Lounge_Mood_Switch	"Lounge Main Mood"	(gLounge, gRfxcom, gLightwave)		{ channel="rfxcom:lighting5:rfxcom:15770872_16:mood" }
Number Bed1_Mood_Switch		"Bed1 Main Mood"	(gBedroom1, gRfxcom, gLightwave)	{ channel="rfxcom:lighting5:rfxcom:15776004_16:mood" }

These are both LightwaveRF Mood controllers, I’ve tried the Mood channel too, but neither option updates the state of the item when a button is pressed on the device. I get the appropriate output in the log:

2016-11-22 08:23:32.810 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message received: Raw data = 0A140001F0B90410050060, Packet type = LIGHTING5, Seq number = 1, Sub type = LIGHTWAVERF, Device Id = 15776004.16, Command = MOOD3, Dim level = 0, Signal level = 6

but when I run the command smarthome:items the item .state doesn’t update - am I doing something wrong in my definitions of the things/items, or something else?

(I’ve also tried the :command channel too, with the same non-update).

Thanks
James

Has anybody been able to configure the RFXcom bridge and things thru the *.things file? I would like to avoid setting it in paperui, but are not able to locate any working examples of rfxcom lightning 2 things…

@Zirum, working thing example cab be found from rfxcom binding page http://docs.openhab.org/addons/bindings/rfxcom/readme.html

Forgive me, but I am unable to get the information on that (and this thread) to work.

Bridge config:
Q1) Seems to me like the information in the serialPort is wrong. At least when I change it to “/dev/ttyUSB0”, it goes online in PaperUI, and starts identifying things.

As follows…

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" ]

rather than

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/tty.usbserial-06VVEG1Y" ]

Q2: What is actually the 06VVEG1Y-number?
Q3: What type of protocols is enabled? PaperUI shows none, but surely my nexas are picked up. No need to configure?

Thing config
Q4: I’d like to additionally assign the following details in the thing-file, is it possible?

  • Name
  • Thing Id
  • Location

Q1) You need to adapt used serial port, “/dev/tty.usbserial-06VVEG1Y” is just an example

Q2) 06VVEG1Y is serial number of my rfxcom controller :slight_smile: In Mac, serial number is included to serial port device name. Serial port name depends which operating system is used.

Q3) By default rfxcom binding doesn’t change configuration of the rfxcom controller, so all protocols which are enabled by default or you have changed e.g. via RFXmngr should work. You can give all configuration parameters also to thing file.

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" setMode="XXXXXX" ]

See all available commands from https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.rfxcom/ESH-INF/thing/bridge.xml

Q4) This not related to rfxcom binding, so you can use generic way (see more details from https://www.eclipse.org/smarthome/documentation/features/dsl.html).

Bridge rfxcom:bridge:thingidlabel” @ “location” [ serialPort="/dev/ttyUSB0" ]

Thanks a bunch, Pauli, works like a charm. Eclipse reported validation errors, so I did not bother to check if it worked initially. But surely it did. Sorry for that…

Very much appreciated!

Not sure if this belongs in this thread, a new one, or if it should be followed up on github. Mentioned it in a thread on github, but it might not be actually related when reading a little more thoroughly.

I have had problems for a while that the rfxcom bridge goes offline for 5-10 seconds when it is “stressed” with multiple updates (like toggling 5-6 items on and off for example). Log looks like this:

Openhab.log

2016-12-09 23:31:51.143 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.firmware.FirmwareUpdateService@a4d975' takes more than 5000ms.
2016-12-09 23:31:51.145 [WARN ] [ome.core.thing.internal.ThingManager] - Handler for thing 'rfxcom:lighting2:3a698b45:436566_2' takes more than 5000ms for processing event
2016-12-09 23:31:51.165 [WARN ] [g.rfxcom.handler.RFXComBridgeHandler] - No response received from transceiver
2016-12-09 23:31:56.206 [WARN ] [g.rfxcom.handler.RFXComBridgeHandler] - No response received from transceiver
2016-12-09 23:31:56.299 [WARN ] [g.rfxcom.handler.RFXComBridgeHandler] - Sequence number '106' does not match, expecting number '110'
2016-12-09 23:31:56.363 [WARN ] [g.rfxcom.handler.RFXComBridgeHandler] - Sequence number '107' does not match, expecting number '110'
2

Event.log

2016-12-09 23:31:46.098 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE
2016-12-09 23:31:51.147 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE
2016-12-09 23:31:51.150 [ItemCommandEvent          ] - Item 'Kjokken_Lys_Hjornelampe' received command ON
2016-12-09 23:31:51.203 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE
2016-12-09 23:31:51.205 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2016-12-09 23:31:51.222 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2016-12-09 23:31:51.228 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2016-12-09 23:31:56.251 [hingStatusInfoChangedEvent] - 'rfxcom:bridge:3a698b45' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2016-12-09 23:31:56.267 [ItemStateChangedEvent     ] - Kjokken_Lys_TakInngang changed from 50 to 30
2016-12-09 23:31:56.273 [ItemStateChangedEvent     ] - Kjokken_Lys_TakInngang changed from 30 to 100
2016-12-09 23:31:56.305 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:108_1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.315 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:109_0' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.321 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:548818_1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.327 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:14540818_11' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.346 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:7800694_3' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.355 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:107_1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.364 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:101_0' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.379 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:390046_1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2016-12-09 23:31:56.385 [hingStatusInfoChangedEvent] - 'rfxcom:lighting2:3a698b45:6490_1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2

Any suggestions what it may be related to? Any helps much appreciated :slight_smile: !

I am also experiencing problems. And the solutions in this thread have not helped.

I have manually added the “RFXCOM USB Transceiver”, it is ONLINE, receives nothing, and things discovery crashes on JD2xx exceptions…

This is the thread.

Hi there,

Has anyone been able to get OH2 and RFXCOM working - I had it sort of working a while back, but halted my migration due to the mood message not being supported (and not having the time to make the transition to OH2). I’m now trying to migrate again, but experiencing problems with RFXCOM.

I’m running the Beta OH2 release, updated and upgraded.

I’ve got the following currently configured:
rfxcom.cfg:

rfxcom:serialPort=/dev/ttyUSB0

rfxcom.things:

	Bridge rfxcom:bridge:rfxcom [ serialPort="/dev/ttyUSB0" ] {
		Thing lighting5 15770872_16 "Mood" @ "Lounge" [deviceId="15770872.16", subType="LightwaveRF,Siemens"]
		Thing lighting5 15776004_16 "Mood" @ "Bedroom 1" [deviceId="15776004.16", subType="LightwaveRF,Siemens"]
	}

	rfxcom:lighting5:rfxcom:15770872_16 (Type=Thing, Status=ONLINE, Label=Lounge Mood, Bridge=rfxcom:bridge:rfxcom)
	rfxcom:lighting5:rfxcom:15776004_16 (Type=Thing, Status=ONLINE, Label=Bedroom1 Mood, Bridge=rfxcom:bridge:rfxcom)
	rfxcom:bridge:rfxcom (Type=Bridge, Status=ONLINE, Label=RFXCOM USB Transceiver, Bridge=null)
  1. Smarthome Designer doesn’t like my things file, on the 1st thing definition, it highlights the following:
Multiple markers at this line
- mismatched input '@' expecting '}'
- no viable alternative at input 'subType'
- The word 'Siemens' is not correctly spelled
- no viable alternative at input 'deviceId'

On the 2nd thing definition it highlights:

Multiple markers at this line
- missing EOF at '@'
- The word 'Siemens' is not correctly spelled
- Provide a thing UID in this format:
 <bindingId>:<thingTypeId>:<thingId>

Openhab ignores the bridge definition, giving the following in openhab.log:

2017-02-18 14:22:02.134 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'rfxcom.things'
2017-02-18 14:22:02.161 [WARN ] [.thing.internal.GenericThingProvider] - Thing Lounge does not have a bridge so it needs to be defined in full notation like <bindingId>:Lounge:Mood
2017-02-18 14:22:02.164 [WARN ] [.thing.internal.GenericThingProvider] - Thing Lounge does not have a bridge so it needs to be defined in full notation like <bindingId>:Lounge:Mood
2017-02-18 14:22:02.169 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'rfxcom.things'
2017-02-18 14:22:02.193 [WARN ] [.thing.internal.GenericThingProvider] - Thing Lounge does not have a bridge so it needs to be defined in full notation like <bindingId>:Lounge:Mood
2017-02-18 14:22:02.196 [WARN ] [.thing.internal.GenericThingProvider] - Thing Lounge does not have a bridge so it needs to be defined in full notation like <bindingId>:Lounge:Mood

Which seems to be where I’m currently stuck, I’ve compared my bridge definition to that in the docs, and can’t see anything wrong (and it worked back in November).

I’ve got logging set to TRACE, but see no TRACE level items in the log:

openhab> log:get org.openhab.binding.rfxcom
Logger                     | Level
----------------------------------
org.openhab.binding.rfxcom | TRACE

I’m out of ideas what to check or try next…

Cheers
James