[innogy] Update to new API 1.1 and new devices tested

Thanks all for your responses. i was having similar questions and your answers were helpful to me.

Thank you, seems to work as well if you refresh only one item of a thing.
Unfortunately such a workaround doesn’t seem to work for my button pushing problem. Until a fix is known I’m going to use variables in innogy smarthome and react to changes made to them in openhab.

I would gladly take the development of it, but I’m not a Java dev. I’m fluent in PHP :stuck_out_tongue: But the biggest showstopper for me here is that I would need to setup development env, and as I’m following quite some binding development, a lot of them had issues with setting up the env, so I would maybe also call some of the maintainers to maybe create a ready-made docker image with a minimal development env… I don’t know if that would help anything, but somehow I think it would, as a lot of us java noobies could try it…

2 Likes

Hi hilbrand,
i have tested your binding with OH 2.5 M3 against my SHC 1.0 from innogy.
It works fine. against the SHC 2.0 it does not work.

i think this is because you have changed the old binding and just updated the Auth-procedure? Correct?

Ralph

Hi suntribe,

i think you are 100% right. I would also help to investigate time in developing the innogy-binding but i also was not successfull to set up a working eclipse-environmen (on Windows)……

If someone could provide a simple VMware or Docker-Image - it would help enormous….

Ralph

@RalphSester Yes that is correct. My version is without the new api. I made those changes before (or at least independent of) the work of Ollie on the binding.

@RalphSester and @suntribe I’ve seen the discussion about a vm environment before. But nobody seems to be wiling to pick this up and maintain. However, what also plays a part. We have support in the Eclipse installer that should install everything out-of-the-box so it should be easy to get an development environment installed. And I think the learning curve there isn’t necessarily about installing the development environment. But how to work with Eclipse. A VM version won’t help with this. At this moment the documentation on Eclipse has some rough edges, making it somewhat more difficult to get started when you start without much experience with Eclipse. I wrote a tutorial here on how forum on how to migrate a binding based on the old build system and move to the new build system (see this post). That contains also all steps needed to install eclipse (I’m still planning to use this information to update the Eclipse installation documentation). Using this tutorial in combination with the current documentation on Eclipse should give the information you need to get started.

Related to Eclipse. It’s somewhat more difficult when you have additional libraries. This is what most people had (or have) problems with (that or either it are post when during or shortly after the migration of the new build system). With my branch all libraries are from core and this issues isn’t a problem then. The Ollie branch does have additional libraries (that I replaced, which was the intention of my changes) and therefor more understanding on how things work is needed to debug. So if you would start with my branch it should be easier to get started.

Another thing is. When a current branch based on a snapshot version is a bit older. It can be the parent build structure has been improved (also related to the build system change). Because it’s snapshot based this can result in build problems for that branch. In such case it’s best to git pull --rebase the branch on the latest snapshot version (and don’t forget to git push --force when pushing the branch back to github)

If you still have problems with the Eclipse installation or questions feel free to ask (Either here or on a new topic (category development -> build)) and I can see how I can help.

Hi @hilbrand, thanks for this info… I’ll check the post you linked to this weekend and see if I can get up 'n running…

ok - i will try to Setup an Environment based on Windows 10 and try to get work eclipse…i think on Weekend.

Hi all,
today i have invested about 10 hours to setup an eclipse-environment based on Windows 10 in a VM.

every try uses minutes of time for compiling the workbench……after this there are hundreds of Errors and warnings in the IDE…

when i try to add the innogy-binding in the runtime-requierements of the bnd.app file, there are no bindings listed….and yes i have updated the pom….

sorry…the eclipse environment is not my thing…perhaps @suntribe has more luck.

ralph

Did you read my post or read the documentation carefully and installed openHAB with Eclipse with the following option only (Or with the second option enabled: openHAB Add-ons, but followed the instructions in the documentation to close ALL addon projects):

And please, and I can’t stress this enough. Do not spent 10 HOURS wasting your time. But simply ask for help much faster.

Hi Hillbrand,
thanks for giving me hope again :wink:

I tried it again and now i have done following steps:

  1. Git, JDK, Maven and Eclipse installed
  2. I imported only the OH-Development set

When i Run OSGi it works in Browser (paperui) without any binding.

  1. Import your innogy-branch from GitHub into my Eclipse
  2. use the GIT-Bash to rebuild the bom…like your documentation

But when I want to add the innogy (or some other) binding in the app.bndrun it will not be available in the list.

See ScreenShot:

What can i do now?

It can be several things. So I would need some more information. But triggered by your experience I decided to rewrite the eclipse installation and the debug documentation. It’s currently available as pull request, but you can already see the preview here:
Edit: removed link to preview, documentation is available:

Look at the last part about starting the demo. Let me know that helps or if you still have questions.

ok - thank you.
the edit in the pom.xml was the right point…

now i can use the innogy-binding from your branch in my eclipse.
but this is the old one - with no support for the new SHC 2.0 and innogy-api 1.1

how can i use the newsest binding from ollie ?
when i try to Import ollie’s branch, i have lots of failures because of unresolved dependencies and libraries….

perhaps his binding is for OH 2.4 ?
what could be my next steps……so i can work on the binding - not on the Environment…

thanks

Great you got it working!

The Ollie binding is indeed based on the old build system and won’t work with the demo app… To make it work. I think I would start with the version as available in the official openHAB2-addons repository and remove the java and ESH-INF xml files and replace them with the files from the Ollie branch. Also check if there are differences in the readme. That should get you started the fastest. Because all plumbing for the build system is in place in openHAB2 repo.The change in OAuth2 library from my branch can be done later. My branch first should be rebased on master, I think, and then we can check if it can be rebased on a version you create or if it requires more work.

In my repo you can see all the changes in the last commit what I changed to get API 1.1 running.

Hi,
I’m sorry, but I think we can not get on like this.
I would like to try to deal with content with the binding. But I do not want to spend hours and days running the latest version in the development environment.

If somebody really wants to help me, then I ask that somebody take care that all the libraries and dependencies are defined so that I can easily embed and debug the binding into my Eclipse. @hilbrand Are you able to do this?

Innogy will shut down the current API 1.0 in a few weeks. This means that from this point on the official binding will not work anymore. The current beta-binding of Ollie works, but has a problem with the heating thermostat. I would like to take a look at this, if it could be reasonably integrated into Eclipse.

Otherwise, we just have to wait for someone who can do it all alone or maybe we are unlucky enough that the story of OpenHAB and Innogy ends here …

Ralph

Hi Ralph,

I am no expert with Eclipse nor with the current development setup of openHAB. But in case you plan to work on this (hopefully with support from @hilbrand), I might support you with the integration of further innogy/Medion devices into the binding…

Nicholas

Hi Nicholas,
at this time, i think i am not able to continue this Project because Eclipse and me will not become Friends…

we have to wait for somebody else….
Ralph

If you simply like to try to fix some 2.4.0 bugs, you should be able to checkout my git repo an compile the binding with mvn clean install. But no more eclipse. Kind of pure blind textedit coding…

I’ve updated my branch https://github.com/Hilbrand/openhab2-addons/tree/innogy on the changes made by @oliver_kuhl. This is now a branch with the code changed made by Ollie. Migrated that code on the current master and added my changes related to OAuth2 changes (so it works without the additional libraries). I have not tested it because I have no innogy hardware. So bets are off…

@oliver_kuhl I saw a number of json files in between the code. I guessed these were intended as reference or tests? So I moved them to src/test/resources. Does that make sense?

To anyone who had checked out my branch before. You need to to a git reset because I force pushed the changed to the branch. (So first fetch my code :git fetch <name of hilbrand remote>. Make sure you’re on your innogy branch! and than git reset --hard <name of hilbrand remote>/innogy this last command will destroy all on data the branch your on, so make sure you’re on the right branch)