I started to develop an InfluxDB 2.0 persistence binding and I’ve been asked to integrate with a PR that will be soon integrated to master branch.
I migrated my code to that branch and discovered that it is based in OH 3.0. I’ve made the adaptations and the persistence addon starts, open connection to Influxdb and all seem ok.
But as I have no things defined in the OH 3.0 and I hadn’t seen any addon I just created one to provide sample random data.
But it can’t get it working and it seems that it is not detected.
The binding is installed and active in openhab console but if I configure manually a thing in a .things file I don’t see anything in the log, although I’ve put it to TRACE for all categories.
Is it supposed to work?
Even if I’ve done something wrong I should see in the log that the things file is being reloaded, shouldn’t I?
Or I don’t know if I’m doing something wrong.
Adding the addon, checking it’s active with bundle:list and creating a things file it’s enough to see it with smarthome:things list or at least see something in the logs with a global TRACE level?
After some research I have found the problem:
org.openhab.core.model.core.internal.folder.FolderObserver wasn’t initialized because it’s configuration wasn’t set.
I’ve initialized it in console with:
config:property-set items items
config:property-set things things
And then FonderObserver has been initialized and my thing correctly registered.
May I open an issue in Github?
After this, and given that I’m new to openhab developing, I don’t know if the idea to target 3.0 as @Kai suggested is a good one for me.
Is the only place where I can work and integrate it?
Is expected to be quite usable soon, at least as a developer?
And there is an estimation about the possible release date?
I’ve proposed a fix for this in:
It’s best to develop new persistence add-ons on the openhab-addons master branch (OH3) because we currently cannot merge them on the OH2 (2.5.x) branch. That’s because there are breaking changes in the persistence API in OH3 and we use some scripts to automatically port all OH2 add-ons to OH3. The scripts cannot apply these breaking API changes so any existing OH2 persistence add-on would cause the OH3 add-ons build to fail. Therefor the (unused) OH2 mapdb persistence add-on was also removed from the 2.5.x branch (#7183) and will be added back to OH3 (master branch) (#5275).
There currently isn’t any release date planned for OH3.
Ok, I will integrate there then…
To be positive, these problems, take me more in the core and let me learn a little about the internals.
The OH 2.x bindings will work in OH3? I’m asking this because I need to know If I have to wait for version 3 or if I continue doing the configuration of the system on OH 2.x.
Yes the OH2 bindings will keep working in OH3. Just keep using and configuring them in OH2 for now. Most of the OH1 persistence add-ons will also be available in OH3. There are already many update commands for automatically updating OH2 configurations to OH3. But it can still use some more thorough testing.