[solax] binding

Of course, I will check it next week :slight_smile:

Sorry for the long delay.

On Monday i changed to your latest version and everything works like before :+1:

Thank you very much for the test!
I’ll open the PR for review. Hopefully it gets reviewed soon and we can merge it. :slight_smile:
Cheers,
K.

I saw, the PR was merged :metal:
Again, thanks for your work

Do I understand correctly, that it will be released with OpenHAB 4.2?

Hi,
I just saw that the three new PRs are included in 4.2 first milestone build so yes - you can have it with 4.2 official release (or any of the milestones).

Cheers,
K.

Hi all.
I’m getting my new X3 Hybrid G4 installed tomorrow. I’m using wired connection, so the installer is installing a lan module (which I hope is compatible, it should work the same as a wifi module, right?). Is there anything speciel I need to check with regards to the version when the installation is made? It sounded to me like the electrician has a bunch of Solax lan modules lying around, is there any risk that the module installed here has an old version that is not fully compatible?

Hi Daniel,
I’m afraid that it has never been tested with lan module. We can only hope they follow the same protocol (would be nonsense if not). I would recommend to use latest possible FW. If lan modules follow the wifi modules version naming convention, it should be 3.x

Cheers,
K.

1 Like

Thanks! I’ll report back tomorrow and then hopefully you can add the lan module as supported :wink:

btw, I suspect the version numbering on the lan modules doesn’t match the one on the wifi-only modules, just noticed the compatibility list here. I’ll report back on that as well :laughing:

Looking forward to hearing from you. :slight_smile:

When you give it a try, especially if it doesn’t work, please raise the log levels to trace for the binding and provide me the output.

1 Like

Ok, first try was a complete failure. The inverter talks fine with Solax Cloud, however it doesn’t seem to be reachable locally at all (did a full portscan, turned out blank). They are gonna fix me a new one though, since this one was also too old to get me 10 seconds readings, so I guess we will have to wait for that :slight_smile:

Hi again.
Still waiting for my new lan module. While waiting I started actually reading into what the binding can do and I realize it doesn’t seem to do the thing I primarily thought I could use it for, and that’s changing the inverters settings, like affecting work mode or the forced charge period. Is this something that’s not available from the API? My plan was to force charge the battery from grid during cheap hours if the prognosis shows low income from the panels the next day…

Hi Daniel,
currently changes(commands) to the inverter are not possible.
If I find a documentation / similar code where it’s implemented, I guess we can add that to the binding. I’m not sure if the API even supports such a thing though…
If you come to any implementation, please let me know.

Cheers,
K.

1 Like

Hi Daniel, Konstantin & all.
I am actually doing what you are describing (and more), but not using the binding, but going through Modbus. I’m also using this binding as some readings get reset in Modbus (totals) so they are not usefull for long series, thay can be used for quicker data read and write.

The key use cases I have automated by now are:

  • Reading solar forecast for my location
  • Reading spot energy price (I sell/export surplus for spot) & EUR rate to convert
  • Early morning during “low energy price” I calculate energy needed until another “low price” window, tak into account expected gain, current battery status and some “margin for error” and if needed I charge the battery to a level that should cover until another “low price”, but not too much so that if sun is shining (or more than expected) I do not necessarily export because battery contains preloaded energy
  • I optimize export in the morning so that when there is a good forecast and algorhytm expects surplus (exports) I rather disable battery charging in the morning when export spot prices are higher and enable later, when the price drop
  • I completely block the export if the export price (spot-margin) is <0 so that I don’t get “penalized”
  • If no charging is needed I disable “night charging” and also reset “forced charging hours” as when they are set Solax does not live from battery despite “night charging is not enabled”

I based this on some other thread here, but had to get the current Modbus specification for X3 and update the definitions (things).

I have very ugly definitions and completely unelegant algorhitms, but they do the job. Can share if need be. Just its not relevant for this binding.

2 Likes

That hillarious! I just found your other thread describing this earlier today and was just about to make a reference to it here :joy:

Anyway, yep, I think I’m going for the Modbus approach as well. I’m waiting for my new lan module which according to my intel should support Modbus TCP. What would be really nice would be having this built into the Solax binding, but I guess that would mean quite a big work.

Yes, I believe both WiFi and LAN dongle have Modbus over IP in specifications. I believe the nature of this binding is very different (http api) so would probably not be ok to combine different transport layers into one binding as also some metrics overlap.
On the other hand it would probebly not be that difficult to build a “new binding on top of Modbus”, but what do I know. Combination of this binding and Modbus does the job for me, the only “downside” of the Modbus is that each each metric shows as single thing with single channel and so that the thing list is “cluttered” with many things “Modbus data”. If you need any help we cen move to the other thread and continue there where it belogs :slight_smile:

Just for the record: The pocket LAN v3 dongle does NOT have this function, it isn’t reachable locally over neither API nor Modbus. It needs to be version 4 of the module for that, which from what I understand is a quite new version.

That’s appreaciated! I’ll start a new thread (the one I found where you’d written about this is locked for some reason) and tag you! I guess it’s time to stop polluting this thread now :laughing:

Hi guys,
please refer the thread here, so anyone interested in the modbus integration does not have to search for that :slight_smile:
(I’m also interested for more functionality)

@Vaclav_Provaznik where do you get the forecast for the location and how do you consider it into your rules? Is it from some weather API?
I’m doing some “reactive” charging of my car trying to optimize the solar production to be maxed while maintaining battery and energy from the provider at minimum but I wonder if such a forecast may also be another parameter…

Thanks in advance,
K.

Yep: Solax Hybrid X1/X3 Inverter RealTime Data and control locally

Regarding the forecast, I installed the Solar Forecast PV binding yesterday, seems to do a very good job, more about it here: Solar Forecast PV

1 Like

Hi Konstantin,

same as @DanielMalmgren I’m using the Solar Forecast binding. I found SolCast more accurate, even though it only has 10 API calls for free / day. Strangely it seems that every refresh is using two calls for me so its basically 5 updates per day, but I use script to desdable the binding, so that I don’t waste them (kind of brute force). See the linked thread for detail.

It hase very convenient “Remaining Today” parameter which I use for calculations both early morning and during the time of peak price.

As said above my key lessons learned are:

  • Solax seems to honor “Forced Charge” window even when Night_Charging is disabled, so to prevent using grid in that window I also set it to 0:00-0:00 when disabling Night_Charging
  • Easiest way to “force export” during peak hours in the morning when battery is still empty is to switch to “FeedIn mode” (1). Don’t forget to set it back (timer and/or cron)
  • Setting export to 0 prevents exports during time with negative price (can adjust provider margin)
  • IMPORTANT: Export in modbus is in 10s of Watts, so for setting 14kW I need to set 1400
  • IMPORTANT: Dis/charging date/time in Modbus are 8bit (upper and lower from 16bits) for reading, but Modbus binding can’t write 8bits so you can only write byte. The guys in Solax planted a big trap as the Hour/Minute are reversed when Writing, so sometimes it kind of works (like 1:01 = 1:01), sometime is screws setting, but works (like 2:01 <>1.02 but is valid time) and sometimes it just forces error 4 (Modbus refused) (eg. 3:30 <> 30:03 but it is also invalid value).

Sorry to pick up this discussion.
Is there any chance to integrate the Solax Charger?
Curl command to get realtime local data: curl -d “?optType=ReadRealTimeData&pwd=PASSWORD” -X POST http://IP_ADDRESS
Description of the received data:

I’m pity not being a developer :frowning: