Problem getting serial to work after 1.7 -> 1.8 migration

I was running Openhab 1.7 for a few month with MySensors gateway connected on USB port and serial binding. Decided to change HW, so did a clean install, but can’t get serial to work. I’d appreciate any help to get what I’m missing.

My setup is Intel NUC computer with Ubuntu server on it. Obviously, I installed current Openhab version, that’s a change from previous setup. Serial binding installed, items file unchanged, the item in question defined as follows:

String Arduino "Arduino string" { serial="/dev/ttyUSB0@57600" }

That item doesn’t receive any updates even thou MySensors gateway is sending data over /dev/ttyUSB0, I checked it with minicom tool.

It is the only serial item in my config. User openhab added to dialout group. Tried to play with different serial speeds, no luck. Tried to add port as non-standard to openhab.sh, no luck.

Really, what I’m missing? Or, how to debug it?

I’m still on 1.7.1, but have had to include the serial port in my start.sh. Is this what you mean when you say you added the port to openhab.sh? In case not, the line is:

-Dgnu.io.rxtx.SerialPorts=/dev/arduino_gateway

where /dev/arduino_gateway is a symlink to the serial port that the arduino is on. My corresponding item is defined as:

String	Arduino	"Arduino Gateway [%s]"	{ serial="/dev/arduino_gateway@115200" }

I think I recall reading somewhere that the speed needed to be set at 115200 but could be wrong. Also the item label may need the [%s].

Use the log tail in a terminal window, mod up the logging file to debug as opposed to info and have a look see…
I did this to see if my amp was returning values over serial.

Switched to debug logging, restarted openhab. Nothing regarding serial in the log…

Thanks for your questions/suggestions.

Yes, thats what I ment.

[%s] is output formatting when displaying the string, I have difficulty having the string.

57600 speed was working for me previously. But I tried 115200 too with no avail.

I assume your openhab user has the appropriate permissions? i.e. it has been added to the dialout group?

If you have, I can’t really think of anything else, assuming you are sure that port name is correct (I’m also running on ubuntu, and the port changes when the USB is unplugged/plugged etc, and so the use of symlinks).

for what its worth, I had no issues changing from 1.7 to 1.8 using serial.
I added openhab to the dialout group and didnt change the start.sh (at all, ever) or anything like that.

I had problems upgrading to 1.8.0
Can you please explain what you did when upgrading?
I tried it once and changed only /server and /addons and /workspace folders with the new files but I was facing problems with this approach.

On ubuntu, it’s in my repository setup and the updates program offered 1.8, I hit yes and the rest is history lol

Yes, openhab user added to dialout group. Port name is correct and working,
as I mentioned, I can test it with other tools outside openhab.

On Mon, 1 Feb 2016 at 11:24 - bot@community.openhab.org wrote:

smar https://community.openhab.org/users/smar -
https://community.openhab.org/users/smar
February 1

I assume your openhab user has the appropriate permissions? i.e. it has
been added to the dialout group?

If you have, I can’t really think of anything else, assuming you are sure
that port name is correct (I’m also running on ubuntu, and the port changes
when the USB is unplugged/plugged etc, and so the use of symlinks).

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/6
or reply to this email to respond.

Previous Replies
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
January 31

Thanks for your questions/suggestions.

Yes, thats what I ment.

[%s] is output formatting when displaying the string, I have difficulty
having the string.

57600 speed was working for me previously. But I tried 115200 too with no
avail.
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
January 31

Switched to debug logging, restarted openhab. Nothing regarding serial in
the log…

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/6
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
https://community.openhab.org/my/preferences

Veiksmi,
Jānis

Sorry, not a lot else to suggest then. I assume you’ve confirmed that the serial binding is properly loaded (via OSGI console)?

I did clean install of Ubuntu. Installed openhab-runtime and all other
openhab* packages listed on the old system. Did main config file changes
manually, just ntp and milight binding config there, both working. Copied
items, sitemap, rules and some other config files from configurations
directory. Copied some icons. Copied mapdb and rrd4j data files. Not that I
remember every single detail, but I hope you can understand the approach.

On Mon, 1 Feb 2016 at 21:59 Dirk Clemens bot@community.openhab.org wrote:

dirkc https://community.openhab.org/users/dirkc Dirk Clemens
https://community.openhab.org/users/dirkc
February 1

I had problems upgrading to 1.8.0
Can you please explain what you did when upgrading?
I tried it once and changed only /server and /addons and /workspace
folders with the new files but I was facing problems with this approach.

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/8
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
https://community.openhab.org/my/preferences

Veiksmi,
Jānis

No, I haven’t had an opportunity to use/learn OSGI console yet. I think I
understand the concept, but I don’t see a topic in openhab wiki about OSGI
console, must be a java environment thing, right? From the other hand, I
can see that openhab has
installed /usr/share/openhab/server/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
Do I run that jar in console mode? Generally speaking, where/how do I start
with it for practical purposes?

On Wed, Feb 3, 2016 at 12:25 PM - bot@community.openhab.org wrote:

smar https://community.openhab.org/users/smar -
https://community.openhab.org/users/smar
February 3

Sorry, not a lot else to suggest then. I assume you’ve confirmed that the
serial binding is properly loaded (via OSGI console)?

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/11
or reply to this email to respond.

Previous Replies
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
February 2

Yes, openhab user added to dialout group. Port name is correct and
working, as I mentioned, I can test it with other tools outside openhab.

On Mon, 1 Feb 2016 at 11:24 - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 1

I assume your openhab user has the appropriate permissions? i.e. it has
been added to the dialout group?

If you have, I can’t really think of anything else, assuming you are sure
that port name is correct (I’m also running on ubuntu, and the port changes
when the USB is unplugged/plugged etc, and so the use of symlinks).

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community January 31

Thanks for your questions/suggestions.

Yes, thats what I ment.

[%s] is output formatting when displaying the string, I have difficulty
having the string.

57600 speed was working for me previously. But I tried 115200 too with no
avail. jtupulis Profile - jtupulis - openHAB Community Janis
Tupulis Profile - jtupulis - openHAB Community January 31

Switched to debug logging, restarted openhab. Nothing regarding serial in
the log…

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

Veiksmi, Jānis

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/11
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
https://community.openhab.org/my/preferences

Veiksmi,
Jānis

To access the OSGI console, first you need to check that your openhab startup includes the argument:

-console=5555

You then telnet onto the openhab server at that port. If for example, you are in a shell on the openhab server itself, you’d enter:

telnet localhost 5555

If all is well, you will get an osgi> prompt. Basic commands for the osgi console are given here: https://github.com/openhab/openhab/wiki/Commands-for-the-OSGi-console

If you use the ss command, you’ll get a list of all the installed bundles and their status. Running that just now on mine, I see the serial binding line as follows:

222 ACTIVE org.openhab.binding.serial_1.7.1

This tells me that my serial binding (with ID 222) is active and working correctly.

Thanks for giving the short intro, sometimes you can’t find this kind of
advice searcing for hours on yourself :slight_smile:

Actually, serial is not even on the list for me, no org.openhab.io.serial
there. openhab-addon-io-serial package is installed.

Plus, after exiting OSGI console, I can’t connect to it anymore: telnet:
Unable to connect to remote host: Connection refused

On Fri, Feb 5, 2016 at 9:34 PM - bot@community.openhab.org wrote:

smar https://community.openhab.org/users/smar -
https://community.openhab.org/users/smar
February 5

To access the OSGI console, first you need to check that your openhab
startup includes the argument:

-console=5555

You then telnet onto the openhab server at that port. If for example, you
are in a shell on the openhab server itself, you’d enter:

telnet localhost 5555

If all is well, you will get an osgi> prompt. Basic commands for the osgi
console are given here:
Commands for the OSGi console · openhab/openhab1-addons Wiki · GitHub

If you use the ss command, you’ll get a list of all the installed bundles
and their status. Running that just now on mine, I see the serial binding
line as follows:

222 ACTIVE org.openhab.binding.serial_1.7.1

This tells me that my serial binding (with ID 222) is active and working
correctly.

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/14
or reply to this email to respond.

Previous Replies
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
February 4

No, I haven’t had an opportunity to use/learn OSGI console yet. I think I
understand the concept, but I don’t see a topic in openhab wiki about OSGI
console, must be a java environment thing, right? From the other hand, I
can see that openhab has installed
/usr/share/openhab/server/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
Do I run that jar in console mode? Generally speaking, where/how do I start
with it for practical purposes?

On Wed, Feb 3, 2016 at 12:25 PM - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 3

Sorry, not a lot else to suggest then. I assume you’ve confirmed that the
serial binding is properly loaded (via OSGI console)?

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #11 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community February 2

Yes, openhab user added to dialout group. Port name is correct and
working, as I mentioned, I can test it with other tools outside openhab.

On Mon, 1 Feb 2016 at 11:24 - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 1

I assume your openhab user has the appropriate permissions? i.e. it has
been added to the dialout group?

If you have, I can’t really think of anything else, assuming you are sure
that port name is correct (I’m also running on ubuntu, and the port changes
when the USB is unplugged/plugged etc, and so the use of symlinks).

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community January 31

Thanks for your questions/suggestions.

Yes, thats what I ment.

[%s] is output formatting when displaying the string, I have difficulty
having the string.

57600 speed was working for me previously. But I tried 115200 too with no
avail. jtupulis Profile - jtupulis - openHAB Community Janis
Tupulis Profile - jtupulis - openHAB Community January 31

Switched to debug logging, restarted openhab. Nothing regarding serial in
the log…

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community


Veiksmi, Jānis

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #11 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

Veiksmi, Jānis
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
February 4

I did clean install of Ubuntu. Installed openhab-runtime and all other
openhab* packages listed on the old system. Did main config file changes
manually, just ntp and milight binding config there, both working. Copied
items, sitemap, rules and some other config files from configurations
directory. Copied some icons. Copied mapdb and rrd4j data files. Not that I
remember every single detail, but I hope you can understand the approach.

On Mon, 1 Feb 2016 at 21:59 Dirk Clemens bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

dirkc Profile - dirkc - openHAB Community Dirk Clemens
Profile - dirkc - openHAB Community February 1

I had problems upgrading to 1.8.0 Can you please explain what you did when
upgrading? I tried it once and changed only /server and /addons and
/workspace folders with the new files but I was facing problems with this
approach.

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #8 by dirkc
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

Veiksmi, Jānis

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/14
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
https://community.openhab.org/my/preferences

Veiksmi,
Jānis

Did you exit telnet with CTRL-C? If so, that would have killed your openhab session as well.

I don’t have 1.8.1 installed yet, but looking at its addons bundle, I see org.openhab.binding.serial-1.8.1.jar. Do you have this installed in your addons folder? If so, could it be corrupt?

Yes, it was installed. But timestamps looked suspicious (date was different
than for other files), so I reinstalled corresponding package, updated my
system and it’s alright now, serial is working. Thanks for helping me to
figure it out!

I’m not sure, but it is possible that I made a mistake during installation.
It appears that serial needs both binding and io packages to be installed,
binding seem to be dependent on io. It is possible that I first installed
just io, binding later and they didn’t match somehow.

Btw, is OSGI console documented somewhere? Seem like a helpful tool.

On Sat, Feb 6, 2016 at 12:46 AM - bot@community.openhab.org wrote:

smar https://community.openhab.org/users/smar -
https://community.openhab.org/users/smar
February 5

Did you exit telnet with CTRL-C? If so, that would have killed your
openhab session as well.

I don’t have 1.8.1 installed yet, but looking at its addons bundle, I see
org.openhab.binding.serial-1.8.1.jar. Do you have this installed in your
addons folder? If so, could it be corrupt?

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/16
or reply to this email to respond.

Previous Replies
jtupulis https://community.openhab.org/users/jtupulis Janis Tupulis
https://community.openhab.org/users/jtupulis
February 5

Thanks for giving the short intro, sometimes you can’t find this kind of
advice searcing for hours on yourself [image: :slightly_smiling:]

Actually, serial is not even on the list for me, no org.openhab.io.serial
there. openhab-addon-io-serial package is installed.

Plus, after exiting OSGI console, I can’t connect to it anymore: telnet:
Unable to connect to remote host: Connection refused

On Fri, Feb 5, 2016 at 9:34 PM - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 5

To access the OSGI console, first you need to check that your openhab
startup includes the argument:

-console=5555

You then telnet onto the openhab server at that port. If for example, you
are in a shell on the openhab server itself, you’d enter:

telnet localhost 5555

If all is well, you will get an osgi> prompt. Basic commands for the osgi
console are given here:
Commands for the OSGi console · openhab/openhab1-addons Wiki · GitHub

If you use the ss command, you’ll get a list of all the installed bundles
and their status. Running that just now on mine, I see the serial binding
line as follows:

222 ACTIVE org.openhab.binding.serial_1.7.1

This tells me that my serial binding (with ID 222) is active and working
correctly.

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #14 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community February 4

No, I haven’t had an opportunity to use/learn OSGI console yet. I think I
understand the concept, but I don’t see a topic in openhab wiki about OSGI
console, must be a java environment thing, right? From the other hand, I
can see that openhab has installed
/usr/share/openhab/server/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
Do I run that jar in console mode? Generally speaking, where/how do I start
with it for practical purposes?

On Wed, Feb 3, 2016 at 12:25 PM - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 3

Sorry, not a lot else to suggest then. I assume you’ve confirmed that the
serial binding is properly loaded (via OSGI console)?

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #11 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community February 2

Yes, openhab user added to dialout group. Port name is correct and
working, as I mentioned, I can test it with other tools outside openhab.

On Mon, 1 Feb 2016 at 11:24 - bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

smar Profile - smar - openHAB Community -
Profile - smar - openHAB Community February 1

I assume your openhab user has the appropriate permissions? i.e. it has
been added to the dialout group?

If you have, I can’t really think of anything else, assuming you are sure
that port name is correct (I’m also running on ubuntu, and the port changes
when the USB is unplugged/plugged etc, and so the use of symlinks).

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

Previous Replies jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community January 31

Thanks for your questions/suggestions.

Yes, thats what I ment.

[%s] is output formatting when displaying the string, I have difficulty
having the string.

57600 speed was working for me previously. But I tried 115200 too with no
avail. jtupulis Profile - jtupulis - openHAB Community Janis
Tupulis Profile - jtupulis - openHAB Community January 31

Switched to debug logging, restarted openhab. Nothing regarding serial in
the log…

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #6 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

– Veiksmi, Jānis

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #11 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

Veiksmi, Jānis jtupulis Profile - jtupulis - openHAB Community
Janis Tupulis Profile - jtupulis - openHAB Community February 4

I did clean install of Ubuntu. Installed openhab-runtime and all other
openhab* packages listed on the old system. Did main config file changes
manually, just ntp and milight binding config there, both working. Copied
items, sitemap, rules and some other config files from configurations
directory. Copied some icons. Copied mapdb and rrd4j data files. Not that I
remember every single detail, but I hope you can understand the approach.

On Mon, 1 Feb 2016 at 21:59 Dirk Clemens bot@community.openhab.org
https://community.openhab.orgmailto:bot@community.openhab.org wrote:

dirkc Profile - dirkc - openHAB Community Dirk Clemens
Profile - dirkc - openHAB Community February 1

I had problems upgrading to 1.8.0 Can you please explain what you did when
upgrading? I tried it once and changed only /server and /addons and
/workspace folders with the new files but I was facing problems with this
approach.

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #8 by dirkc
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community


Veiksmi, Jānis

Visit Topic
Problem getting serial to work after 1.7 -> 1.8 migration - #14 by smar
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
openHAB Community

Veiksmi, Jānis

Visit Topic
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/16
or reply to this email to respond.

To stop receiving notifications for this particular topic, click here
https://community.openhab.org/t/problem-getting-serial-to-work-after-1-7-1-8-migration/6968/unsubscribe.
To unsubscribe from these emails, change your user preferences
https://community.openhab.org/my/preferences

Veiksmi,
Jānis

Great to hear that you’ve got it sorted. I’m not aware of any other openhab specific OSGI links other than the one in my previous post. However, you can find info in the openhab forums (including the old Google Groups openhab forum), which is where I picked up from.

1 Like