Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enocean] Implemented ESP2 protocol #6513

Merged
merged 4 commits into from
Jan 27, 2020
Merged

[enocean] Implemented ESP2 protocol #6513

merged 4 commits into from
Jan 27, 2020

Conversation

fruggy83
Copy link
Contributor

@fruggy83 fruggy83 commented Dec 5, 2019

Implemented ESP2 protocol
Fixes #6512
Signed-off-by: Daniel Weber uni@fruggy.de

@TravisBuddy
Copy link

Travis tests were successful

Hey @fruggy83,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/new-openhab2-enocean-binding/39917/780

public class Helper {

public static byte[] concatAll(byte[] a, byte[]... rest) {
int totalLength = a.length;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest can be null, even tough you control all use-cases, I would add a:

if (rest == null)
   return a;

Even before accessing a.length (that really should not ever be null)


public static ESPVersion getESPVersion(String espVersion) {
for (ESPVersion version : values()) {
if (version.version.equals(espVersion)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding equalsIgnoreCase for added user-friendliness?

baseId = HexUtils.hexToBytes(c.rs485BaseId);
if (baseId.length != 4) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"RS485 BaseId has wrong format");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a little more explanation here. Like:
RS485 BaseId has the wrong format. It is expected to be an 8 digit hex code, for example 01000000

@fruggy83
Copy link
Contributor Author

fruggy83 commented Dec 6, 2019

@KarstenB thansk for the hints, everything should be fixed now

@TravisBuddy
Copy link

Travis tests were successful

Hey @fruggy83,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@KarstenB
Copy link

KarstenB commented Dec 7, 2019

I read the code and did not find any major issues, and I also tested it in production and it works flawlessly.

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/enocean-2-fgw14-usb-supported/60213/7

@fruggy83
Copy link
Contributor Author

@kaikreuzer, @J-N-K on which branch should I do the rebase? Master (I guess this is for 3.0.0 development) or 2.5.x?

@kaikreuzer
Copy link
Member

@fruggy83 Is it only backward compatible changes that would make sense to ship in a 2.5.1 patch release? In any case, rebase it on master for now, we will probably soon have some further update on the process.

@fruggy83
Copy link
Contributor Author

fruggy83 commented Jan 1, 2020

Fixed conflicts regarding copyright headers

@fruggy83
Copy link
Contributor Author

@kaikreuzer friendly pinging.
Branch is already based on 2.5.x. Just leave a message if I still have anything to do. Thanks a lot in advance.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for keeping you waiting.
Lgtm, ready to merge - thanks!

@kaikreuzer kaikreuzer merged commit 8c6ddbc into openhab:2.5.x Jan 27, 2020
andibraeu pushed a commit to andibraeu/openhab-addons that referenced this pull request Feb 17, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
leluna pushed a commit to leluna/openhab2-addons that referenced this pull request Mar 21, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
Signed-off-by: leluna <hengrui.jiang@googlemail.com>
Hans-Reiner pushed a commit to Hans-Reiner/openhab2-addons that referenced this pull request Apr 11, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request May 29, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Implemented ESP2 protocol
Fixes openhab#6512

Signed-off-by: Daniel Weber <uni@fruggy.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enocean] Support ESP2
5 participants