RFXCOM 2.0 binding

rfxcom
rfxtrx433e
Tags: #<Tag:0x00007f1e59f6cba0> #<Tag:0x00007f1e59f6ca38>
(Lolodomo) #23

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

0 Likes

(Zirum) #24

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:

0 Likes

(Lolodomo) #25

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

0 Likes

(Zirum) #26

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.

0 Likes

(Johankcarlsson) #27

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?

THINGS:
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"]

}

ITEMS:
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])

0 Likes

Rfxcom Rainsensor
(Frank Olaf Sem-Jacobsen) #28

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

0 Likes

(Gerwin Hoogsteen) #29

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

Thanks in advance

0 Likes

(Mike Dilger) #30

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.

Thanks,
Mike

0 Likes

(Mike Dilger) #31

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.

Cheers,
Mike

0 Likes

(Mike Dilger) #32

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 = ">0.0.1.1:Blinds1.A-OK_AC114:Shutter" }

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.

0 Likes

(SiHui) #33

Did you try this:

Edit: here are some more examples:

0 Likes

(Mike Dilger) #34

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.

0 Likes

(Mike Dilger) #35

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.

0 Likes

(Mike Dilger) #36

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

(Magnus) #37

Any dokumentation on the Rfxcom setup process?

0 Likes

(Johan Eriksson) #38

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.

0 Likes

(R Miller) #39

Hi,

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

Thanks.

0 Likes

(James Hiscott) #40

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

0 Likes

(Peter Scholz) #41

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

0 Likes

(Jimbob) #42

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

0 Likes