Beta Testing and Coding Tips needed for new yio remote binding

Hello,
I finished my first binding for the yio remote to send and receive IR Codes through the YIO Dock.

More details see here:
https://www.yio-remote.com/

If some have some free time and can have a look through the binding for some coding hints or some errors or want to try it out feel free to report any issues.

Binding is here

How to I submit it to the openhab release after of course finishing the manual and so on?

Thanks

If you want early feedback, I suggest filing a PR tagged as [WIP] so that people can comment on your code, but maintainers will know not to start a full review.

A few things a quick scan shows:

  • Your logging is using string concatentation, which should not be done
  • lots of commented-out code, which will need to be eliminated

I also noticed this bad block:

    } else {
        send_ircode = "";
        logger.warn("Wrong IR code Format" + send_ircode);
    }
1 Like

Thanks for the feedback…

For the point " * Your logging is using string concatentation, which should not be done"
Is this better???

logger.log(Level.SEVERE, "Something went wrong: %s", message);

That form is not typically used. As an example, instead of this:

logger.warn("Wrong IR code Format" + send_ircode);

use this:

logger.warn("Wrong IR code Format {}", send_ircode);

@namraccr so I need to do anything to get any feedback on GitHub?

Sounds like you need to read this article on how to create a PR (Pull Request).

As I said previously, make sure to start the title with [WIP] to indicate your PR is a Work In Progress.

Sorry for asking a question
Travis failed on my PR with

[ERROR] [ERROR] Could not find the selected project in the reactor: :org.openhab.binding.yioremote @

Do I need to add this by myself to the pom.xml or how is this handled?

Yes you need to add it to the bundle pom.xml. If you run the skeleton script to create the basis of your binding it should do this for you and modifies some other files. Just look at some other merged bindings to see what you need to add.

@hilbrand why does Jenkins always says “übersprungen” for my plugin in the build?

https://ci.openhab.org/job/PR-openHAB2-Addons/21413/