mapping solaredge_modbus/src/solaredge_modbus at 64b604487982c38a9af96b3513733497731a7c60 · nmakel/solaredge_modbus · GitHubinit.py#L120
do you have this enabled in your UI ? https://www.solaredge.com/sites/default/files/storedge_charge_discharge_profile_programming.pdf
on my device they say this is only enabled in the US and not in the EU plus I think you have a different device
I have this https://www.solaredge.com/nl/products/StorEdge-products-for-on-grid-applications#/.
StorEdge 1-fase omvormer met HD-Wave technologie
Do you have some storedge api calls which I can try in postman. thanks
You don’t need the charge/ discharge profile.
There is no api for modbus, it is just raw data from the inverter. (Reading the registers)
I have no computer with me, I will check next week, and also upload the code to github
I have a separate inverter and battery (storedge module), so maybe there is a difference.
nice, will play with flows and with python to see if it works for me.
Repo is updated in the test branch.
I am still in doubt if I will continue the development of this app or not.
I am planning to move to HA for reliability.
yes I saw it , thanks
I can understand also my wave + batt setup is very different. plus looks like solaredge don’t enable the same options as your setup.
Will probably make a new device or make yours compatible with mine.
thanks
So I got it working but looks like my values are a bit different
changing control does not work for wave , I made a support ticket for that. but I can try it now and home something to debug it.
git diff drivers/inverter/device.js
diff --git a/drivers/inverter/device.js b/drivers/inverter/device.js
index 22e0d84..03b8a28 100644
--- a/drivers/inverter/device.js
+++ b/drivers/inverter/device.js
@@ -288,9 +288,10 @@ this.setSettings({
else {
Promise.all([
//Battery
- client.readHoldingRegisters(57716, 2), //0 battery power Watt
- client.readHoldingRegisters(57729, 2), //1 battery SOC %
- client.readHoldingRegisters(57732, 2), //2 Battery SOH %
+ client.readHoldingRegisters(57716, 2), //0 battery power Watt // E174
+ // client.readHoldingRegisters(57729, 2), //1 battery SOC %
+ client.readHoldingRegisters(57732, 2), //1 battery SOC % // E184
+ client.readHoldingRegisters(57730, 2), //2 Battery SOH % // E182
client.readHoldingRegisters(57726, 2), //3 max Capacity Wh
client.readHoldingRegisters(57728, 2), //4 available Capacity Wh
client.readHoldingRegisters(57666, 2), //5 rated energy Wh
@@ -318,10 +319,12 @@ else {
client.readHoldingRegisters(57357 , 1), //23 Storage remote control Command Mode uint16
client.readHoldingRegisters(57358 , 2), //24 Storage remote control Charge limit Float32
client.readHoldingRegisters(57360 , 2), //25 Storage remote control DischargeCharge limit Float32
+
+
]).then((results) => {
let batterypower = results[0].response._body._valuesAsBuffer;
- var soh = results[1].response._body._valuesAsBuffer;
- var soc = results[2].response._body._valuesAsBuffer; //9280
+ var soc = results[1].response._body._valuesAsBuffer; //9280
+ var soh = results[2].response._body._valuesAsBuffer;
var maxcap = results[3].response._body._valuesAsBuffer; //9800
var cap = results[4].response._body._valuesAsBuffer; //9310
var energy = results[5].response._body._valuesAsBuffer; //9310
@@ -437,20 +440,24 @@ else {
//SOC
var soc1 = Buffer.from(soc, 'hex').swap16().swap32().readFloatBE();
this.setStoreValue('soc', soc1);
-
+ this.log('soc1 ',soc1 );
//Max Capacity
var maxcap1 = Buffer.from(maxcap, 'hex').swap16().swap32().readFloatBE();
-
+ this.log('maxcap ',maxcap1 );
//Usable Capacity
var cap1 = Buffer.from(cap, 'hex').swap16().swap32().readFloatBE();
+ this.log('cap ',cap1 );
+
//SOH
- var soh = Buffer.from(soh, 'hex').readFloatBE();
- var currentenergy = (soc1 * soh) / 100000;
+ var soh = Buffer.from(soh, 'hex').swap16().swap32().readFloatBE();
+ this.log('soh ',soh );
+ // var currentenergy = (soc1 * soh) / 100000;
+ var currentenergy = cap1 / 1000;
this.setStoreValue('currentenergy', currentenergy);
// in percentage
- var soh1 = (soh / cap1) * 100;
- this.setStoreValue('soh', soh1);
+ // var soh1 = (soh / cap1) * 100;
+ this.setStoreValue('soh', soh);
// Lifetime import export doesnt work
//Battery lifetime export
@@ -460,7 +467,6 @@ else {
this.log('export', battexport1);
var battexport1 = battexport1;
this.setStoreValue('battexport', battexport1);
-
//Battery lifetime import
var battimport1 = battimport.readUInt32LE();
var battimport1 = battimport1;
@@ -513,6 +519,7 @@ else {
//errors
}).catch((err) => {
+ this.log('ccc');
this.log(err);
})
//Write data to inverter
@@ -677,31 +684,33 @@ if (controlmodeset == storagecontrolget) {
.then(function (resp) {
console.log('controlmodewrite', resp)
})}
-// dit is het schrijven voor remote control
-if (remotecontrolset == remotecontrolget) {
-} else {
- client.writeSingleRegister(57357, remotecontrolset)
- .then(function (resp) {
- console.log('remotecontrolwrite', resp)
- })
-}
-/// DIT is het regeltje om charge te beperken
-if (chargepower == chargeget) {
-} else {
- client.writeMultipleRegisters(57358, [chargehex1, chargehex2])
- .then(function (resp) {
- console.log('chargewrite', resp)
- })
-
-}
-/// DIT is het regeltje om discharge te beperken
-if (dischargepower == dischargeget) {
-} else {
- client.writeMultipleRegisters(57360, [dischargehex1, dischargehex2])
- .then(function (resp) {
- console.log('dischargewrite', resp)
- })
-}
+// // dit is het schrijven voor remote control
+// if (remotecontrolset == remotecontrolget) {
+// } else {
+// client.writeSingleRegister(57357, remotecontrolset)
+// .then(function (resp) {
+// console.log('remotecontrolwrite', resp)
+// })
+// }
+
+
+// /// DIT is het regeltje om charge te beperken
+// if (chargepower == chargeget) {
+// } else {
+// client.writeMultipleRegisters(57358, [chargehex1, chargehex2])
+// .then(function (resp) {
+// console.log('chargewrite', resp)
+// })
+
+// }
+// /// DIT is het regeltje om discharge te beperken
+// if (dischargepower == dischargeget) {
+// } else {
+// client.writeMultipleRegisters(57360, [dischargehex1, dischargehex2])
+// .then(function (resp) {
+// console.log('dischargewrite', resp)
+// })
+// }
/*
// if different write new setting
So you have different registers… that’s complicated 
To control, you first have to put the battery in remote control, second you have to choose the mode
yeah, but mine matches the documentation and other github projects.
Also looks like you have more control over your setup. it looks likes for me the dealer has to create profiles for me. will check that.
thanks
Just wondering… I have a Solaredge SE12.5k without display…does it also work with the app?? Actually I can t retrieve any values
did you enable modbus ? or you can try this
python3 modbus.py --timeout 5 --unit 1 --json 192.168.107.25 1502
to see more output.
That was the question…how to enable it…just checked… you can activate via setapp… but only the guys who installed it…will check with them if they can activate it
I think everyone can activate it, see the first post
did this
Inverters with SetApp
- Enable wifi direct on the inverter. ( switch the handle to P )
- Connect to the inverter access point like you would for a normal wifi network. The wifi password is published at the right side of the inverter. (check your wifi entries )
- Then open up a browser and go to http://172.16.0.1 .
- From this webpage you can enable modbus TCP without setApp or installer account.
I can show you my setting.
in my case in NL and hd wave , the installation guy will enable batt control tomorrow , all except in NL this need to be done by the installer.
Thanks Edwin…will try tomorrow… and inform if it worked out
Since March 2021 my Solaredge 6000 Wave with meter has always worked well with Modbus Tcp. Yesterday I updated the firmware of the 6000 and I can no longer connect in Modbus Tcp …
even when it is enabled in the invertor/menu. I noticed when homey is connecting , I cannot do this from my laptop . had to remove it from homey and then I was able to connect.
Okay…I activated modbus TCP … got a port number… and now?? 
nice now you can add device in homey to check this , I had to use 1502 as port number.
