Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[Serial] Issue with BASE64 option #5542

Closed
TheNetStriker opened this issue Apr 6, 2018 · 4 comments · Fixed by #5543
Closed

[Serial] Issue with BASE64 option #5542

TheNetStriker opened this issue Apr 6, 2018 · 4 comments · Fixed by #5543

Comments

@TheNetStriker
Copy link
Contributor

Expected Behavior

The serial binding readme states that adding the option ",BASE64 " to the config string enables the Base64 mode.

Current Behavior

Since this commit was merged this doesn't work as intended any more. The problem is that in the SerialBinding.java class at line 169 the last character of the config string is always cut off. So when entering "BASE64" this turns into "BASE6" and the base64 mode is not enabled. As a workarround I now just entered "BASE64(" and this now enables the base64 mode.

Possible Solution

One way to solve this would be to change the documentation so that always BASE64() should be entered. Also the string at line 177 should be changed to "BASE64(".

Steps to Reproduce (for bugs)

Just add a serial port with only BASE64 as option.

Context

This is just a confusing bug.

Your Environment

OpenHabian on Raspberry Pi 3

@9037568 9037568 changed the title Serial binding issue with BASE64 option [Serial] Issue with BASE64 option Apr 7, 2018
@9037568
Copy link
Contributor

9037568 commented Apr 7, 2018

Well, I was going to add a set of tests for validating the binding config parsing, but that would require a heavy refactoring because the binding tries to connect the ports while parsing the config.

So we'll have to settle for just fixing the parsing failure.

9037568 added a commit to 9037568/openhab that referenced this issue Apr 7, 2018
Clean up compiler warnings.
Make minor fixes in README.md.

Fixes openhab#5542
@9037568
Copy link
Contributor

9037568 commented Apr 7, 2018

Here's a test jar
org.openhab.binding.serial-1.12.0-SNAPSHOT.zip

@TheNetStriker
Copy link
Contributor Author

I just tested this and it works. Thanks for fixing this so quick.

By the way, I think I also just found another issue with the serial binding and created a thread in the forum: https://community.openhab.org/t/strange-problem-with-serial-binding/43230

If I can confirm that my fix is working I will also create an issue here.

@TheNetStriker
Copy link
Contributor Author

I just created another issue for the encoding problem here: #5548

9037568 added a commit that referenced this issue Apr 12, 2018
Clean up compiler warnings.
Make minor fixes in README.md.

Fixes #5542
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants