RFLink binding

i had installed this 3 here:
sudo pip install serial
sudo pip install tornado
sudo pip install tornado-mqtt

it seems that
MQTTClient.py
and
SerialProcess.py
runs now.
but not
RFLinkGateway.py

[18:14:50] openhabian@openHABianPi:~/RFLinkGateway$ ./RFLinkGateway.py
Traceback (most recent call last):
  File "./RFLinkGateway.py", line 37, in <module>
    fh = logging.FileHandler(os.getenv('RFLINK_LOG_FILE', '/var/log/RFLinkGateway.log'))
  File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/RFLinkGateway.log'

any idea?

start the gateway with python RFLinkGateway.py

make sure to adjust the config file accordingly to your needs. The error you are seeing means you don’t have the rights to write the logfile in the /var/log directory

thx. i try it with sudo

 sudo python RFLinkGateway.py
2018-01-08 21:16:01,184 - RFLinkGW.SerialProcessing - __init__ - INFO - Starting...
Traceback (most recent call last):
  File "RFLinkGateway.py", line 78, in <module>
    main()
  File "RFLinkGateway.py", line 61, in main
    sp = SerialProcess.SerialProcess(messageQ, commandQ, config)
  File "/home/openhabian/RFLinkGateway/SerialProcess.py", line 19, in __init__
    self.sp = serial.Serial()
AttributeError: 'module' object has no attribute 'Serial'

next error

i tink it runs now…
i had installed
sudo python -m pip install pyserial

now i get

[22:44:20] openhabian@openHABianPi:~/RFLinkGateway$ sudo python RFLinkGateway.py
2018-01-08 22:44:32,511 - RFLinkGW.SerialProcessing - __init__ - INFO - Starting...
2018-01-08 22:44:32,513 - RFLinkGW.SerialProcessing - connect - INFO - Connecting to serial
2018-01-08 22:44:32,515 - RFLinkGW.SerialProcessing - __init__ - INFO - Ignoring devices: [u'Friedland', u'Oregon Temp/FD10', u'BL999', u'RTS']
2018-01-08 22:44:32,522 - RFLinkGW.MQTTClient - __init__ - INFO - Starting...
2018-01-08 22:44:32,527 - RFLinkGW.MQTTClient - __init__ - INFO - Connection with credentials (user: user).
2018-01-08 22:44:32,566 - RFLinkGW.MQTTClient - _on_connect - INFO - Connected to broker. Return code: Connection Accepted.
2018-01-08 22:44:33,449 - RFLinkGW.SerialProcessing - prepare_output - INFO - Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R47

can i see in the RFLinkGateway.log which devices rflink has found?

hello

the LOG show now (only) this:

2018-01-09 07:03:20,508 - RFLinkGW.SerialProcessing - __init__ - INFO - Starting...
2018-01-09 07:03:20,511 - RFLinkGW.SerialProcessing - connect - INFO - Connecting to serial
2018-01-09 07:03:20,519 - RFLinkGW.SerialProcessing - __init__ - INFO - Ignoring devices: [u'Friedland', u'Oregon Temp/FD10', u'BL999', u'RTS']
2018-01-09 07:03:20,526 - RFLinkGW.MQTTClient - __init__ - INFO - Starting...
2018-01-09 07:03:20,534 - RFLinkGW.MQTTClient - __init__ - INFO - Connection with credentials (user: user).
2018-01-09 07:03:20,574 - RFLinkGW.MQTTClient - _on_connect - INFO - Connected to broker. Return code: Connection Accepted.
2018-01-09 07:03:21,445 - RFLinkGW.SerialProcessing - prepare_output - INFO - Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R47
2018-01-09 07:51:42,394 - RFLinkGW.SerialProcessing - prepare_output - INFO - Cresta

in the mosquitto.log i see this:

....
1515481682: New connection from 192.168.1.208 on port 1883.
1515481682: New client connected from 192.168.1.208 as b1d8c5bf-21ea-4c40-aa7b-6273051a891a (c1, k60, u'user').
1515481682: Client b1d8c5bf-21ea-4c40-aa7b-6273051a891a disconnected.
1515481682: New connection from 192.168.1.208 on port 1883.
1515481682: New client connected from 192.168.1.208 as 6ad2499a-aab4-44f3-836f-d7d391a6c55f (c1, k60, u'user').
1515481682: Client 6ad2499a-aab4-44f3-836f-d7d391a6c55f disconnected.
1515481682: New connection from 192.168.1.208 on port 1883.
1515481682: New client connected from 192.168.1.208 as e91f9d12-0410-4df6-935b-0551e1ee4e64 (c1, k60, u'user').
1515481682: Client e91f9d12-0410-4df6-935b-0551e1ee4e64 disconnected.
1515481684: Socket error on client RFLinkGateway, disconnecting.
1515482591: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515484392: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515486193: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515487994: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515489795: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515491596: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515493397: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515495198: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515496999: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515498801: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515500602: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515502403: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515504204: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515506005: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515507806: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515509607: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1515510726: Client DVES_862B6C has exceeded timeout, disconnecting.
1515510726: Socket error on client DVES_862B6C, disconnecting.
1515510746: New connection from 192.168.1.71 on port 1883.
1515510746: New client connected from 192.168.1.71 as DVES_862B6C (c1, k15, u'openhabian').
1515511408: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
  1. i think somewhere is a error, or?
  2. where can i find my devices that rflink has found?

in other tool i find with rflink every few seconds devices infos (e.g. FHEM, Pimatic, Home Assistant)

regard and thx for help

EDIT

here is something:

 mosquitto_sub -t "rflink/#"
aa
20;17;Cresta;ID=3D01;TEMP=0456;HUM=aa;BAT=OK;

OK
111.0
86
20;18;Cresta;ID=AB04;TEMP=0016;HUM=86;BAT=OK;

OK
2.2
2.1
OK
1.7
4.0
-0.2
20;19;Cresta;ID=8201;WINDIR=0015;WINSP=0028;WINGS=002c;WINTMP=0011;WINCHL=8002;BAT=OK;

4.4
93
20;1A;Cresta;ID=6703;TEMP=0015;HUM=93;BAT=OK;

OK
2.1
aa
20;1B;Cresta;ID=3D01;TEMP=0456;HUM=aa;BAT=OK;

OK
111.0
0.0
OK
1.8
4.0
-0.2
20;1C;Cresta;ID=8201;WINDIR=0000;WINSP=0028;WINGS=002c;WINTMP=0012;WINCHL=8002;BAT=OK;

4.4
86
20;1D;Cresta;ID=AB04;TEMP=0017;HUM=86;BAT=OK;

OK
2.3
93
20;1E;Cresta;ID=6703;TEMP=0015;HUM=93;BAT=OK;

i can now receice via python script. but it is possible to send data?

openhabian@openHABianPi:~$ mosquitto_sub -v -t "rflink/#"
rflink/NewKaku/010af15e/R/message 20;A5;NewKaku;ID=010af15e;SWITCH=1;CMD=OFF;

rflink/NewKaku/010af15e/R/CMD OFF
rflink/NewKaku/010af15e/R/SWITCH 1
rflink/NewKaku/010af15e/R/message 20;A6;NewKaku;ID=010af15e;SWITCH=1;CMD=ON;

rflink/NewKaku/010af15e/R/CMD ON
rflink/NewKaku/010af15e/R/SWITCH 1

this item will not work:

Switch Inter_ON "Inter_ON" {mqtt=">[mosquitto:rflink/NewKaku/010af15e/R/CMD:command:ON:1],>[mosquitto:rflink/NewKaku/010af15e/R/CMD:command:OFF:0]" }
1 Like

no idea? my NewKaku Switch will not work

I’m new and I have the same problem. Receiving works, but I can’t send anything using mqtt. Is transmitting supported?

think, that this dont work.
hope for a OH-binding.
on the Homepage of RFLINK
http://www.rflink.nl/blog2/links
you see a link to an old binding-source code.

Unfortunately this binding dont work.

i wrote a email to RFlink, its better to delete
this Link to

hope in the next time OH2 have a better solution as this
python script.

Why did you say this binding doesn’t work ? Cyril is working on it and tell us he finally gave us a jar file this week-end if he can.

sry, perhaps wrong words.

at the moment the binding doesnt work :wink:

Guys, did you read read.me to the end?
There is another topic for writing. I use it especially for radio controlled power sockets :).

Every change should be published to topic: [mqtt_prefix]/[device_type]/[device_id]/W/[switch_ID]
/data/RFLINK/TriState/8556a8/W/1 ON

Thanks, I will check it after work. Please change readme.md:

Output data
Application pushes informations to MQTT broker in following format: [mqtt_prefix]/[device_type]/[device_id]/R/[parameter]

to

Output data
Application pushes informations to MQTT broker in following format: [mqtt_prefix]/[device_type]/[device_id]/W/[parameter]

It confused me :wink:

Hey guys,
everyone interested in the binding, I compiled a fresh new version for OH 2.2.
Just drop the jar in /usr/share/openhab2/addons and restart Openhab.

It can be found here: https://drive.google.com/open?id=1ofEXq7ygx_sXcgOt4tz3DYK4FxBkRJF_

sha512 sum:

33e88635e2459bb5a627022dd892f2de7081bb19a7569b063b5138d3f956c57ae39ae6d8c5b13d0673a482756965407a5b3d6e53adb554d323befa22c16df5ae

Enjoy. :slight_smile:

2 Likes

Did you consider to bring it into the eclipse marketplace?

1 Like

It would be great if it is available trough marketplace @hExPY , please :slight_smile: ?

Hey @dakipro i also like to have it distributed by marketplace. Sadly i’am not a member of the core development team and also don’t have any experience in releasing bindings trough marketplace. It would be great if you could set up an issue at github. :slight_smile:

@hExPY I guess I could do that, but the link mentioned above says that it is very easy to do via Pull Request. I am basically just a (very happy) user of openHab, never done much contributing, especially the code wise, but I guess you can make a pull request that includes your code (you as you know/wrote the code, so it makes most sense :slight_smile: ) and those who have access to it will certainly go over the code and either suggest some improvements or just make it available (or provide instructions on further actions).
I noticed that people here love contributors, so I guess you will become a rockstar soon :man_dancing:

It is works why the version openhab 2.3 ?

Up please,
Could someone super nice give me the procedure to follow to install the binding rflink in manual. I can not find it in the binding menu.

Thanks