RFXCOM TCP/IP binding

Hi,

I have installed a RFXCOM tranceiver in my living-room on a raspberry B+ and I use a USB/TCP bridge (Ser2Net) to get the data to my domotica server. (I’m migrating from DomotiGa(.nl) to OH2).

Now I wan’t to get this wonderful transceiver working with TCP and Openhab2. I looked at the Github repro and find a binding for it: https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.rfxcom/ESH-INF/thing/tcpbridge.xml

But I don’t find any kind of documentation, and since I’m relatively new tot OH2…I don’t know how to get it working.
I managed to get it working with a direct usb connection with this setting in the things file:
Bridge rfxcom:bridge:usb0 [ serialPort="/dev/tty.usbserial-06VVEG1Y" ]

But now the TCP binding. I tried to decode the .xml file but no luck… can anybody help me?

My config:

Bridge rfxcom:tcpbridge:tcp [host="192.168.1.110" , port=1001 , ignoreConfig=0] 

Rfxcom server : , Ser2Net application with config: > 10001:raw:0:/dev/ttyUSB0:38400 NONE 1STOPBIT 8DATABITS
(and that works with my old domotiGa3 software and TCP binding)

Openhab2 server:
running DietPI, “jessie” and Openhab2.
installed rfxcom plugin and tried this binding:
Bridge rfxcom:tcpbridge:tcp [host="192.168.1.110" , port=1001 , ignoreConfig=0]

many thanks for your help!

So I strugled a bit more with OH2 and I discovered a sollution,

I add a Thing called RFXCOM USB Transceiver over TCP/IP

Only the configuration is a bit hidden in the PaperUI. You can’t find it at
the “bridge” tab / menu. but It’s in the “things” part with at device
called “RFXCOM USB Transceiver over TCP/IP”. But there is no documentation about
this way of configuration etc. the XML from my first post is explaining al the options on that configuration page. It looks like this:

So problem solved, but a bit more documentation on the wiki can’t hurt…

http://docs.openhab.org/addons/bindings/rfxcom/readme.html

The docs for openHAB 2 are being created and maintained separately from the OH 1.x wiki. Since this is a 2.0 binding, the link above is the proper source for documentation.

Unfortunately we are in the middle of a transition so for those bindings that are version 1.9 the wiki is the place to look. For those that are 2.0, http://docs.openhab.org/addons/bindings is the place to look.

I think there is an issue in place to add links to the docs for each binding in PaperUI.

Tnx, Rich, I already read that wiki for OH2 and OH1, but there isn’t an explanation about how to config TCP bindings other than a small part about how to setup an TCP/IP service.

It’s about how to config it (apparently with the “thing” configuration) and how to get it working with the “old” config files / textual configuration. that part isn’t covered.

I still don’t know how I can create a new THING (like a switch of dimmer) in the textual configuration for a “thing”.

Since you are talking about Things I will assume you are using the 2.0 binding. There are no such thing as Things for the 1.9 version binding.

When you installed the binding there should have been an rfxcom.cfg file created in services. Open this file and there will be a number of parameters to fill out to configure the binding to find the RFXCOM controller. Presumably these would be the same parameters as one needs to add to openhab.cfg in openHAB 1.8, which is primarily the serialPort.

Alternatively, there might be a way to configure the binding through PaperUI. Browse to Configurations → Bindings and see if there is an RFXCOM card. If so click on that page and you can configure the serialPort there.

Once you have the serialPort pointing at the correct COM port or /dev/tty, according to the readme, the binding will autodiscover the Things which will appear in your Inbox.

Based on the lack of thoroughly documented syntax for Things in the readme, I believe this is the preferred way to get Things into your system. However, there is an example provided for a Thing:

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

The Bridge part points to your controller. The Things appear to have all the same parameters as defined on the 1.x wiki Item configuration.

1 Like

Tnx Rich, it works! the hard part was understanding that the discovery from things in OH2 is a bit hybrid. auto-discovered and configured things are stored apart from the thing file. I managed to get it working with your example.

I configured al my know devices in the THING file (for use with the rfxcom) and let the new auto discovery & configuration for OH2 working for other plugins.

Hi.
I have a (very) old TCP/IP RFXCOM device (not a USB model).
Is it supposed to work with this binding now ?

I tryed with OPENHAB 2.0, either by configuration, either by discovery, it doesn’t work really well …
Best i got was with manual configuration (as stated above with :
Bridge rfxcom:tcpbridge:myrfxcom [ host=“192.168.8.13”, port=10001 ] {
Thing lighting2 100001_1 [deviceId=“100001.1”, subType=“AC”]
}
)

and all i got in the logs are :

openhab.log:2017-01-27 22:20:26.915 [ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Error occurred during packet receiving, data: 501A2D104D4000180635DA501A2D104D4000180635DA605A6D00D40016508275314F68605A6D00D40016508275314F68501A2D104D4000180635DA501A2D104D4000180635DA605A6D00D4001650827531, cause: java.lang.reflect.InvocationTargetException

Any idea ? Should it work ?

Any idea ? Should it work ?

I doubt that it works. As far I know TCP/IP RFXCOM controller use different protocol than USB based controllers. RFXCOM binding support TCP/IP, but the purposes is to be able to use USB transceivers remotely, meaning USB controller is e.g. connected to Raspberry pi and openHAB is running on different machine e.g. PC.

Ok, so bad, but thanks for the clarification.

(it’s weird that on the RFXCOM side things are so different between USB and TCP/IP devices)

Well, you could ask clarification from RFXCOM. I only have spec for USB transceivers and that doesn’t say a word about TCP/IP based devices.

Yeah, but, indeed, TCP/IP devices have been discontinuied several years ago, and since then, only the USB versions has been available … (never understood why : the TCP/IP version seems way better, allowing to easily plug the device anywhere in your home just with a RJ45 cable).

From RFXCOM:

From: sales RFXCOM [mailto:sales@rfxcom.com]
Sent: Wednesday, 10 February 2016 4:36 PM
To: John Jore <—>
Subject: RE: Your message to us

Hi John

We have no plan to release a new RFXLAN soon.
I’m sorry but we have no information for the old RFXCOM LAN.
For the latest RFXLAN we have xPL documentation.

You can use an RFXtrx433E on a Raspberry PI and install ser2net so that you can access the device over LAN.
Attached the installation instructions for ser2net. (no further support on Linux by me)

Met vriendelijke groet/Best regards,
Bert Weijenberg

I found this topic while researching for https://github.com/openhab/openhab2-addons/issues/5867
I see this is an old topic and I am hoping there are maybe news about this issue.
Is there any way to connect to an RFXLan without usb ?

I contacted RFXCom today again about the topic.

I switched to 2x RfLink’s (2x frequencies) connected to a Raspberry Pi. Usb/ip to “move” usb port to oh2 server (a vm).

Only works if rflink has implemented your protocol, but way cheaper and better support compared to the rfxlan (rfxcom).

For missing protocols i used the rtl433 project and then send the c file to rflink maintainers to add the protocol to their firmware as its not open source.

I also use rtl433 for simple stuff like a doorbell signal (via mqtt to oh2)

JJ

Nice, thanks for answering about your current solution @johnjore. I star getting answers from RFXCom. For now mainly with docs about xPL but I am following up.
Nothing can be cheaper than a device I already own :slight_smile: but I agree that the support from RFXCom is ‘light’. Let’s see what comes up, there is turn around in companies and things may have improved.

Here are the docs I got so far:

I’ve been using the the RFXCOM Lan 2 port with 433 and 868 MHz with Domotiga(1) as a bridge from the RFXCOM to MQTT, which has been working reliable for quite some time. It’s not really actively maintained anymore(sadly) but it has served me very well.
(1): https://github.com/DomotiGa/DomotiGa

I am doing the same with heyu
https://github.com/HeyuX10Automation/heyu/