# RFLink binding

**URL:** <https://community.openhab.org/t/rflink-binding/7863>\
**Category:** Bindings\
**Tags:** rfxcom, 433, binding\
**Created:** [February 22, 2016, 3:51pm UTC](https://community.openhab.org/t/rflink-binding/7863 "2016-02-22T15:51:45Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![bbubble62](https://community.openhab.org/user_avatar/community.openhab.org/bbubble62/32/69497_2.png) [@bbubble62](https://community.openhab.org/u/bbubble62)\
**Post date:** [November 2, 2016, 10:44am UTC](https://community.openhab.org/t/rflink-binding/7863/13 "2016-11-02T10:44:32Z")

</div>

Hi,

I decided not to wait for the binding and coded everything in python and openhab (RPI3 and OH2 as platform):

- Made a python script that reads/writes data from RFLINK (USB) to/from MQTT (also on RPI3) ;  
This merely a s/w gateway that reads data from rflink and sends it (unmodified) to MQTT and vice versa ;
- In openhab2 I defined two items : rflinkTX and rflinkRX

```csv
String rfLinkRx "rfRx: [%s]" {mqtt="<[mybroker:rflink/rx:state:default]"}
String rfLinkTx "[%s]" {mqtt=">[mybroker:rflink/tx:command:*:default]"}

```

- In a rule I parse the incoming string and take action :

```php
rule "rfLinkRX"
    when
        Item rfLinkRx received update
    then
        //parse data here...
        //pushover("rfLink: " + rfLink.state) //test 
    end

```

- For sending commands also a rule is created (per item):

```php
rule "Lamp1Button" // lamp on/off button
    when
        Item lamp1Button changed
    then
        rfLinkTx.sendCommand("10;Kaku;00004b;2;" + lamp1Button.state)
    end 

```

I know this is not as convienent as having a binding but it is a ‘good’ workaround to get the gateway going.

-ben

---

_[View the full topic](https://community.openhab.org/t/rflink-binding/7863)._
