Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Implemented RWE Smarthome binding #3386

Merged
merged 1 commit into from Nov 24, 2015

Conversation

ollie-dev
Copy link
Contributor

This is the RWE Smarthome binding with all changes as discussed in #3143. Sorry for the double PRs due to my git inability...

Best regards
Ollie

@teichsta
Copy link
Member

teichsta commented Nov 6, 2015

thanks :-)

May i finally ask you to check the compatibility against OH2? So simply use the OH2 runtime and deploy your binding there (throw it into /addons dir) and see if it works.

Thanks, Thomas E.-E.

@ollie-dev
Copy link
Contributor Author

Hi Thomas,
I just tried it and it works! Never tried it before - but great! :)

Regards
Ollie

@teichsta
Copy link
Member

teichsta commented Nov 6, 2015

welcome to the future of openHAB … would be great btw if you could go ahead with the implementation and enhance your binding to be OH2 compatible (e.g. implementation of discovery). Will you?

@ollie-dev
Copy link
Contributor Author

Yes, definitely. I think I'll first implement one or two missing devices and will then take a look at OH2.

@teichsta
Copy link
Member

teichsta commented Nov 8, 2015

Yes, definitely. I think I'll first implement one or two missing devices and will then take a look at OH2.

great!

Could you finally please resolve the conflicts that currently occur (keep in mind to squash commits again afterwards).

Thanks, Thomas E.-E.

@ollie-dev
Copy link
Contributor Author

I fear I have to create another PR again. I still don't know how to do it. I read the attlassian git tutorial, googled for hours, followed these steps (https://www.youtube.com/watch?v=b1K_oZX02KU) to resolve the conflicts and now have a branch mixed up with some master commits from other bindings and still have conflicts remaining. Why must this be so complicated? Is there a good tutorial out there about how to do it step by step?

@teichsta
Copy link
Member

Why must this be so complicated?

well, i would call it "complicated" but probably "not so obvious" ;-)

Let's go through some steps:

  • keep your local master free from any changes (it seems you did that)
  • pull all changes from remote/openhab/master into your local master
  • push the changes to your master
  • merge your local master into your branch
  • resolve conflicts
  • commit --amend the changes to your latest commit (which is the only one in your branch)
  • (force) push to your remote/branch

Hope this helps, Thomas E.-E.

@teichsta
Copy link
Member

@ollie-dev i tried out your binding but didn't manage to logon successfully. sResponse in logon() always returns an empty String. Any idea what that might be about?

@teichsta
Copy link
Member

ah this might be a consecutive fault of

2015-11-18 21:05:46 [INFO ] [r.i.c.RWESmarthomeCommunicator:84   ] - Starting RWE Smarthome communicator
2015-11-18 21:05:46 [ERROR] [.o.b.r.i.c.RWESmarthomeSession:252  ] - SSLHandshakeExceptionjavax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:728)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:166)
    at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:101)
    at org.apache.http.entity.StringEntity.writeTo(StringEntity.java:171)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:505)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:728)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:166)
    at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:101)
    at org.apache.http.entity.StringEntity.writeTo(StringEntity.java:171)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)

@ollie-dev
Copy link
Contributor Author

Yeah, you have to use java 1.7 or force 1.8 to use TLSv1 by adding -Djdk.tls.client.protocols=TLSv1 to start.sh.
I am trying to fix my repo right now. There is some progress and maybe I can finally send you a conflict-free, one-commit PR. Fingers crossed... ;)

@teichsta
Copy link
Member

Yeah, you have to use java 1.7 or force 1.8 to use TLSv1 by adding -Djdk.tls.client.protocols=TLSv1 to start.sh.

ok, that's it, thanks! The should definitely be part of the wiki page ;-)

@ollie-dev
Copy link
Contributor Author

All right, @teichsta - I think I finally made it. Puh! :bowtie:

I already prepared a Wiki page: https://github.com/openhab/openhab/wiki/RWE-Smarthome-binding :)

@ollie-dev
Copy link
Contributor Author

@teichsta, is everything fine now for you to accept the PR or is still something missing in your opinion?

@teichsta
Copy link
Member

no, nothing missing … just lack of time again.

Again, many thanks for this contribution! Hope to see many more from you :-)

teichsta added a commit that referenced this pull request Nov 24, 2015
@teichsta teichsta merged commit 9ccbf63 into openhab:master Nov 24, 2015
@hakan42
Copy link
Contributor

hakan42 commented Nov 24, 2015

Nice. @ollie-dev 😄

could I ask you to write a short announcement on https://community.openhab.org/c/add-ons/bindings when your new binding is in tonights nightly build?

@ollie-dev
Copy link
Contributor Author

@teichsta
Copy link
Member

overlooked that in the Review. Please add your binding to:

  • bundles/binding/pom.xml (as module)
  • distribution/pom.xml (as dependency)

and send a PR for that. Would you?

Thanks, Thomas E.-E.

@ollie-dev
Copy link
Contributor Author

Hi,
bundles was already done. I now fixed distribution/pom.xml in #3467. Go for it! :)

@ollie-dev ollie-dev deleted the rwe-smarthome-binding-pr2 branch December 16, 2015 21:01
@teichsta teichsta mentioned this pull request Dec 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants