Aeon Labs HEM v2 How do i?

I bought the new version of the aeon labs Home Energy Monitor. Installed it. Now what? I can pair it with my hub but can’t get any info from it. I found a smart app on github. I tried to publish it for myself and as has been the case with every single time i try to make something work with this, it didn’t.

I copied the code for the old version first. I thought i had to install that and add the update. When I installed it from the web portal, it did not show on my phone. I tried to install it again and now it is there twice. When i try to delete it from the iPhone, the wheel spins and nothing happens. I still have two instances of it in my apps. I need to delete them both so that i can install the correct version.

I go to the ide in the web portal and it won’t allow me to remove it because it says it installed by another user.

I tried to just copy the code for the new version and save and publish it. When i save it i get the following message

No signature of method: script1454270027587118719504.metadata() is applicable for argument types: (script1454270027587118719504$_run_closure1) values: [script1454270027587118719504$_run_closure1@7c299aa8] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Can anyone tell me exactly how to get this HEMv2 working?

Looks like you are trying to add it as a smartapp instead of adding it as a devicetype handler.

Add it as a devicetype and then in the device under my devices switch to the new devicetype you create