Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation #15

Open
4noxx opened this issue Jan 4, 2018 · 24 comments
Open

installation #15

4noxx opened this issue Jan 4, 2018 · 24 comments

Comments

@4noxx
Copy link

4noxx commented Jan 4, 2018

hello

how can i install and configure this addon?

@johnjore
Copy link
Collaborator

johnjore commented Jan 5, 2018

I personally created an OH2 dev environment and imported this plugin, made a few changes and then exported the plugin as a jar file to import to my main OH2 installation. There may be a quicker and simpler way to do this. When I get some time next weekend, I'll take a stab at incorporating the outstanding PR and put a copy of the resulting jar file on Dropbox and paste a link here.

Ps: its not complicated to do if you follow the guides.

@4noxx
Copy link
Author

4noxx commented Jan 5, 2018

thx for your answer.
i will wait for your dropbox-files and hope you can explain what i must do with this and
how can i find and add my devices.
regard

@fab33
Copy link

fab33 commented Jan 5, 2018

It can be a good idea to publish Jar file on openhab marketplace
Or here in the release.

@4noxx
Copy link
Author

4noxx commented Jan 9, 2018

@johnjore
any news?

regard

@johnjore
Copy link
Collaborator

johnjore commented Jan 9, 2018

eh... next weekend is in 4 days... So sorry no, no news.

@4noxx
Copy link
Author

4noxx commented Jan 9, 2018

ups, sry :-)

@fab33
Copy link

fab33 commented Jan 15, 2018

@johnjore : did you have time to make a jar ?

@johnjore
Copy link
Collaborator

I did find time to work on this, but there were problems committing the changes, so more work todo before I can create the JAR file. I'll need to wait until the weekend to continue working on this. See PR #17 for details.

@johnjore
Copy link
Collaborator

Looks like first half of the changes have been merged. I'll try to find time to process the 2nd half of the changes this weekend and generate a new jar file.

@4noxx
Copy link
Author

4noxx commented Jan 19, 2018

thx

@johnjore
Copy link
Collaborator

A dev version of the binding can be found here:
https://www.dropbox.com/s/ab7j8dz1m9itqi6/org.openhab.binding.rflink_2.2.0.201801210944.jar?dl=0

Its based on the yet to be committed PR #18

It worked for me; X10 (DS90) door/window sensors, RTS/Somfy blind, X10 Switch (On/Off) but ymmv.

JJ

PS: Seen random posts mixing me and cyrilcc. Please keep in mind that I'm not the maintainer of this binding. I just happen to use it and have been able to contribute to it.

@fab33
Copy link

fab33 commented Jan 22, 2018

Doesn't work for me
I already have a serial device (a MySensors gateway /dev/mysgw) working fine.
For Rflink (dev/rflink) debug I have :

22:07:19.717 [DEBUG] [.rflink.internal.RfLinkHandlerFactory] - RfLinkHandlerFactory createHandler(rflink:bridge:usb0)
22:07:19.718 [DEBUG] [org.openhab.binding.rflink           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=363, service.bundleid=246, service.scope=singleton} - org.openhab.binding.rflink
22:07:19.719 [DEBUG] [ng.rflink.handler.RfLinkBridgeHandler] - Initializing RFLink bridge handler
22:07:19.720 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'rflink:bridge:usb0' changed from UNINITIALIZED to INITIALIZING
22:07:19.721 [DEBUG] [ng.rflink.handler.RfLinkBridgeHandler] - Checking RFLink transceiver connection, thing status = OFFLINE
22:07:19.721 [DEBUG] [ng.rflink.handler.RfLinkBridgeHandler] - Connecting to RFLink transceiver on /dev/rflink port
22:07:19.722 [DEBUG] [flink.connector.RfLinkSerialConnector] - RfLinkRxTxConnector()
22:07:19.722 [DEBUG] [flink.connector.RfLinkSerialConnector] - Disconnecting
22:07:19.722 [DEBUG] [flink.connector.RfLinkSerialConnector] - Closed
22:07:19.723 [DEBUG] [flink.connector.RfLinkSerialConnector] - connect(/dev/rflink)
22:07:19.723 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'rflink:bridge:usb0' changed from INITIALIZING to OFFLINE
22:07:19.723 [DEBUG] [flink.connector.RfLinkSerialConnector] - Found port : /dev/mysgw
22:07:19.724 [ERROR] [flink.connector.RfLinkSerialConnector] - Could not find COM port /dev/rflink
22:07:19.724 [ERROR] [ng.rflink.handler.RfLinkBridgeHandler] - Connection to RFLink transceiver failed: Could not find COM port /dev/rflink
22:07:19.726 [DEBUG] [.rflink.internal.RfLinkHandlerFactory] - RfLinkHandlerFactory createHandler(rflink:temperature:usb0:myTemperature)
22:07:19.727 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'rflink:temperature:usb0:myTemperature' changed from UNINITIALIZED to INITIALIZING
22:07:19.734 [DEBUG] [.binding.rflink.handler.RfLinkHandler] - Initializing thing rflink:temperature:usb0:myTemperature, deviceId=Tunex-D901
22:07:19.738 [DEBUG] [.binding.rflink.handler.RfLinkHandler] - initializeBridge OFFLINE for thing rflink:temperature:usb0:myTemperature

the Rflink works with a simple 'cat' command ...
If I diable mysensors gateway it doesn't work too ...
mysensors plugin use openhab-transport-serial like this binding.

@fab33
Copy link

fab33 commented Jan 22, 2018

Ok finnaly it works by adding

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/mysgw:/dev/rflink"

strange that it deosn't needed for mysensors binding.

@johnjore
Copy link
Collaborator

Good that you got it working. Maybe your could add some details to the README.md file under configuration, like where the "EXTRA_JAVA_OPTS" is set, as others may also have this issue?

I personally have two RfLinks connected to a Raspberry Pi, and then use usbip to "move" the USB ports to a virtual machine, and I've had no issues for months. I can only guess there is something different with the USB-to-Serial chip used by your RfLink, compared to the MySensor one, and the Java library

@4noxx
Copy link
Author

4noxx commented Jan 26, 2018

had try it with my intertechno switch. will not work

things:
Bridge rflink:bridge:usb0 [ serialPort="/dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_8563431383935101A201-if00", baudRate=57600 ] {
switch Kaku [ deviceId="arc-010af15e" ]
}

item:
Switch Kaku "Contact [%s]" {channel="rflink:switch:usb0:arc-010af15e:command"}

old mqtt-log:
rflink/NewKaku/010af15e/R/message 20;48;NewKaku;ID=010af15e;SWITCH=1;CMD=ON;

@johnjore
Copy link
Collaborator

Your config appears wrong, especially the name of the "thing", Kaku. Re-read the documentation, maybe add the X10 switch from there to your setup and make sure logging is enabled for the module and try again.

The log file will show what RfLink is doing, the commands sent to it, and the response received back, for your device and one from the documentation.

I suspect this might work; is a copy of the X10 config shown in the example:
switch arc-010af15e-1 [ deviceId="arc-010af15e-1" ]

@4noxx
Copy link
Author

4noxx commented Jan 27, 2018

hmm, problem to connect to my rflink

2018-01-27 16:46:41.641 [ERROR] [g.rflink.handler.RfLinkBridgeHandler] - Connection to RFLink transceiver failed: Could not find COM port /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_8563431383935101A201-if00

@4noxx
Copy link
Author

4noxx commented Jan 27, 2018

RFLINK works now
2018-01-27 17:35:44.574 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'rflink:switch:usb0:NewKaku_010af15e_1' to inbox

but not my switches :-(
nothings happens

.thing:
Bridge rflink:bridge:usb0 [serialPort="/dev/ttyACM0", baudRate=57600 ] {
switch Kaku [ deviceId="NewKaku_010af15e_1" ]
}

.items:
Switch Kaku "Contact [%s]" {channel="rflink:switch:usb0:NewKaku_010af15e_1:command"}

@johnjore
Copy link
Collaborator

Same problem here as others have, in that the protocol is not included as part of the device name. See readme.md file for details. Without this information, the binding does not know what protocol to tell the rflink to use when sending a command. See my example in my post on Jan 27th.

There are at least two possible workarounds for this:

  1. Update the discovery process to include the protocol as part of the name
  2. Find a way to read the deviceId at runtime and extract the protocol information

Feel free to update the plugin with any of these two to resolve this problem for "everyone". I personally dont have the time as there is a workaround documented in the readme.md file...

@ninjax95
Copy link

Please, I not find the tutorial for install to openhab2, Can you help me ? Thanks

@Leemur89
Copy link

Leemur89 commented Dec 2, 2018

I know this is an old topic but I struggled a lot for the installation so I thought I could share my findings with everyone:

There is a Travis job here (jar file is automatically built uppon each commit here)
https://github.com/cartemere/org.openhab.binding.rflink/releases
Go to asset and download the jar file. Place it in the openhab add-on folder

Then you need to add openhab user to tty and dialout groups.

Finally, update the openhab config file /etc/default/openhab2 by adding

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

@Tontze
Copy link

Tontze commented Feb 14, 2020

I know this is an old topic but I struggled a lot for the installation so I thought I could share my findings with everyone:

There is a Travis job here (jar file is automatically built uppon each commit here)
https://github.com/cartemere/org.openhab.binding.rflink/releases
Go to asset and download the jar file. Place it in the openhab add-on folder

Then you need to add openhab user to tty and dialout groups.

Finally, update the openhab config file /etc/default/openhab2 by adding

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Howdo you do this in windows ?

@cartemere
Copy link
Collaborator

cartemere commented Feb 15, 2020 via email

@johnjore
Copy link
Collaborator

If using Docker, I added this:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants