String Communication

Hello every one, I am new here and new with OpnHab, I try to send String from Arduino to Openhab in Rspi 4, it doesn’t work, I don’t konw where shoud I write the Code. I want to use an String Command to turn a Pin on.
Tnanks in advance.

How have you integrated the Arduino with OH? Which binding? Do you have a Thing defined? Do you have Items linked to the Thing?

To communicate with any device you need:

  1. Install a compatible binding
  2. Create/discover a Thing that represents the device
  3. Link the Channel(s) of the Thing to Item(s)

Once you have Items you sendCommand to the Item to pass that command on to the device. The nature of that command will depend on the type of the Item which is dictated by the Channel.

You would do well to go through the Concepts section of the docs as well as getting started, at least up until the UI parts of the tutorial.

1 Like