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
[boschshc] Add command to list SHC device mappings #15060
[boschshc] Add command to list SHC device mappings #15060
Conversation
Hello @david-pace, |
Example output of my openhab installation
|
64ed6c6
to
1c01043
Compare
I'd love to see that command available in open hab - maybe 4.0.0M4? |
Hi @GerdZanker, thank you for implementing this very useful command 👍 I tested it successfully and I have the following questions and ideas:
|
1c01043
to
3df4994
Compare
Thanks for this positive feedback!
Yes, I tried to only share anonimized data in my example. Of cause this must not be part of final code and is removed now.
done
changed
Command names changed and new commands added. |
Hello @mike-bike, I'm happy to read your comment and your feedback and details about the new relais is welcome.
I attach a built and zipped jar from commit [3df4994] based on the openhab 4.0.0-SNAPSHOT sources. It would be great if you can test the command and also report the device ID of the new relais hardware and the reported services it supports. Then I get feedback about the commands and we can immediately use the output to support new devices. |
Hi Gerd, many thanks for the jar. I will try it tomorrow as time permits. I am currently using M3. Hope I am not breaking my installation. I am not that firm with karaf and loading / unloading new bindings. Better take a backup before. However, no risk, no fun :-)
I will let you now the results soon.
Kind regards
Michael
… Am 12.06.2023 um 21:37 schrieb Gerd Zanker ***@***.***>:
Hello @mike-bike <https://github.com/mike-bike>,
I'm happy to read your comment and your feedback and details about the new relais is welcome.
Let me know were I could download a trial version of the binding and I am happy to test. Keep up with the great work. Happy sunny weekend!
I attach a built and zipped jar <https://github.com/openhab/openhab-addons/files/11727599/org.openhab.binding.boschshc-4.0.0-SNAPSHOT-20230612.jar.zip> from commit [3df4994 <3df4994>] based on the openhab 4.0.0-SNAPSHOT sources.
It would be great if you can test the command and also report the device ID of the new relais hardware and the reported services it supports. Then I get feedback about the commands and we can immediately use the output to support new devices.
—
Reply to this email directly, view it on GitHub <#15060 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHVH7GA6AFNLAIWENR3MTHTXK5VYPANCNFSM6AAAAAAY7O3F7Y>.
You are receiving this because you were mentioned.
|
Hi Gerd, I managed to load the snapshot version of the boschshc binding.
boschshc deviceInfo shows below for the Switch/Shutter Control II (defined as light switches) below:
I have created 2 Things with type Wall-Switch. PowerSwitch seem to work partially, but not reliably. Please note, that the Bosch App shows PowerMeter data for both switches separately. I'd assume data to be available. For reference, see below a classic Bosch Wall-Switch
Unfortunately, a garden light has grilled the second device which I planned to configure as Shutter Control. I am waiting for a replacement to do the same. Some other observations I’d like to share:
Please advise if you want me to perform further analysis. Regards, |
Hello @mike-bike , wow what a detailed test result. Thanks a lot Michael! I'm happy that you were able to use the binding and execute the commands and the output seems to fulfill the idea of #14672: My next steps is to enhance the commands and write tests to prepare a good pull requests content for a merge. Regarding 1: This PR will include the support of more than one defined bridge, because my simple code just takes the first bridge instance it gets to print details about it. Regarding 2: Bosch SHC can connect to the HUE bridge and can use HUE lights in combination with its own hardware. I assume the Bosch Multi Switch can trigger HUE lights. I use the Bosch TwinGuard and the "Air Quality Check" and report the status with a HUE color light. Bye, bye |
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
Hi Gerd,
many thanks for your response. No need to feel sorry. I am really happy that there is someone spending free time to support that binding. I'd probably need to feel „guilty" as I am only a consumer benefitting from the effort the numerous people around the world put into the development of that great piece of software.
The code lists all devices, so I’d assume to enhance the command to enumerate all bridges would be straight forward.
I am looking forward to your enhancement for the new Light/Shutter Control devices. Let me know if you do have a version available to test. A working switch would be nice to start, power measurement the cream on the ice (too warm for cake) :-)
Too sad, that one has blown by the garden light. I am going to put in some fuses in front of the relay. 500mA should do. There are only a handful LED garden lights and a fountain pump. Unfortunately one LED broke due to water leakage and blowed the 16A main fuse. Too much for the small relay :-( I need to wait for a replacement before I could try the shutter control.
In regards to HUE support of the Bosch binding: I still don’t get the use case for boschshc to support HUE. Within Bosch App you could use the scenes and triggers controlling HUEs. Got it! However, within the OpenHAB eco-system you do have the HUE binding. If you have rules monitoring air quality of your TwinGuard you could use the native HUE binding to trigger your light show reporting the air quality status. In my mind it would only make sense if you would have HUE lights directly connected to the Bosch bridge without the HUE bridge (Is that even possible?). Anyhow, the HUE support does not harm. It is only the redundancy...
Wishing you a nice evening and a wonderful week.
Many greetings from sunny Cologne
Michael
… Am 19.06.2023 um 21:23 schrieb Gerd Zanker ***@***.***>:
Hello @mike-bike <https://github.com/mike-bike> ,
wow what a detailed test result. Thanks a lot Michael!
I'm sorry that I can not answer within a day, because my openhab time limited and usually limited to Monday evenings for about one or two hours.
I'm happy that you were able to use the binding and execute the commands and the output seems to fulfill the idea of #14672 <#14672>:
You got enough details to create alternative devices and I can create a new issue with all needed information to support the new relay with a future pull request.
More analysis or data is not need from my current point of view.
My next steps is to enhance the commands and write tests to prepare a good pull requests content for a merge.
Regarding 1: This PR will include the support of more than one defined bridge, because my simple code just takes the first bridge instance it gets to print details about it.
Regarding 2: Bosch SHC can connect to the HUE bridge and can use HUE lights in combination with its own hardware. I assume the Bosch Multi Switch can trigger HUE lights. I use the Bosch TwinGuard and the "Air Quality Check" and report the status with a HUE color light.
Bye, bye
Gerd
—
Reply to this email directly, view it on GitHub <#15060 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHVH7GGAXPWB3GM6ZJF27UDXMCRJTANCNFSM6AAAAAAY7O3F7Y>.
You are receiving this because you were mentioned.
|
3df4994
to
eee8e03
Compare
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
eee8e03
to
b7652fe
Compare
...schshc/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/BridgeHandler.java
Outdated
Show resolved
Hide resolved
...schshc/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/BridgeHandler.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtensionTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtensionTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtensionTest.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
@GerdZanker : did you see review comments from @david-pace ? |
Yes, most of the review comments are already improved locally. My time is currently very, very limited and I struggle with a good way to collect all possible services. I tested already four different way to collect the service names, but failed. Perhaps I need to stop this and do not implement the possible services. Instead we can finish this pull request and later I improve the command. |
b7652fe
to
651d74b
Compare
Hello @david-pace, All your comments should be improved. But I wasn't able to improve the way how all services are known to the command. I already tried several different ideas and most of the time I struggle during runtime, because creating an object from our SHC classes is not enough. The object needs also other references from openhab to not fail with exceptions and here I'm stuck. Please give me a bit more time over the Christmas time to hopefully solve the last pending task. Thanks you all for your support here and I wish you nice 🎄 Holidays ⛄. |
651d74b
to
1c5deaf
Compare
The CommandExtension code is done. The extension needs a list of all services. This list is now a static list checked with a unit tests. Here an example of the output to see which devices and services are already support or which ones we could add in the future
|
1c5deaf
to
770f259
Compare
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.
Looks good in general, left a few comments / questions.
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...hc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Outdated
Show resolved
Hide resolved
...schshc/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/BridgeHandler.java
Show resolved
Hide resolved
...rc/test/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtensionTest.java
Outdated
Show resolved
Hide resolved
770f259
to
04036b3
Compare
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.
Left a small comment. otherwise LGTM
...rc/main/java/org/openhab/binding/boschshc/internal/devices/bridge/dto/PublicInformation.java
Outdated
Show resolved
Hide resolved
04036b3
to
9eba3f8
Compare
.../main/java/org/openhab/binding/boschshc/internal/devices/bridge/dto/SoftwareUpdateState.java
Outdated
Show resolved
Hide resolved
…d mapping to openhab devices and related services Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
9eba3f8
to
2ee73a2
Compare
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.
Thanks LGTM
* [boschshc] add command to list Bosch Smart Home Controller devices and mapping to openhab devices and related services Signed-off-by: Gerd Zanker <gerd.zanker@web.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Added command to list SHC devices and mapping to openhab devices and related services.
The new console command lists Bosch SHC devices and openhab support.
Uses the SHC API to get all SHC devices and SHC services and tries to lookup openhab devices and implemented service classes.
The command should help to get an overview what devices are supported, see #14672.
The implementation uses pull request #13615 as example to start.