Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.
Post details of your integration with Home Assistant etc.
I use https://solcast.com/ for forecasting. They allow 50 API calls in 24hours which is sufficient. I do poll every 30 mins and drop data that I need to MQTT. In HA I have sensors that subscribe to MQTT topics. Node red pulls the data constantly but the charge desicion is only taken at 2am as this is when the cheapest rate starts. It takes estimated forecast and SOC values and based on them decides at what current to charge the battery. Charge interval does not change(2-5am). If there is enough juice in the battery and forecast looks good it does not charge at all. I'm attaching node red flow. This will not work out of the box and you will need to modify it to fit your setup.
Thanks for this. I'm trying to do the same thing but have (hopefully) achieved it in HA with scripts/automations/MQTT. I'm using the Forecast.solar integration. I've added the scripts to my page so I can press them manually if needed.
Basically, I've done it this way for now as a test.
If at 11:30PM 'Energy Production - Tomorrow' is above 10kwh then set timed charge hour to 2.
This basically reduces my charging slot by 1 hour / 20% and charges my battery from 10% to 90% rather than 100%.
The next thing I need to do is take the current SOC at 11:30PM into account and add that to the above. Not immediately important at the moment as I'm using most of the Solar and Battery every day but I will be adding more batteries and solar in the next couple of months. Also handy to have this all sorted for when I'm away and not using as much energy.
Would you mind sharing your NR flow? Would be really useful to see how it all works.
First set node red to trigger timed charge manualy and verify if that works. If it does than you can start automating it.
I have changed my charging based on weather forecast. It does need some tweaking as it is not exact science but it has been working pretty well so far.
No luck again this weekend.
Setup Solismod and node-red to replicate reklamos’ solution. Registered for charging start and stop look to be setting, but the battery charged last night. Checking the settings on the inverter itself and it looked like nothing had happened at all!
ah well! The hunt continues.
Thanks, yes I saw that one but doesn't have 33213 or 43011 etc so I imagine that document is missing quite a lot now. Maybe most of the registers are known that people want and it's not too important. Just so happens the few I wanted weren't listed in documents but I did find them in this thread.
Hi,
I'm using https://www.scss.tcd.ie/coghlan/Elios4you/RS485_MODBUS-Hybrid-BACoghlan-201811228-1854.pdf which I should note is not authoritative (ie it's not official from the manufacturer) so as said above could change with newer firmware updates.
[edit] I just realized you were talking about contributions maybe you could publish to one of the existing github repos? I know that https://github.com/StephanJoubert/home_assistant_solarman has inverter specific yaml files which might suffice?
Thanks reklamos, it's a steep learning curve but an enjoyable one. My next task is some automation with Nodered MQTT.
Do we have a current list online somewhere of all the regsiters that we can all contribute to? I have the Hybrid 5K.
One is holding(RW) and the other is input(RO) register. They may store same value but they may serve diferent purpose. You have to remember that your use case is not the only case the way inverter is used(like daisy chaining multiple inverter together). We do not know the full internal implementation of modbus in the inverter and manufactures do take many liberties the way they implement modbus.
Sorry, I should have been clearer. Yes, I know that bit but there are two registers for the same thing. In the end, I changed 43011, and that in turn changed 33213. Why are there two registers relating to the same thing?
They are not the same. SOC dicharge is how much the battery is allowed to discharge to. If battery is not charge for a long time it will slowsly drain. This is were FOC comes in. FOC is the very borrom line. Ifbattery charge falls beyond FOC value, inverter will force charge the battery to SOC value to avoid it being damaged.
Thanks, I did manage to change these values via Python this evening in the end. Why are there two registers for the same thing?
Please provide more details as these are kinda self explanatory. 43011 is your Discharge SOC and 43018 is FOC. They both depend on each other. FOC cannot be higher than SOC. SOC has a range 10-40 and FOC min value is 5. These potentialy could change with firmware.
Ah, I get you. Yeah I polled 43143-43150, but these were unchanging so I assumed I didn't need to modify those. The only change I was physically making on the Solis inverter was under timed charge, changing from stop to run.
I'm clearly missing much in the way of background to modbus. Will go back and read up.
Thanks!
Well, I've made some good progress by getting a lot of info into HA and talking to the inverter via Python. I've read some values and had a general poke around. I have a couple of questions as this is the first time I've used Python or Modbus.
I'd like to change low charge SOC values but unsure how to do this the correct way. There appears to be a few registers for Overdischarge SOC and ForceCharge SOC.
33213 reads as 10% and 33214 reads as 8%
and then
43010 -> overcharged_soc
Reads as 100? (Edit: Actually, this makes sense and it's overcharge)
43011 -> over_discharge_soc
Reads as 10%
43018 -> strong_charge_soc
Reads as 8%
Any help greatly appreciated!
There is more to this than just enabled and disabled. 43100 is U16 with multiple functions. To enable timed charging you need to set BIT01 to 1 and to disable to set it to 0.
Timed charge used to be on register 43114 but I was not able to make ti work. As a workaround I change charge interval with registers 43143-43150. If the interval is 0 than charging is disabled otherwise it charges for the number of hours/minutes that I set.
For me, when timed charge is enabled, register 43110 reads Value: 00003 (0x0003)
For me, when timed charge is disabled, register 43110 reads Value: 00001 (0x0001)
Code below doesn't seem to be persisting on the inverter for me tho. Any pointers would be greatly appreciated.
I assume the values to write can vary from model to model and be firmware dependent.
Thanks, I'll start with HA integration and start reading those threads. Thanks for the links, very useful.
Hi Fred,
I think reading the thread is a must, but if you want to have a relatively quick HA integration then definitely take a look at https://github.com/StephanJoubert/home_assistant_solarman . I believe there are members on here who are changing their battery charge times based on the weather (see the thread https://www.boards.ie/discussion/comment/118596188/#Comment_118596188) I haven't tried myself but it looks like you have all the pieces in place to do it.
Looks like some great work you chaps are doing on this. I don't have a lot of knowledge when it comes to HA etc but I do have an instance running and have managed to get a few things being monitored and automated around the house. I have the Solis 5K Hybrid with wifi dongle that I'd like to control remotely, and if possible, add some automation to night charging times linked to the weather forecast.
I will try and get time to read the last 13 pages but has anyone managed to achieve the above, and if so, how difficult was it, and what are the main key steps to achieve this? Cheers.
Info in case it's important:
Wifi Stick Serial Starts With: 405
Current version:MW_08_512_0501_1.82
Firmware version (main)
003A
Firmware version (slave)
0029
Inverter model
00F3
I wanted to try the idea of turning on and off feed in priority on my Solis 5G hybrid inverter. After reading register 33132 I discovered that the register was 35 (00100011) with feed in off and 98(01100010) with feed in on. Basically bit 6 and bit 0 so I wrote the following quick snippet to XOR those two bit s using 65 (01000001). Now I'm not too sure of modbus etiquette when it comes to reading from the holding register or the input register so I stuck with all reads coming from 33132 and writes going to 431110.
Seems to work with changing the inverter but just to note I'm not sure why bit 6 needs to be set as this doesnt seem to align with https://www.scss.tcd.ie/coghlan/Elios4you/RS485_MODBUS-Hybrid-BACoghlan-201811228-1854.pdf so please use with caution. I put in a time delay as occasionally I got a crc error when reading back the updated value from 33132
print("old value is ",modbus.read_input_register_formatted(register_addr=33132, quantity=1)) """65 is 01000001 which changes bit 0 and bit 6 when you XOR (ie between 35 and 98)""" val = modbus.read_input_register_formatted(register_addr=33132, quantity=1)^65 modbus.write_holding_register(register_addr=43110, value=val) # wait for 4 seconds to ensure register is updated time.sleep(4) print("new value is ",modbus.read_input_register_formatted(register_addr=33132, quantity=1))
I get you @Jonathan I see the other bits in that register on the doc I’ll need to read up on this.
Thanks @Jonathan - so it changes “auto” to “time of use” mode. I’ll test If I leave optimal income on run and just turn the “time of use” on and off does that work. I may also be mistaken but I don’t think I can set the overcharge SOC as selecting a battery not using the user defined settings? Turning on and off “Feed in priority” looks a great idea tbh I shall look into that also. Fair play thank you I need to read up on the storage modes but really appreciate the help.
Code looks fine syntactically. As regards 33 and 35, they correspond to toggling Bit01 - Time of use mode. 33 = ToU off, 35 = ToU on. There are other bits in that register too, so you need to read it before setting it.
Possibly a stupid question, but what can't you just set overcharge SOC to 95% (or something less than 100%)? Will that stop the Seplos bombing out?
EDIT: Would enabling Feed In Priority also resolve the Seplos issue for you? https://usservice.solisinverters.com/support/solutions/articles/36000245194-12-of-20-energy-storage-operating-modes-feed-in-priority
This succeeds but inverter still on STOP
val = modbus.read_input_registers(register_addr=33139, quantity=1)[0]
if (val>94):
modbus.write_holding_register(register_addr=43110, value=35) # JUST TOGGLE ON 33 AND OFF 35
print(modbus.read_holding_register_formatted(register_addr=43110, quantity=1)) #check 43110 Energy Storage Control Switch
else:
print("Under 95")
Thanks @Jonathan I have a Seplos bms and not happy when SOC gets near the top - ongoing issue with them, so days when I am not here I just want to stop charge for a few hrs if sunny. Manually I just change that to run and that does the trick but can schedule a script to check SOC and then write to that holding reg to turn on and off but I can’t seem to get just the toggle bit to work via code I’ll post code later. I’m on version 340022. Charge periods are fine and amps even through code all work fine just the Stop Run I can’t figure out.
It sounds like you are doing things right. What is it that you are hoping to achieve? Charge the batteries from grid at night? Have you got a charge period set up?
Can post up the code that you are using?
Hi guys,
I really need help.
I’m desperate to get 43110 Energy Storage Control Switch working.
I can set it to 33 or 35 but the switch doesn’t toggle.
“Time of use for Self use” screen I just want to toggle Optimal Income from stop to run. Is this 43110?
When I crawl up and change on the inverter I can read and see that it changes from 33 to 35 so assumed I’m looking at the correct place but just doing it wrong.
I've only had a brief look at home assistant. Looks semi complicated for me, but need to spend more time researching it.
Yeah I can recommend the ShellyEM, easy to install and set up (be careful though and completely isolate you distribution board when installing and even then treat everting is live...), integrated easy into Home Assistant. Yes it does record negative values for electricity going in the opposite direction so you can measure your PV export. The polling is live so you get almost instantaneous readings.
Good list of options there! I think I'll go with the Shelly. It's basically just my in and out that I want to monitor. I've already got a good idea of how much energy my devices use. I've only got a two row board, after requesting a three row. So space is somewhat limited alright. Just about room for upgrade for a charger when I get around to buying an EV.