-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
Travis tests were successfulHey @fruggy83, |
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; |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
@KarstenB thansk for the hints, everything should be fixed now |
Travis tests were successfulHey @fruggy83, |
I read the code and did not find any major issues, and I also tested it in production and it works flawlessly. |
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 |
@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? |
@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. |
Fixed conflicts regarding copyright headers |
@kaikreuzer friendly pinging. |
There was a problem hiding this 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!
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de> Signed-off-by: leluna <hengrui.jiang@googlemail.com>
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>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
Implemented ESP2 protocol Fixes openhab#6512 Signed-off-by: Daniel Weber <uni@fruggy.de>
Implemented ESP2 protocol
Fixes #6512
Signed-off-by: Daniel Weber uni@fruggy.de