New binding available: SolarEdge binding

openhab2
Tags: #<Tag:0x00007f213551ab78>

(Alexander F) #1

Hi there,

I have created a binding to retrieve data from solaredge inverters. All inverters that support “SolarEdge Monitoring” (http://monitoring.solaredge.com) are supported in general. No modbus adapters or any other hardware modifications are needed to use this binding.

Please check out readme for details regarding configuration and supported channels:

Regards
Alex


Reading Data from Solaredge inverters via Modbus TCP
(Fuxi) #2

Hi,

I use openhab for the first time.

I’m very interested to install this solaredge binding, but i don’t know how to download the .jar file, or something else for installing this binding to my openhab2 runtime.

Could someone tell my how to download the binding?

thx,
Fuxi


(Alexander F) #3

Hi Fuxi,

you can download the jar file here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.solaredge/

Although it is a 2.2.0-SNAPSHOT it should work fine with 2.1.0. Just put the jar file into the addons folder it will install then.

BR
Alex


(Fuxi) #4

Hi Alex,

this binding looks great, but I can not explain myself how this binding could retrieve data without an API_KEY of the SE Monitoring Portal?

BR,
Fuxi


(Alexander F) #5

Hi Fuxi,

the binding uses the same authentication like human users. Using the API_KEY would be easier and better of course but unfortunately the creataion/management of API_KEYs is disabled for some customers so I decided to use a more generic approach.
Does this work for you?

BR
Alex


(Fuxi) #6

Hi,

no, unfortunately does not work with my SE5k Inverter.

BR,
Fuxi


(Alexander F) #7

Are there any error messages in the logfile?

Could you please increase the loglevel for that binding in the log-config?

The config file for logging is org.ops4j.pax.logging.cfg located in the userdata/etc folder (manual setup) or in /var/lib/openhab2/etc

Please add this line:

log4j.logger.org.openhab.binding.solaredge = DEBUG

Please clean the logfiles afterwards, restart openhab afterwards and send me the logfiles after ~ 5 minutes runtime. In loglevel DEBUG configuration (including passwords) of the binding will be logged so please remove this from the log before posting it or sending it to me.


(Fuxi) #8

Hi Alex,

now it works.
I have made a new Installation (openHAB runtime), now it works.

Thank you,
Fuxi


(Mario Preis) #9

I put the addon jar file in the addons folder, but somehow it’s not being installed. What am I doing wrong? The log file shows the following:

2017-10-23 09:12:32.887 [ERROR] [org.openhab.binding.solaredge ] - FrameworkEvent ERROR - org.openhab.binding.solaredge
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.solaredge [187]

I was able to install a different addon the same way the other day without problems.

Thanks in advance!


(Mario Preis) #10

I just wanted to add, Alex, I added your Nibe binding (2.2.0 snapshot), and I am getting the same error, with openHab 2.1. Do I have to use the openHab snapshot to get them to work?


(Javier Gonzalez) #11

I am facing the same issue mentioned by Mario.

I copy the log to help:
12:29:28.258 [ERROR] [org.openhab.binding.solaredge ] - FrameworkEvent ERROR - org.openhab.binding.solaredge
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.solaredge [195]
Unresolved requirement: Import-Package: com.fasterxml.jackson.annotation

    at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

Thank you.


(Alexander F) #12

Hi Mario,

the bindings should also work with version 2.1.0. At least my local builds do work with that version. Maybe the central builds are no longer compatible with 2.1.0.
You could test my local builds I have uploaded them here:

http://friese-de.eu/openhab2/org.openhab.binding.nibeuplink-2.2.0-SNAPSHOT.jar
http://friese-de.eu/openhab2/org.openhab.binding.solaredge-2.2.0-SNAPSHOT.jar

If those versions do not work either I do not have any idea.


(Alexander F) #13

Hi Javier,

the error is not related to my code openhab however not fulfill the dependency requirements. Maybe that version is no longer compatible with 2.1.0. You could try the version I have uploaded above as that is exactly what I am using with my 2.1.0 setup.

BR
Alex


(Javier Gonzalez) #14

Hi Alex, thank you for your help and job done with this binding.
I have been googling the issue and I have solved it.
I have aware that I missed some modules. I am talking about *com.fasterxml.jackson.core. I have included it in the addons folder and the problem was solved.
Now, I am able to see the binding in Openhab. I will play later with it.

By the way, if anyone is facing the same issue, you can find the required files (jackson Databind, Core and Annotations) in https://mvnrepository.com/artifact/com.fasterxml.jackson.core. Download them in the addons folder and it should solve the issue

Thanks again.

Best regards.


(Alexander F) #15

Hi Javier,

yes, the error message stated that those libs for json parsing were missing. But I am a little bit confused a those libs are in general available in openhab2. There is a mechanism to provide those dependencies at runtime (OSGI) and it should be working fine. My binding also relies on many other external libs (e.g. jetty http client) which are provided by OSGI without any problem. I still do not have any idea.

I think your solution is a workaround to get it running but it should not be necessary if everything worked as expected.
I will try to find out what’s going wrong here.

BR
Alex


(Mario Preis) #16

Hi Alex,

I tried using your local builds, I am getting the same error Javier is getting:

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.solaredge [199]
Unresolved requirement: Import-Package: com.fasterxml.jackson.annotation

Best regards
Mario


(Javier Gonzalez) #17

Hi Alex,
I have done a clean installation but same issue. So, for the moment, I leave jackson’s files in the addon folder.
Now, I have started to do the settings. I put the log in debug mode and I can see all message between the solaredge website and Openhab.
I mean I can see that it connects successfully and it download json data.

However, I am not able see how it maps the data to an item.
This is the items created:
Number production “PV Production [%.2f KW]” {channel=“solaredge:generic:45d065c7:live#production”}

Any idea why the item is not taking the data from json extract?

Thank you for your help.
Best regards.


(Alexander F) #18

Could you please send me the debug log?
Otherwise it is hard for me to analyze the problem.


(Javier Gonzalez) #19

Hi, sorry I

am not able to upload the log file.
So, I copy the text below and I upload a screenshot.

Thanks again for your help.

2017-10-25 15:12:32.807 [DEBUG] [org.openhab.binding.solaredge ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.solaredge.internal.SolarEdgeHandlerFactory, component.id=8, service.id=117, service.bundleid=196, service.scope=bundle} - org.openhab.binding.solaredge
2017-10-25 15:12:32.867 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent STARTING - org.openhab.binding.solaredge
2017-10-25 15:12:32.876 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent STARTED - org.openhab.binding.solaredge
2017-10-25 15:12:32.885 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent [unknown:512] - org.openhab.binding.solaredge
2017-10-25 15:13:11.625 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'solaredge.items’
2017-10-25 15:13:53.766 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - About to initialize SolarEdge
2017-10-25 15:13:53.843 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - Discovered NibeUplink initialized: org.openhab.binding.solaredge.config.SolarEdgeConfiguration@736b44f2[username=user,password=pass,solarId=siteID,pollingInterval=30,asyncTimeout=120,syncTimeout=120]
2017-10-25 15:13:54.404 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - start polling job at intervall 30
2017-10-25 15:13:55.407 [DEBUG] [g.solaredge.handler.SolarEdgePolling] - polling SolarEdge org.openhab.binding.solaredge.config.SolarEdgeConfiguration@7b8f882c[username=user,password=pass,solarId=siteID,pollingInterval=30,asyncTimeout=120,syncTimeout=120]
2017-10-25 15:13:56.297 [DEBUG] [.solaredge.internal.command.PreLogin] - received content, length: 40
2017-10-25 15:13:56.300 [DEBUG] [.solaredge.internal.command.PreLogin] - received content, length: 40
2017-10-25 15:13:56.304 [DEBUG] [.solaredge.internal.command.PreLogin] - HTTP response 200
2017-10-25 15:13:56.306 [DEBUG] [.solaredge.internal.command.PreLogin] - HTTP response 200
2017-10-25 15:13:56.326 [DEBUG] [.solaredge.internal.command.PreLogin] - onComplete()
2017-10-25 15:13:56.345 [DEBUG] [.solaredge.internal.command.PreLogin] - onComplete()
2017-10-25 15:13:59.917 [DEBUG] [.solaredge.internal.command.PreLogin] - JSON String: {“success”:true,
“isLicensed”:true
}
2017-10-25 15:13:59.918 [DEBUG] [.solaredge.internal.command.PreLogin] - JSON String: {“success”:true,
“isLicensed”:true
}
2017-10-25 15:14:00.164 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.100:8080
2017-10-25 15:14:00.241 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.100:8443
2017-10-25 15:14:02.159 [DEBUG] [.solaredge.internal.command.PreLogin] - received content, length: 40
2017-10-25 15:14:02.242 [DEBUG] [.solaredge.internal.command.PreLogin] - HTTP response 200
2017-10-25 15:14:02.244 [DEBUG] [.solaredge.internal.command.PreLogin] - onComplete()
2017-10-25 15:14:02.245 [DEBUG] [.solaredge.internal.command.PreLogin] - JSON String: {“success”:true,
“isLicensed”:true
}
2017-10-25 15:14:02.425 [DEBUG] [solaredge.internal.command.PostLogin] - received content, length: 15727
2017-10-25 15:14:02.477 [DEBUG] [solaredge.internal.command.PostLogin] - HTTP response 200
2017-10-25 15:14:02.544 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - command for solaredge:generic:45d065c7:live#production: REFRESH
2017-10-25 15:14:02.549 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - command for solaredge:generic:45d065c7:live#pv_status: REFRESH
2017-10-25 15:14:02.726 [DEBUG] [solaredge.internal.command.PostLogin] - received content, length: 15727
2017-10-25 15:14:02.747 [DEBUG] [solaredge.internal.command.PostLogin] - HTTP response 200
2017-10-25 15:14:02.877 [DEBUG] [solaredge.internal.command.PostLogin] - received content, length: 15727
2017-10-25 15:14:02.911 [DEBUG] [solaredge.internal.command.PostLogin] - HTTP response 200
2017-10-25 15:14:02.979 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-10-25 15:14:03.372 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-10-25 15:14:10.323 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-10-25 15:14:27.686 [DEBUG] [g.solaredge.handler.SolarEdgePolling] - polling SolarEdge org.openhab.binding.solaredge.config.SolarEdgeConfiguration@15c36b10[username=user,password=pass,solarId=siteID,pollingInterval=30,asyncTimeout=120,syncTimeout=120]
2017-10-25 15:14:27.703 [WARN ] [edge.internal.connector.WebInterface] - Session-Cookie not found: SPRING_SECURITY_REMEMBER_ME_COOKIE
2017-10-25 15:14:27.905 [DEBUG] [.solaredge.internal.command.PreLogin] - received content, length: 40
2017-10-25 15:14:28.011 [DEBUG] [.solaredge.internal.command.PreLogin] - HTTP response 200
2017-10-25 15:14:28.013 [DEBUG] [.solaredge.internal.command.PreLogin] - onComplete()
2017-10-25 15:14:28.014 [DEBUG] [.solaredge.internal.command.PreLogin] - JSON String: {“success”:true,
“isLicensed”:true
}
2017-10-25 15:14:28.648 [DEBUG] [solaredge.internal.command.PostLogin] - received content, length: 15727
2017-10-25 15:14:28.709 [DEBUG] [solaredge.internal.command.PostLogin] - HTTP response 200
2017-10-25 15:14:28.847 [DEBUG] [edge.internal.connector.WebInterface] - SPRING_SECURITY_REMEMBER_ME_COOKIE: amdvbnphbGV6Zjg3QGdtYWlsLmNvbTozNjU2NDI0NTE1MzUzOjg1MmUzZWYwOWMwNzE1NTNlMTU3NTgzYTFjOGNjYTI2
2017-10-25 15:14:28.928 [DEBUG] [edge.internal.command.LiveDataUpdate] - received content, length: 27
2017-10-25 15:14:28.938 [DEBUG] [edge.internal.command.LiveDataUpdate] - HTTP response 200
2017-10-25 15:14:28.941 [DEBUG] [edge.internal.command.LiveDataUpdate] - onComplete()
2017-10-25 15:14:28.948 [DEBUG] [edge.internal.command.LiveDataUpdate] - JSON String: {“siteCurrentPowerFlow”:{}}
2017-10-25 15:14:29.001 [DEBUG] [internal.command.AggregateDataUpdate] - received content, length: 4564
2017-10-25 15:14:29.021 [DEBUG] [internal.command.AggregateDataUpdate] - HTTP response 200
2017-10-25 15:14:29.023 [DEBUG] [internal.command.AggregateDataUpdate] - onComplete()
2017-10-25 15:14:29.027 [DEBUG] [internal.command.AggregateDataUpdate] - JSON String: {“fieldStartDate”:1448123428000,“fieldEndDate”:1508975999000,“dataStartDate”:1508889600000,“dataEndDate”:1508975999000,“utilizationMeasures”:{“production”:{“value”:8.557,“unit”:“KWh”}},“isMSCMode”:true,“measurementUnit”:“W”,“systemProduction”:{“dateSeries”:[{“date”:“2017-10-25 00:00:00”,“value”:null},{“date”:“2017-10-25 00:15:00”,“value”:null},{“date”:“2017-10-25 00:30:00”,“value”:null},{“date”:“2017-10-25 00:45:00”,“value”:null},{“date”:“2017-10-25 01:00:00”,“value”:null},{“date”:“2017-10-25 01:15:00”,“value”:null},{“date”:“2017-10-25 01:30:00”,“value”:null},{“date”:“2017-10-25 01:45:00”,“value”:null},{“date”:“2017-10-25 02:00:00”,“value”:null},{“date”:“2017-10-25 02:15:00”,“value”:null},{“date”:“2017-10-25 02:30:00”,“value”:null},{“date”:“2017-10-25 02:45:00”,“value”:null},{“date”:“2017-10-25 03:00:00”,“value”:null},{“date”:“2017-10-25 03:15:00”,“value”:null},{“date”:“2017-10-25 03:30:00”,“value”:null},{“date”:“2017-10-25 03:45:00”,“value”:null},{“date”:“2017-10-25 04:00:00”,“value”:null},{“date”:“2017-10-25 04:15:00”,“value”:null},{“date”:“2017-10-25 04:30:00”,“value”:null},{“date”:“2017-10-25 04:45:00”,“value”:null},{“date”:“2017-10-25 05:00:00”,“value”:null},{“date”:“2017-10-25 05:15:00”,“value”:null},{“date”:“2017-10-25 05:30:00”,“value”:null},{“date”:“2017-10-25 05:45:00”,“value”:null},{“date”:“2017-10-25 06:00:00”,“value”:null},{“date”:“2017-10-25 06:15:00”,“value”:null},{“date”:“2017-10-25 06:30:00”,“value”:null},{“date”:“2017-10-25 06:45:00”,“value”:null},{“date”:“2017-10-25 07:00:00”,“value”:null},{“date”:“2017-10-25 07:15:00”,“value”:null},{“date”:“2017-10-25 07:30:00”,“value”:null},{“date”:“2017-10-25 07:45:00”,“value”:0.0},{“date”:“2017-10-25 08:00:00”,“value”:7.0},{“date”:“2017-10-25 08:15:00”,“value”:48.5},{“date”:“2017-10-25 08:30:00”,“value”:141.33333},{“date”:“2017-10-25 08:45:00”,“value”:343.33334},{“date”:“2017-10-25 09:00:00”,“value”:677.3333},{“date”:“2017-10-25 09:15:00”,“value”:753.8333},{“date”:“2017-10-25 09:30:00”,“value”:1605.3334},{“date”:“2017-10-25 09:45:00”,“value”:1712.5},{“date”:“2017-10-25 10:00:00”,“value”:1865.5},{“date”:“2017-10-25 10:15:00”,“value”:1848.6666},{“date”:“2017-10-25 10:30:00”,“value”:1871.6666},{“date”:“2017-10-25 10:45:00”,“value”:1886.0},{“date”:“2017-10-25 11:00:00”,“value”:1968.0},{“date”:“2017-10-25 11:15:00”,“value”:1834.3334},{“date”:“2017-10-25 11:30:00”,“value”:2083.5},{“date”:“2017-10-25 11:45:00”,“value”:1329.5},{“date”:“2017-10-25 12:00:00”,“value”:1310.3334},{“date”:“2017-10-25 12:15:00”,“value”:1260.0},{“date”:“2017-10-25 12:30:00”,“value”:1000.6667},{“date”:“2017-10-25 12:45:00”,“value”:984.5},{“date”:“2017-10-25 13:00:00”,“value”:1874.5},{“date”:“2017-10-25 13:15:00”,“value”:1468.6666},{“date”:“2017-10-25 13:30:00”,“value”:1196.8334},{“date”:“2017-10-25 13:45:00”,“value”:1495.0},{“date”:“2017-10-25 14:00:00”,“value”:1154.5},{“date”:“2017-10-25 14:15:00”,“value”:898.5},{“date”:“2017-10-25 14:30:00”,“value”:495.5},{“date”:“2017-10-25 14:45:00”,“value”:429.5},{“date”:“2017-10-25 15:00:00”,“value”:null},{“date”:“2017-10-25 15:15:00”,“value”:null},{“date”:“2017-10-25 15:30:00”,“value”:null},{“date”:“2017-10-25 15:45:00”,“value”:null},{“date”:“2017-10-25 16:00:00”,“value”:null},{“date”:“2017-10-25 16:15:00”,“value”:null},{“date”:“2017-10-25 16:30:00”,“value”:null},{“date”:“2017-10-25 16:45:00”,“value”:null},{“date”:“2017-10-25 17:00:00”,“value”:null},{“date”:“2017-10-25 17:15:00”,“value”:null},{“date”:“2017-10-25 17:30:00”,“value”:null},{“date”:“2017-10-25 17:45:00”,“value”:null},{“date”:“2017-10-25 18:00:00”,“value”:null},{“date”:“2017-10-25 18:15:00”,“value”:null},{“date”:“2017-10-25 18:30:00”,“value”:null},{“date”:“2017-10-25 18:45:00”,“value”:null},{“date”:“2017-10-25 19:00:00”,“value”:null},{“date”:“2017-10-25 19:15:00”,“value”:null},{“date”:“2017-10-25 19:30:00”,“value”:null},{“date”:“2017-10-25 19:45:00”,“value”:null},{“date”:“2017-10-25 20:00:00”,“value”:null},{“date”:“2017-10-25 20:15:00”,“value”:null},{“date”:“2017-10-25 20:30:00”,“value”:null},{“date”:“2017-10-25 20:45:00”,“value”:null},{“date”:“2017-10-25 21:00:00”,“value”:null},{“date”:“2017-10-25 21:15:00”,“value”:null},{“date”:“2017-10-25 21:30:00”,“value”:null},{“date”:“2017-10-25 21:45:00”,“value”:null},{“date”:“2017-10-25 22:00:00”,“value”:null},{“date”:“2017-10-25 22:15:00”,“value”:null},{“date”:“2017-10-25 22:30:00”,“value”:null},{“date”:“2017-10-25 22:45:00”,“value”:null},{“date”:“2017-10-25 23:00:00”,“value”:null},{“date”:“2017-10-25 23:15:00”,“value”:null},{“date”:“2017-10-25 23:30:00”,“value”:null},{“date”:“2017-10-25 23:45:00”,“value”:null}]}}


(Alexander F) #20

Hi Javier,

it seems your setup only returns one value:

2017-10-25 15:14:29.027 [DEBUG] [internal.command.AggregateDataUpdate] - JSON String: {“fieldStartDate”:1448123428000,“fieldEndDate”:1508975999000,“dataStartDate”:1508889600000,“dataEndDate”:1508975999000,“utilizationMeasures”:{“production”:{“value”:8.557,“unit”:“KWh”}}

“aggregate day production”. I do not know why there are no other values, at least export/import should also be available even if not battery is installed.

The live data string is empty - however:

2017-10-25 15:14:28.948 [DEBUG] [edge.internal.command.LiveDataUpdate] - JSON String: {“siteCurrentPowerFlow”:{}}

BR
Alex