Cannot use ttyS0 serial port on Openhab 3

  • Platform information: Openhab 3
  • Hardware: Raspberry pi 3
  • OS: Raspbian buster
  • Java Runtime Environment: OpenJDK 11
  • openHAB version: 3
  • Issue of the topic: cannot use ttyS0 serial port

I had openhab 2 running on the same hardware (Raspberry pi 3). I used the below item to send serial command to one of my custom made devices.

Switch         HardwareButton        "Power Button"          (Entrance)   [ "Switchable" ]   { serial="/dev/ttyS0@9600,ON(POWER\n),OFF(POWER\n)" }

But after installing Openhab 3 on the Raspbian buster, this item is not working.

I’m really new in this platform and appreciate your help.

Thank you

are you using openHABian as basis? if not, you’re highly encouraged to use it - especially as a new user! :wink:

if yes, it should ootb set the permissions already; if they’re not, you could also use the options behind option 10 “Apply Improvements” in sudo openhabian-config, which grant the permissions.

If you’re a bit more experienced in Linux-systems, use the information documented here:

Hi, thank you.

I am using Rasbian buster and installed openhab 3 using apt.

The reason of using Raspbian buster is, I am also running some other services on the pi.

Again, thanks for the suggestions.

openHABian builds around raspbian OS, so you’re free to use it as basis for OH3 (highly recommended as you also get better support here!) and run your services on the pi in parallel - but in terms of stability and performance I think, it’s not really recommended to run more than necessary on the same pi. :wink:
(

Great. Thanks again. I will sure give it a try.

This is a OH version 1 binding configuration. You are going to have to re-work for the new Serial binding, using Things and channels. See the docs.

Yes. I understand so. Trying to figure it out but could not yet :frowning:

UPDATE: I’m using openhabian and it is working fine.

Thanks for all suggestions

1 Like