Guide: Binding development changes for openHAB 3 (from 2.5.x)

Is 3.0-SNAPSHOT being built in to APT or RPM packages? I see a bunch of build artifacts from it, but no distribution packages.

2 Likes

It would be great if there is an installation package just for testing and playing around

I agree to what Dibbler42 say.
My plan is to test to redesign an still not merged binding, (there is an ongoing review) as your description above.
The binding I am thinking of is Kostalinverter which I have extended with functionality for Second generation.

I think I have found an possible reason, there is something not right with Java version. I will check and make a new try to install.
Thank’s to all so far!!

Regarding binding development. There certainly is an environment available. Just install Eclipse and only select openHAB Development.

I’m under the impression people just click checkboxes for other development topics during installation of Eclipse, like core and ui because they are under the impression that it’s needed (and overread that part in the documentation that says you don’t). But you don’t need those. And yes make sure you have the right Java (11) version.

Did you see @ysc’s post:

1 Like

Note that page (https://next.openhab.org/download/) only provides a link to download the snapshot’s .zip file, but there are other options which aren’t listed there yet - for instance there are Docker images available (3.0.0-snapshot-debian & 3.0.0-snapshot-alpine).

To be honest i didn’t saw Yannicks post, but i found it using google.

As Yannick wrote actually ther is only a zip file and i did’nt saw the docker files yet.

So my question was more in the direction: Will we find some kind of alpha repo to use apt or yum or what ever to install the package.

We don’t linux packages build yet, but let’s follow up on that on https://github.com/openhab/openhab-linuxpkg/pull/169.

1 Like

Just to clarify this even more: On September 21, when we switch to the master branch of openhab-addons as the default branch, we will migrate all existing add-ons with our script - so there is no need for any of you to do this manually. The steps described by @hilbrand in this post are really only necessary for anybody working on an add-on that is not in the official repo. All others that might want to play around with the migrated version of the code can also just grap it from https://ci.openhab.org/job/openHAB-Addons-port/ws/bundles/.

Syntax for macOS is

find . -name *.java -exec sed -i '' -e "s/org.eclipse.smarthome.core/org.openhab.core/g" {} \;
find . -name *.java -exec sed -i '' -e "s/org.eclipse.smarthome/org.openhab.core/g" {} \;
2 Likes

My understanding is that OH3 / the new UI doesn’t provide anymore

  • Simple Item Linking and
  • A view comparable to PaperUI::Control

This would have a significant impact of development turn arounds (at least for me). For example

  • I’m developing the Shelly binding (beside others)
  • My test environment has 20+ devices=20+ things, with various channels (stand+advance)
  • Usually I’m testing with a limited numbers of devices
  • sometimes, esp. before a new build I do add all of them and have a visual cross-check with PaperUI if all channels are initialized, do some clicking to verify control functions etc.

For now I have no idea how to perform that with OH3.

  • Manually defining items and linking all those channels manually is a night mare
  • Even this is done, sometimes I need to reset the config or do a fresh IDE installm which would lead into the same hazzel
  • Importing predefined textual items linking to the existing channels… :frowning:

@hilbrand @Kai (and others)
Maybe I missed something, could you give an advice or is something like the old features on the remaining roadmap?

2 Likes

look for “add thing as equipment” feature.

I was able to copy over my .things, .items and sitemap from OH2 to OH3 and it appeared to work.

Thanks for recommendations, but

  • I have 25 different thing types (and new are coming)
  • with up to 20 channels each

so any kind of manual definitions is a lot of effort and result in a static setup.
I’m not sure if the recommended approach will help here, also avoiding a static test setup.

1 Like

Just iun case you didnt already know… if you use the VSC openhab extenstion… you can automaticlly create the item file from the things… Take a look on the gif images in the extension description…

Have a look at https://github.com/openhab/openhab-webui/issues/377

@Kai Long short short, I have finally some time to do some improvements on some of the bindings I have been using of the years. Question : Now that the port happened to 3.0, I see commits happening on both the 2.5.x as well as the main branch. What is the policy to follow here? Can any modification still be pushed to 2.5.x. or should everything go to 3.x? Is there a cut-off date? I prefer developing against 2.5.x. since that is running in my production environment, at least, for the time being. 3.x broke quite a few things for me, also bindings like helios, even if in the official bistro, are not working anymore (and I understand this, as I might be the only one/one of the few using it, so it never got tested properly in a prod env)…

Pls enlighten us :wink:

K

He already did in

So all changes go to main/3.x and only fixes are cherry picked to 2.5.x.

Hey @kgoderis, great to hear from you again! Yes, it would be wonderful if you could help fixing the bugs that you encounter in bindings in 3.x - let me know if there are any further questions besides the ones I have answered in the issue that @wborn has linked already.

1 Like