Serial connection w/ RFDuino - OH2 doesn't recieve data

Hi,

I am new to openHAB and home automation in general, I am looking to implement a small system that works with a RFDuino that sends data through the serial connection.

I have downloaded the serial binding addon and put it into the addons folder. I also have created an item to bind the data on: String Arduino “Arduino [%s]” (arduino) {serial="/dev/ttyUSB0"} and have put it into the sitemap as well: Text item = Arduino.

For not, I only want to work with static virtual data, after that I will be connecting sensors and other but I am having troubles going forward due to this small road block.

*minicom does read the data sent from the RFDuino to my linux machine

Thank you

I’m not sure if ttyUSB0 is a “standard” Serial Port within the meaning of openHAB, so please take advise from Note 2 @ bottom of https://github.com/openhab/openhab/wiki/Serial-Binding.

the port that the RFDuino ide says that the device is connected to is on ttyUSB0, ill try to change it and see how it goes.

I understand that I have to adapt the start.sh with the code given below the note, but how do I go about doing that?

Sorry, I’m new to the system and home automation in general but trying to learn as I go.

1st Question is, how do you start openHAB?

If you are using an autostart script which refers to start.sh, you have to add -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0 to the java command in start.sh:

[...]
echo Launching the openHAB runtime...
java \
    -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0 \
    -Dosgi.clean=true \
    -Declipse.ignoreApp=true \
[...]

If you are using an autostart script which calls java itself, you have to add the parameter accordingly to the autostart script.

In a script \ means, the next line belongs to the former line, so in the script the java call could also be like

java -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0 -Dosgi.clean=true -Declipse.ignoreApp=true [...]

It’s important to add the parameter as the first parameter for java.

Don’t forget to put the user openhab to the group dialout, which is the standard group for using serial devices:

sudo adduser openhab dialout

should do the trick.

Thank you! :slight_smile: