-
-
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
[shelly] Add Plus/Pro support, some bugfixes #13439
Conversation
@markus7017 - can you close the PR being replaced? |
e0c26b9
to
875ce4c
Compare
Signed-off-by: Markus Michels <markus7017@gmail.com>
875ce4c
to
d6c9e8c
Compare
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/shelly-beta-with-plus-pro-support/139554/1 |
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.
Can you say a few words about how Gen2 devices connect in general? Do the devices connect to the OH instance? Is there some authentification? Is it save to expose the servlet to the internet?
....binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api2/Shelly2RpcSocket.java
Outdated
Show resolved
Hide resolved
...ding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.shelly/src/main/resources/OH-INF/thing/shellyGen2_relay.xml
Outdated
Show resolved
Hide resolved
The binding supports Generation 1 (first series) and Plus / Pro series of devices, which are Generation 2. Both generations uses complete different APIs
Short note on the API. Due to the fact that APIs are different, also the data formats, but device functionality is similar I decided to implement a mapping layer. Data structures are mapped form Gen2 format to Gen1 format for further processing on the upper code layers. Otherwise I would have to re-implement the complete logic, in fact redundant. Gen1 devices are still in production so removing Gen1 support was no option. Also creating a 2nd binding would increase maintenance efforts and may confuses the users.
Please feel free to ask further questions if this gets a better understanding for the review. |
Signed-off-by: Markus Michels <markus7017@gmail.com>
@fwolter requested changes are resolved |
Signed-off-by: Markus Michels <markus7017@gmail.com>
@fwolter I pushed the changes, also removing some other left overs from development phase :-) |
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.
Sounds good!
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
@@ -104,22 +104,8 @@ | |||
<config-description-ref uri="thing-type:shelly:relay"/> | |||
</thing-type> | |||
|
|||
<thing-type id="shelly2-roller"> |
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.
Any reason for this removal?
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
* Plus/Pro support and some refactoring, bugfixes Signed-off-by: Markus Michels <markus7017@gmail.com> * Review changes applied Signed-off-by: Markus Michels <markus7017@gmail.com> * review changes Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Markus Michels <markus7017@gmail.com>
* Plus/Pro support and some refactoring, bugfixes Signed-off-by: Markus Michels <markus7017@gmail.com> * Review changes applied Signed-off-by: Markus Michels <markus7017@gmail.com> * review changes Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
* Plus/Pro support and some refactoring, bugfixes Signed-off-by: Markus Michels <markus7017@gmail.com> * Review changes applied Signed-off-by: Markus Michels <markus7017@gmail.com> * review changes Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Markus Michels <markus7017@gmail.com>
* Plus/Pro support and some refactoring, bugfixes Signed-off-by: Markus Michels <markus7017@gmail.com> * Review changes applied Signed-off-by: Markus Michels <markus7017@gmail.com> * review changes Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Markus Michels <markus7017@gmail.com>
* Plus/Pro support and some refactoring, bugfixes Signed-off-by: Markus Michels <markus7017@gmail.com> * Review changes applied Signed-off-by: Markus Michels <markus7017@gmail.com> * review changes Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Markus Michels <markus7017@gmail.com>
This PR replaces #12842
The PR adds support for the Shelly Generation 2 Plus/Pro Devices .
I tried to separate it from other changes (previous PRs), but it still has a relevant size.