stefan-kaestle / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
16 stars 1 forks source link

Version 1.0 Discussion #14

Closed coeing closed 3 years ago

coeing commented 4 years ago

As we talked about in several issues, we'd like to publish a first version to openHAB soon. We can use this issue to discuss what needs to be done and how the publishing progresses.

@stefan-kaestle As you are the initiator of the plugin, you should approach the devs from openHAB to ask for a roadmap for publishing a plugin. It might just be a pull request of a branch of our fork to their main repository, but maybe there is more to it.

stefan-kaestle commented 4 years ago

Will do.

stefan-kaestle commented 4 years ago

https://community.openhab.org/t/towards-merging-the-new-bosch-shc-binding/101952

Please add stuff there in case I forgot something :hear_no_evil:

coeing commented 3 years ago

@GerdZanker @stefan-kaestle As far as I can see it we should be ready for a first pull request, what do you think? :) I would also create a new Pre-release 0.2 to let @tuxianerDE check issue #24 Other than that we have only enhancement issues left which we should work on after the first pull request went through. We might get some valuable feedback from the first official release, so I wouldn't wait any longer :)

tuxianerDE commented 3 years ago

Will update tomorrow to the other build and give feedback on the issue. Happy to see proceeding to a first release

GerdZanker commented 3 years ago

I can only think that issue #7 with a better folder structure could make a review simpler, but I can't judge about the needed effort and if IDE "move" Refactoring is sufficient.

coeing commented 3 years ago

@GerdZanker Yes, that's true, moving the classes to their (final) destination might make sense before the first release. I'll see if I find some time for it tomorrow, it shouldn't take too long.

tuxianerDE commented 3 years ago

Just for all on that thread. Issue #24 is resolved, as well as the shutter control. Looking forward to release 1.0

coeing commented 3 years ago

@GerdZanker @stefan-kaestle I will write an update to the thread in the openHAB forum to tell them we are ready to merge a first version :)

coeing commented 3 years ago

@GerdZanker @stefan-kaestle Unfortunately no anwer yet in the openHAB forum: https://community.openhab.org/t/towards-merging-the-new-bosch-shc-binding/101952/6

If there is no answer until next weekend, I would just send a pull request and we discuss any remaining issues in the pull request directly.

stefan-kaestle commented 3 years ago

Thanks for all your efforts guys! And sorry I have been unresponsive. Is there anything that I should do for the release? Should I sign off my commits?

I'm generally a bit discouraged by the OpenHab maintainers. This binding was (and is) a lot of work and you'd think they are a bit more excited about us wanting to merge it :wink:

GerdZanker commented 3 years ago

I also prefer a pull request over waiting for some forum feedback. With pull request the maintainer can't ignore the contribution. Because the code appears with PR on the openhab repo and is more visible I guess we can reach more excited users.

coeing commented 3 years ago

Thanks for all your efforts guys! And sorry I have been unresponsive. Is there anything that I should do for the release? Should I sign off my commits?

I'm generally a bit discouraged by the OpenHab maintainers. This binding was (and is) a lot of work and you'd think they are a bit more excited about us wanting to merge it 😉

No problem @stefan-kaestle ! I can completely understand that there are times where there is no time to work on an open source project. It's good that we are 3 developers already, so our binding always goes forward a bit :)

I also prefer a pull request over waiting for some forum feedback. With pull request the maintainer can't ignore the contribution. Because the code appears with PR on the openhab repo and is more visible I guess we can reach more excited users.

From my side we can already create a pull request and don't have to wait any longer for an answer in the forum as well. It's probably better anyway to have a discussion about coding issues inside a pull request instead of a forum thread. @stefan-kaestle Do you want to create the pull request?

VL2019 commented 3 years ago

Hi team,

thanks for your effort to develop a binding for Bosch Smart Home!

I have an OH2.5 environment and would like to include my new Bosch Smart Home System (Smoke detector, Shutter and motion detector). I am happy to help with some test in my environment.

Should I wait for the official first Version of your binding or do you think this will take some time and i should start with the pre-release beta 0.1

Thanks :-)

GerdZanker commented 3 years ago

Hello @VL2019, warm welcome and feel free to start immediately testing our v1.0-beta.1 Version.

coeing commented 3 years ago

@GerdZanker @stefan-kaestle It's on! https://github.com/openhab/openhab-addons/pull/8371 :) If any work should come from this pull request, we should open new issues here to work on them. I already created one for the unsigned commits (#43)

coeing commented 3 years ago

There do not seem to be any more unresolved issues in the pull request, @GerdZanker is working on the remaining ones if I see it correctly :)

@GerdZanker Let me know if you resolved the issues you are working on. Afterwards we can start a new round of reviews. I guess there will be some more issues left, but not that many and that big as in the first round.

We are getting closer to the first release!

VL2019 commented 3 years ago

Hi, until the first release is not published, I try to work with the beta version.

I add the file in the add-on folder, restart OH, add the thing & item files and hold the button on the Gateway until the LED flash. But when I link an item to my motion sensor, I got this message in the log and on the UI:

2020-09-21 11:09:15.788 [hingStatusInfoChangedEvent] - 'boschshc:motion-detector:xxxxx' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Bridge or config is NUL

Do you have any idea, what I did wrong? And do you plan to add the "normal" smoke detector as well or can I use the twinGuard code?

tuxianerDE commented 3 years ago

hey VL2019,

can you raise a seperate issue for this observation just to keep things clean (and also track if this becomes an actual bug).

I can confirm that I have integrated my twinguard suessfully.

can you share in the new created issue your binding config for the controller and do other items work?

VL2019 commented 3 years ago

Thanks, I think it was an issue with the controller connection. Now I add my password for the Bosch controller in the .thing file. I think it is Not the best way but it works for the moment 👍

I also have an smoke detector. Where I can create a support request for the next version? It would be nice to use the Audi signal for my alarm system in openHAB.

Thanks

Edit: maybe it would be better to trigger the alarm from Bosch in openHAB. I think the usecase to control each smoke detector is not so huge. But to start/trigger the alarm would be great

coeing commented 3 years ago

@tuxianerDE Thanks for the quick answer! :)

@VL2019 As @tuxianerDE described, you should open new issues for bug reports and feature requests as well. This way the discussions stay focused on one topic at a time.

I will upload a new Beta version soon because we did a lot of code refactoring during the first review of the openHAB maintainers. Hope you all have time to test a bit if everything still works :)

coeing commented 3 years ago

@GerdZanker Added a new branch bosch-shc-3.0 which is rebased on openhab/main. The next step would be to get it running locally with an openHAB setup. Let me know when it works for you, I will see when I have time to try it :)

coeing commented 3 years ago

@GerdZanker Small update, I was too curious to wait trying it out ;) I had to fix some formatting and cherry picked your commit. So the branch is up-to-date :) Will do some testing with my devices and upload a new beta release, so others can test as well.

tuxianerDE commented 3 years ago

@coeing just FYI I am still using the initial release version that I have configured to control all items I have and that can be configured so far. Can't wait to test the improved version :)

coeing commented 3 years ago

@GerdZanker Unfortunately I can't get the pairing to work and I am not sure if it's me, openHAB 3 or something else :/ Let me know when you had time to look at it, hopefully you can figure it out quickly (if it is a problem for you as well).

coeing commented 3 years ago

Quick update: @GerdZanker fixed the pairing bug I introduced (shame on me!). As soon as the fix is merged I will create a new beta release. It will be for openHAB 3 though because unfortunately our binding won't make it into openHAB 2.5 anymore :/

VL2019 commented 3 years ago

FYI: I would like to thank you for your work! The existing Beta works fine in my environment (motion-sensor, Twinguard, Door/Window) and I am happy to install and test your new beta release :-)

If I may make a wish for the next versions, it would be the integration of the "IntrusionDetectionSystem" like kreack mention it in this post https://github.com/stefan-kaestle/openhab2-addons/issues/42

Thanks again :-)

kreack commented 3 years ago

I would also be very happy to support the new release by testing 🙃

coeing commented 3 years ago

I created a new pull request for the bosch-shc-3.0 branch: https://github.com/openhab/openhab-addons/pull/8629 It's currently a draft as I wanted to wait for a successful build first :) I will then change it to a regular pull request.

coeing commented 3 years ago

Some time has passed since the last beta version! Main reason was the overlapping of the upcoming openHAB 3 release with our version 1 release. So we decided to migrate our plugin to openHAB 3 directly.

This version is currently in review by the openHAB maintainers, so feel free to report any bugs you find by opening a new issue! You can also add a new issue if you have a wish for a new feature, but it will probably only make it into version 2.0.

https://github.com/stefan-kaestle/openhab2-addons/releases/tag/v1.0-beta.2

@VL2019 @kreack @tuxianerDE Hope you are still interested in a new version! :)

VL2019 commented 3 years ago

@coeing Thanks! Of corse we are still interested :)

I deleted the old Beta1-.jar file (this worked fine) and insert the new beta2 file in openhab folder and reboot the complete System (RP3 with OH 2.5.9 - hope this is compatible with your 3.0 binding). I do not created a new key (pushed NOT the button on the BSH gateway again)

I got this WARN Message in the log file: [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.boschshc-3.0.0-SNAPSHOT.jar

I noticed an issue with the window-contact. In the log I can see when the status change, but in the "control" view (/paperui/index.html#/control) there is no status for all window-contacts. I don't know why.

here is my config:

things

Bridge boschshc:shc:1 [ ipAddress=„x.xx.x, password=„xxxxx ] {

Thing motion-detector  motion-corridor "Bewegungsmelder"      [ id="hdm:ZigBee:xxxxxxxxx“ ]

Thing twinguard tg-Wohnzimmer  "Twinguard Smoke Detector" [ id="hdm:ZigBee:xxxxxxx“ ]

Thing window-contact BSHtuer "BSH Tuer" [ id="hdm:HomeMaticIP:xxxxxxxxxxx“ ]

Thing window-contact BSHWZrechts "BSH Wohnzimmer rechts" [ id="hdm:HomeMaticIP:xxxxxxxxx7" ]

}

items:

Number TemperaturWZ "Temperatur Wohnzimmer" (gTemp){ channel="boschshc:twinguard:1:tg-Wohnzimmer:temperature" }

Contact BSHtuer "BSH Haustuer" {channel="boschshc:window-contact:1:BSHtuer:contact"}

Contact BSHWZrechts "BSH Wohnzimmertuer rechts" {channel="boschshc:window-contact:1:BSHWZrechts:contact"}

EDIT: I also found an issue with my time. Can not remember if it works fine with the old version. My motion sensor has not the same time like Openhab. There is a difference of exactly two hours. This could also be an issue because of the timezone plus summer/winter time.

2020-10-21 22:54:29.430 [vent.ItemStateChangedEvent] - Bewegungsmelder_LatestMotion changed from 2020-10-21T19:40:22.638+0000 to 2020-10-21T20:54:29.320+0000

VL2019 commented 3 years ago

Hi @coeing, thanks for the new version.

I still have only a 2.5.9 installation, so my comments / issues maybe not relevant for you

Motion sensor, controller and door/windowscontact still works fine with the limitation that the

would be nice to have an integration for the alarm system #42 in one of the next versions :-)

coeing commented 3 years ago

@VL2019 Thanks for your testing!

tuxianerDE commented 3 years ago

@coeing hi, sorry I have been so quiet. I am now back I just upgraded my openhab environment to version 3 and cleaned it up (fresh start essentially). Now I want to revisit our boach integration. As it is not officially in the bindings yet I wondered if there is a new release coming or if I shall go with the last one posted here.

Looking forward to restart this integration.

Cheers Torsten

coeing commented 3 years ago

Hi @tuxianerDE,

Good to hear back from you :) Hope you had some good end-of-year weeks before the holidays!

Your fresh setup is a very good test for the new version I just uploaded: https://github.com/stefan-kaestle/openhab2-addons/releases/tag/v1.0-beta.4 During the past weeks I mainly refactored some code that the openHAB maintainers liked to have changed (for good reasons). But we are getting very close to the first release now, one openHAB maintainer already gave his approval. The other one will probably approve the current version soon.

If you find any problems with the Beta 4 version, please report each one in a separate ticket as soon as possible, so they don't ship with the first version. Thanks for your help! :)

Cheers Christian

tuxianerDE commented 3 years ago

Super. Feedback will be coming your way. I have started today morning to install based on the old version 3 and noticed 2 things. I will verify them with the latest version.

I will report separately in a new bug or update existing ones if need be.

tuxianerDE commented 3 years ago

@coeing I have tested the creation of things & items. I can only report one bug that is absolutely noncriitical. I will have to see now how my shutters behave with the rules. General functionality however is given!

The reported bug regarding the window contact I consider closed. I cannot reproduce the behaviour!

tuxianerDE commented 3 years ago

FYI bug resolved with latest build.

Merry Christmas

VL2019 commented 3 years ago

I have now a clean installation with OH 3.0 (Pi 3B+ with Openhabian) and happy to install the binding.

Is the latest version Beta 5 without the last bug? Or did you create a new version after the last change?

Maybe the issue is on my side, but it does not work. I entered IP and PW in the bridge Thing and pushed the button on the Gateway. Then I got the following message in my log:

2020-12-29 22:01:37.739 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'boschshc:shc:302d389236' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Die SSL Verbindung zum Bosch Smart Home Controller ist nicht möglich.

coeing commented 3 years ago

I have now a clean installation with OH 3.0 (Pi 3B+ with Openhabian) and happy to install the binding.

Is the latest version Beta 5 without the last bug? Or did you create a new version after the last change?

Maybe the issue is on my side, but it does not work. I entered IP and PW in the bridge Thing and pushed the button on the Gateway. Then I got the following message in my log:

2020-12-29 22:01:37.739 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'boschshc:shc:302d389236' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Die SSL Verbindung zum Bosch Smart Home Controller ist nicht möglich.

The Beta 5 contains the keystore fix. @tuxianerDE The version worked for you, did it?

tuxianerDE commented 3 years ago

Hi, that is correct the beta 5 is running on my end. I have done the pairing with the previous beta but it continued running after changing to beta 5.

The ssl issue could also be related to a system component. @VL2019 which Java version is running are all ssl libs on your machine up2date like openssl etc?

VL2019 commented 3 years ago

I used the last version of the openhabian for RPi from openhab 3.0.0

I found this on my environment:

java -version:

openjdk version "11.0.9" 2020-10-20 LTS
OpenJDK Runtime Environment Zulu11.43+88-CA (build 11.0.9+11-LTS)
OpenJDK Client VM Zulu11.43+88-CA (build 11.0.9+11-LTS, mixed mode)

and for openssl

openssl version: OpenSSL 1.1.1d 10 Sep 2019

tuxianerDE commented 3 years ago

Ok that can't be the issue then.... I don't have an ssl issue in my logs, whilst I did the initial handshake with beta 4. Do I assume correctly your smart home is up2date

VL2019 commented 3 years ago

Hi Team,

first time when I configured the new bindig, I got a message in my log logfiles to presse the button of the Bridge to create the key. I cannot reproduce this.

Because of my SSL error I try to undo all changes and install the binding again. Therefore I removed the thing in OH UI and deleted the .jar-file in the Add-on folder. But I never got the message again for "press button". I think there are some information still in the OH environment. Do I have to delete some additional files and folders for a clean second try?

Thanks!

coeing commented 3 years ago

Hi Team,

first time when I configured the new bindig, I got a message in my log logfiles to presse the button of the Bridge to create the key. I cannot reproduce this.

Because of my SSL error I try to undo all changes and install the binding again. Therefore I removed the thing in OH UI and deleted the .jar-file in the Add-on folder. But I never got the message again for "press button". I think there are some information still in the OH environment. Do I have to delete some additional files and folders for a clean second try?

Thanks!

Hi @VL2019,

I do not have an idea what could cause this, might as well be some thing in your local network? Maybe @GerdZanker has an idea as he developed the bridge connection.

For a clean second try you should delete (move) the whole userdata folder of openHAB. There are some cache files which might store old configuration values.

GerdZanker commented 3 years ago

Hi @VL2019, please delete an existing <openhab userdata folder>/etc/oss_openhab_binding*.jks file. The beta 5 version creates new java keystore certificate file and the pairing shall start afterwards. The binding shows the Thing Status in the user interface with Error - Press pairing button on the Bosch Smart Home Controller.

VL2019 commented 3 years ago

Hi @VL2019, please delete an existing <openhab userdata folder>/etc/oss_openhab_binding*.jks file. The beta 5 version creates new java keystore certificate file and the pairing shall start afterwards. The binding shows the Thing Status in the user interface with Error - Press pairing button on the Bosch Smart Home Controller.

Thanks so much! That was the issue. Maybe something went wrong first time. Now it connects correctly and the thing is online.

coeing commented 3 years ago

Our binding is merged! :D https://github.com/openhab/openhab-addons/pull/8629 It will be released with openHAB 3.1 and should already be included in the latest snapshot: https://www.openhab.org/download/

stefan-kaestle commented 3 years ago

Wow! Awesome job guys! Seeing how much extra work this was in the end, there is no way this would have happened without all your contributions and help! Sorry I couldn't help more with the merging. I was and still am pretty busy (đŸ‘¶ among other things).

Thanks again and much appreciated!

coeing commented 3 years ago

Wow! Awesome job guys! Seeing how much extra work this was in the end, there is no way this would have happened without all your contributions and help! Sorry I couldn't help more with the merging. I was and still am pretty busy (đŸ‘¶ among other things).

Thanks again and much appreciated!

Thanks, @stefan-kaestle and thanks for starting this binding :) And congrats on the birth! 👍 Btw: My son was born on November 23rd 2020, so they shouldn't be too far apart ;)

tuxianerDE commented 3 years ago

Thanks all for making this work and congrats making it now to the official releaes train for openhab 3.1

@stefan-kaestle congrats on the birth of your kid!!! All the best