New binding available: SolarEdge binding

Hi Alex,

i Change the Setting of the site to english and now it works. There is a formatRevenue string. In german it is

german: formatedRevenue:“3.406,7€”
english: formatedRevenue:“€3,406.75”

You should parse this string and with this Information you can parse the currentPower. Then it should work.

BR
Herb

Hi Herb,

I have added the comma (,) to the regular expression which is used for parsing. It should now succeed for both english and german setups.

BR
Alex

Hi Alex et al
Sorry for the noob question but I’ve tried searching around and tried about ten different methods without success; how exactly does one install the binding??

I’ve downloaded the jar (tried both 2.2 and 2.3) and tried putting them in the shared add-ons folder; note that I’m using samba on a windows machine, which comes up with a configs folder and a shared folder, configs work (sitemaps, items etc) but I’m not sure if the addons folder is the correct one? Perhaps I just need to resort to pulling the SD card and transferring that way?

I believe I’ve got the thing, item and sitemap files correctly setup, but I’m not seeing anything in the logs nor in my UI.

Am I correct in reading that the dependencies have been fixed along the way, or do I still need to add the json parts?

Well I think I’m making progress, but haven’t gotten any data;

  • yes dumping the jar file (renamed) into the samba openHAB-share/openhab2-addons folder does seem to work, may need restarts to register? Shows up in paperUI under configuration/bindings. Also in the bundle:list when going through karaf (via “openhab-cli console” for us noobs)

  • seems you can also enable log debugging via karaf, using log:set DEBUG org.openhab.binding.solaredge

  • I believe my inverter would have to use legacyMode as there’s no modbus meter; I think the “old setups” is a misnomer, as this is supposedly solaredge’s latest-and-greatest inverter the SE5000H HD-Wave, but adding a modbus consumption meter is an extra $1K so I’m planning on alternate methods; reading blinks using a repurposed tasmota’d sonoff

I think this is my log:

2018-01-16 22:38:14.360 [DEBUG] [org.openhab.binding.solaredge ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.solaredge.internal.SolarEdgeHandlerFactory, component.id=13, service.id=118, service.bundleid=225, service.scope=bundle} - org.openhab.binding.solaredge
2018-01-16 22:38:14.394 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent STARTING - org.openhab.binding.solaredge
2018-01-16 22:38:14.397 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent STARTED - org.openhab.binding.solaredge
2018-01-16 22:38:14.439 [DEBUG] [org.openhab.binding.solaredge ] - BundleEvent [unknown:512] - org.openhab.binding.solaredge
2018-01-16 22:38:29.305 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘solaredge.items’
2018-01-16 22:38:29.409 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘sonoff.items’
2018-01-16 22:38:34.889 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘default.sitemap’
==> /var/log/openhab2/events.log <==
2018-01-16 22:38:35.321 [.ItemChannelLinkAddedEvent] - Link ‘SE5000H_Live_Production-solaredge:generic:SE5000H:live#production’ has been added.

Any thoughts on what I should be looking at next? Here’s my Thing:
solaredge:generic:SE5000H [ username="lee@emailaddress.com", password=“pass”, solarId=“123456”, legacyMode=true, liveDataPollingInterval=30 ]

Hi Alex,

i’m using your latest build in legacy mode.
The format of my live production is only correct if the webinterface is set to english language.
In the case of a german setup every value under 1 kW is shown correctly, but above 1 kW i get no decimals anymore.

Best Regards,
Alex :wink:

@d3rh3ld: Do you use the 2.2 or the 2.3 Snapshot? The 2.2 does not contain the fix!

BR
Alex

@roguestreak

If your binding is active it should in most cases show this WARN message:

2018-01-17 14:12:49.710 [WARN ] [edge.internal.connector.WebInterface] - Session-Cookie not found: SPRING_SECURITY_REMEMBER_ME_COOKIE

During login the mentioned cookie is quite often delayed and therefore a check fails which results in this warning. If this message is repeated very often there is a problem. If it appears once it is ok.
You could check your Thing Status in the Paper UI, it should be “online” in case of success and show an error in case of an authentication error.

BR
Alex

Hi Alex
I hadn’t done anything at all through PaperUI, I’m a noob at this and my only items so far were MQTT that couldn’t be setup through paper. Now that I’ve gone into paper and

  • changed the thing setting
  • clicked the channel and linked it to my item specified in my sitemap
    it now works!!
    Is the PaperUI setup required always, or has it just somehow kickstarted my file-based system where I’ve missed a critical step somewhere? If it’s required, it may be worth documenting in the main readme, if it’s not then any idea what it’s kickstarted?
    Thanks again!
    Lee

I use the 2.3 Snapshot

@d3rh3ld

I have added more logging please use the newest version and switch to DEBUG logging.
I will then need the outputs

RAW String: ...
Parsed value: ...
Parsed unit: ...
Converted value: ... 

Now that mine seems to be working OK with the 2.2 snapshot, with data storing to influxdb and graphing via grafana, what’s involved in performing future updates, eg. to the 2.3 snapshot? Is it just a matter of overwriting the jar and maybe restarting, or is it more convoluted and not worth the risk unless there’s a major bugfix implemented somewhere?

The newest version available is from 7th january ?

No it should be from today but somehow the build failed.

I still can’t see a newer version on this site:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.solaredge/2.3.0-SNAPSHOT/

@d3rh3ld: Please send me a PN with your mail address I will then sent you the latest version as mail attachment. I do not why but the central build fails (without an error message) even before compilation of my binding starts.

There are no debug messages like you said. The version, you sent me only outputs this:

2018-01-25 09:56:37.760 [DEBUG] [dge.handler.SolarEdgeLiveDataPolling] - polling SolarEdge live data org.openhab.binding.solaredge.config.SolarEdgeConfiguration@37e2ea[username=XX,password=XX,solarId=XX,legacyMode=true,live data pollingInterval=60,aggregate data pollingInterval=300,asyncTimeout=120,syncTimeout=120]

2018-01-25 09:56:38.190 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - received content, length: 6560

2018-01-25 09:56:38.193 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - HTTP response 200

2018-01-25 09:56:38.195 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - onComplete()

2018-01-25 09:56:38.199 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - RAW String: Ext.apply(SE.labels,{overViewPanel:SE.labels.OverViewPanel,overViewPanel1:SE.labels.OverViewPanel1});(function(){varshowCurrentPower=false;if(!SE.isPublic&&SE.Params.hasSEMInDashboard&&SE.permissions.DashboardPowerFlow)showCurrentPower=false;elseshowCurrentPower=true;if(SE.isPhone){showCurrentPower=false;};vardata={lastDayEnergy:"959,59Wh",lastMonthEnergy:"84,81kWh",lifeTimeEnergy:"11,65MWh",};if(showCurrentPower){Ext.apply(data,{currentPower:"1,12kW"});}varoverViewPanel={showLifeTimeRevenue:false,showCurrentPower:showCurrentPower,data:data};Ext.apply(SE.Params,{overViewPanel:overViewPanel});})();Ext4.define('SE.AbsOverViewPanel',{extend:'Ext.panel.Panel',layout:{type:'hbox'},cls:'se-overview-panel',params:SE.Params.overViewPanel,statics:{create:function(params){returnSE.createCmp('SE.OverViewPanel',params);}},adjustLastItemCSS:function(){varlastItem=this.items[this.items.length-1];lastItem.cls='se-site-filter-panel-cell-end';lastItem.style='border-right:none';},createTodayEnergyCell:function(){this.TodayEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-today-energy',cellId:'TodayEnergy',text:this.labels.todayEnergy,_data:this.data.lastDayEnergy});this.items.push(this.TodayEnergyCell);},createThisMonthEnergyCell:function(){this.ThisMonthEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-this-month-energy',cellId:'ThisMonthEnergy',text:this.labels.thisMonthEnergy,_data:this.data.lastMonthEnergy});this.items.push(this.ThisMonthEnergyCell);},createLifeTimeEnergyCell:function(){this.LifeTimeEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-life-time-energy',cellId:'LifeTimeEnergy',text:this.labels.lifeTimeEnergy,_data:this.data.lifeTimeEnergy});this.items.push(this.LifeTimeEnergyCell);},createCurrentPowerCell:function(){this.CurrentPowerCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-current-power',cellId:'CurrentPower',text:this.labels.currentPower,_data:this.data.currentPower});this.items.push(this.CurrentPowerCell);},createLifeTimeRevenueCell:function(){this.LifeTimeRevenueCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-life-time-revenue',cellId:'LifeTimeRevenue',text:this.labels.lifeTimeRevenue,_data:this.data.formatedRevenue});this.items.push(this.LifeTimeRevenueCell);},update:function(data){if(this.params.showCurrentPower){this.CurrentPowerCell.dataPanel._data.setHtml(data.currentPower);}this.TodayEnergyCell.dataPanel._data.setHtml(data.lastDayEnergy);this.ThisMonthEnergyCell.dataPanel._data.setHtml(data.lastMonthEnergy);this.LifeTimeEnergyCell.dataPanel._data.setHtml(data.lifeTimeEnergy);if(this.params.showLifeTimeRevenue){this.LifeTimeRevenueCell.dataPanel._data.setHtml(data.formatedRevenue);}}});Ext4.define('SE.OverViewPanel',{extend:'SE.AbsOverViewPanel',labels:SE.labels.overViewPanel,width:300,addTitle:true,initComponent:function(){if(this.addTitle)this.title=this.labels.overview;this.data=SE.Params.overViewPanel.data;this.items=[];if(this.params.showCurrentPower){this.createCurrentPowerCell();}this.createTodayEnergyCell();this.createThisMonthEnergyCell();this.createLifeTimeEnergyCell();if(this.params.showLifeTimeRevenue){this.createLifeTimeRevenueCell();}this.adjustLastItemCSS();this.callParent(arguments);}});Ext4.define('SE.AbsOverviewPanelCell',{extend:'Ext.Container',flex:1,params:SE.Params.overViewPanel,statics:{create:function(params){returnSE.createCmp('SE.OverviewPanelCell',params);}},createCSS:function(){varrules=['.se-site-overview-panel-cell.x4-autocontainer-innerCt{vertical-align:middle;}'];SE.util.CSS.addCmpRules('se-site-overview-panel-cell-css',rules);},initComponent:function(){this.style='border-right:solid#d9d9d92px';this.createCSS();this.dataPanel=SE.createCmp('SE.OverviewDataBox',{text:this.text,_data:this._data});this.items=[this.dataPanel];if(this.params.showLifeTimeRevenue){if(this._data2){this._data2=SE.createCmp('Ext.Component',{html:this._data2,cls:'se-site-overview-data-box-data2se-green-color',flex:1});this.items.push(this._data2);}else{this._data2=SE.createCmp('Ext.Component',{html:'\u00A0',flex:1});this.items.push(this._data2);}}this.callParent(arguments);}});Ext4.define('SE.OverviewPanelCell',{extend:'SE.AbsOverviewPanelCell',height:79,cls:['se-panel-gradient','se-site-overview-panel-cell']});Ext4.define('SE.AbsOverviewDataBox',{extend:'Ext.Container',params:SE.Params.overViewPanel,width:'100%',layout:{type:'vbox',align:'stretch'},cls:'se-site-overview-data-box',statics:{create:function(params){returnSE.createCmp('SE.OverviewDataBox',params);}},initComponent:function(){this.createCSS();this.text=SE.createCmp('Ext.Component',{html:this.text,cls:this.textCls,flex:1});this._data=SE.createCmp('Ext.Component',{html:this._data,cls:'se-site-overview-data-box-data',flex:1});this.items=[this.text,this._data];this.callParent(arguments);}});Ext4.define('SE.OverviewDataBox',{extend:'SE.AbsOverviewDataBox',textCls:'se-site-overview-data-box-text',createCSS:function(){varrules=['.se-site-overview-data-box.x4-autocontainer-innerCt{vertical-align:middle;}','.se-site-overview-data-box.x4-box-inner{width:100%!important;}','.se-site-overview-data-box.x4-box-target{position:initial}','.se-site-overview-data-box-text{width:100%!important;font-size:14px;white-space:nowrap;text-align:center;padding:5px05px0;}','.se-site-overview-data-box-data{width:100%!important;font-size:18px;white-space:nowrap;text-align:center;padding:5px05px0;color:'+SE.CSSColor.grc()+';font-weight:bold;overflow:hidden;}'];SE.util.CSS.addCmpRules('se-site-overview-data-box-css',rules);}});

2018-01-25 09:56:38.205 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - Handling channel update.

2018-01-25 09:56:38.207 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - Channel is to be updated: live#production: 1

The Webinterface is set to German und shows a live production of 1,12, so the decimals got cut somewhere.

When the live production drops below 1 kW, then the decimals are ok:

2018-01-25 10:13:38.308 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - received content, length: 6556

2018-01-25 10:13:38.311 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - HTTP response 200

2018-01-25 10:13:38.313 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - onComplete()

2018-01-25 10:13:38.318 [DEBUG] [nternal.command.LegacyLiveDataUpdate] - RAW String: Ext.apply(SE.labels,{overViewPanel:SE.labels.OverViewPanel,overViewPanel1:SE.labels.OverViewPanel1});(function(){varshowCurrentPower=false;if(!SE.isPublic&&SE.Params.hasSEMInDashboard&&SE.permissions.DashboardPowerFlow)showCurrentPower=false;elseshowCurrentPower=true;if(SE.isPhone){showCurrentPower=false;};vardata={lastDayEnergy:"1,25kWh",lastMonthEnergy:"85,1kWh",lifeTimeEnergy:"11,66MWh",};if(showCurrentPower){Ext.apply(data,{currentPower:"712W"});}varoverViewPanel={showLifeTimeRevenue:false,showCurrentPower:showCurrentPower,data:data};Ext.apply(SE.Params,{overViewPanel:overViewPanel});})();Ext4.define('SE.AbsOverViewPanel',{extend:'Ext.panel.Panel',layout:{type:'hbox'},cls:'se-overview-panel',params:SE.Params.overViewPanel,statics:{create:function(params){returnSE.createCmp('SE.OverViewPanel',params);}},adjustLastItemCSS:function(){varlastItem=this.items[this.items.length-1];lastItem.cls='se-site-filter-panel-cell-end';lastItem.style='border-right:none';},createTodayEnergyCell:function(){this.TodayEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-today-energy',cellId:'TodayEnergy',text:this.labels.todayEnergy,_data:this.data.lastDayEnergy});this.items.push(this.TodayEnergyCell);},createThisMonthEnergyCell:function(){this.ThisMonthEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-this-month-energy',cellId:'ThisMonthEnergy',text:this.labels.thisMonthEnergy,_data:this.data.lastMonthEnergy});this.items.push(this.ThisMonthEnergyCell);},createLifeTimeEnergyCell:function(){this.LifeTimeEnergyCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-life-time-energy',cellId:'LifeTimeEnergy',text:this.labels.lifeTimeEnergy,_data:this.data.lifeTimeEnergy});this.items.push(this.LifeTimeEnergyCell);},createCurrentPowerCell:function(){this.CurrentPowerCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-current-power',cellId:'CurrentPower',text:this.labels.currentPower,_data:this.data.currentPower});this.items.push(this.CurrentPowerCell);},createLifeTimeRevenueCell:function(){this.LifeTimeRevenueCell=SE.createCmp('SE.OverviewPanelCell',{id:'se-life-time-revenue',cellId:'LifeTimeRevenue',text:this.labels.lifeTimeRevenue,_data:this.data.formatedRevenue});this.items.push(this.LifeTimeRevenueCell);},update:function(data){if(this.params.showCurrentPower){this.CurrentPowerCell.dataPanel._data.setHtml(data.currentPower);}this.TodayEnergyCell.dataPanel._data.setHtml(data.lastDayEnergy);this.ThisMonthEnergyCell.dataPanel._data.setHtml(data.lastMonthEnergy);this.LifeTimeEnergyCell.dataPanel._data.setHtml(data.lifeTimeEnergy);if(this.params.showLifeTimeRevenue){this.LifeTimeRevenueCell.dataPanel._data.setHtml(data.formatedRevenue);}}});Ext4.define('SE.OverViewPanel',{extend:'SE.AbsOverViewPanel',labels:SE.labels.overViewPanel,width:300,addTitle:true,initComponent:function(){if(this.addTitle)this.title=this.labels.overview;this.data=SE.Params.overViewPanel.data;this.items=[];if(this.params.showCurrentPower){this.createCurrentPowerCell();}this.createTodayEnergyCell();this.createThisMonthEnergyCell();this.createLifeTimeEnergyCell();if(this.params.showLifeTimeRevenue){this.createLifeTimeRevenueCell();}this.adjustLastItemCSS();this.callParent(arguments);}});Ext4.define('SE.AbsOverviewPanelCell',{extend:'Ext.Container',flex:1,params:SE.Params.overViewPanel,statics:{create:function(params){returnSE.createCmp('SE.OverviewPanelCell',params);}},createCSS:function(){varrules=['.se-site-overview-panel-cell.x4-autocontainer-innerCt{vertical-align:middle;}'];SE.util.CSS.addCmpRules('se-site-overview-panel-cell-css',rules);},initComponent:function(){this.style='border-right:solid#d9d9d92px';this.createCSS();this.dataPanel=SE.createCmp('SE.OverviewDataBox',{text:this.text,_data:this._data});this.items=[this.dataPanel];if(this.params.showLifeTimeRevenue){if(this._data2){this._data2=SE.createCmp('Ext.Component',{html:this._data2,cls:'se-site-overview-data-box-data2se-green-color',flex:1});this.items.push(this._data2);}else{this._data2=SE.createCmp('Ext.Component',{html:'\u00A0',flex:1});this.items.push(this._data2);}}this.callParent(arguments);}});Ext4.define('SE.OverviewPanelCell',{extend:'SE.AbsOverviewPanelCell',height:79,cls:['se-panel-gradient','se-site-overview-panel-cell']});Ext4.define('SE.AbsOverviewDataBox',{extend:'Ext.Container',params:SE.Params.overViewPanel,width:'100%',layout:{type:'vbox',align:'stretch'},cls:'se-site-overview-data-box',statics:{create:function(params){returnSE.createCmp('SE.OverviewDataBox',params);}},initComponent:function(){this.createCSS();this.text=SE.createCmp('Ext.Component',{html:this.text,cls:this.textCls,flex:1});this._data=SE.createCmp('Ext.Component',{html:this._data,cls:'se-site-overview-data-box-data',flex:1});this.items=[this.text,this._data];this.callParent(arguments);}});Ext4.define('SE.OverviewDataBox',{extend:'SE.AbsOverviewDataBox',textCls:'se-site-overview-data-box-text',createCSS:function(){varrules=['.se-site-overview-data-box.x4-autocontainer-innerCt{vertical-align:middle;}','.se-site-overview-data-box.x4-box-inner{width:100%!important;}','.se-site-overview-data-box.x4-box-target{position:initial}','.se-site-overview-data-box-text{width:100%!important;font-size:14px;white-space:nowrap;text-align:center;padding:5px05px0;}','.se-site-overview-data-box-data{width:100%!important;font-size:18px;white-space:nowrap;text-align:center;padding:5px05px0;color:'+SE.CSSColor.grc()+';font-weight:bold;overflow:hidden;}'];SE.util.CSS.addCmpRules('se-site-overview-data-box-css',rules);}});

2018-01-25 10:13:38.330 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - Handling channel update.

2018-01-25 10:13:38.332 [DEBUG] [laredge.handler.SolarEdgeBaseHandler] - Channel is to be updated: live#production: 0.71

@d3rh3ld: It seems that however the old 2.2 version of the binding is still active/installed. Maybe it was not properly uninstalled or both the old and new version are installed in parallel.
In the meantime I was able to reproduce the error and apply another fix. I will send you the latest version later.

@d3rh3ld
The central build seems to be fixed again. The newest version is available here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.solaredge/

Nice, i’ll try it this weekend and will let you know if it’s workiing…

All right, now it is working with your latest build.
Somehow i had 3 versions installed in parallel…