Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.
Post details of your integration with Home Assistant etc.
Does anyone have the grid status register (importing/exporting) in the 3xxxx range, can't seem to find it if there is one.
I think sd_dracula has the emonevse (like me)
That sends it's data out over mqtt, no cloud API needed thankfully.
As for the PR, yep I should be able to do it, most likely the weekend again.. or tomorrow night depending on how things go.. I have just got a new steamdeck so could be a bit distracted..
If you want to charge car and preserve your house batteries;
Set 43110 to 51 (charge from grid)
Set 43141 to 0 (charge from grid at 0A)
To avoid drain issues like @silver_sky, you might be better triggering your Zappi charge from within HA. That makes it more robust against the MyEnergi API. Create an input_number helper called zappi_boost_kwh, and then create a script using the below:
alias: Zappi Boost x kWh sequence: - service: myenergi.myenergi_boost data: amount: "{{ states('input_number.zappi_boost_kwh') | int }}" target: device_id: xxxxxxxxxxxxxx mode: single icon: mdi:ev-station
@Jonathan I was talking to you about this before but I don't recall what the solution was.
Now that winter is here, I will need to charge the car at night and ofc not from the battery so I need to stop the battery drain while I charge the car.
Was it something like enable charge form grid (43110 = 51) but charge with 0A until the car is charged and then 43110 = 49 and set charge to 50A?
When I have to charge batteries & EV I suppose it won't matter, this might only apply for a few isolated cases.
Which register is it for setting the charge rate?
Or maybe there's a better option?
Rather than duplicating work, do you want to submit a PR to Stephan's repo with what you have and we can look to fill in the missing ones after?
Thanks @graememk
That's actually next on my to do list to bring in the full register list I need into HA via the integration, currently I'm doing it ghetto style, got a pi zero that polls it every whatever seconds using the pysolarmanv5 code and sends stuff via mqtt.
But still I am not sure from the above if I can tell if the battery was charged using grid or solar.
I suppose I need to make two new sensors and check if grid status = importing then add kwh to charged from grid else from pv.
Or maybe even based on time, hardly going to be pv from 00:00 to 06:00 etc
If you know what register your looking to pull in. Pull up the \\homeassistant\config\custom_components\solarman\inverter_definitions folder and in the solis hybrid .yaml file.
Make sure the registers are included there.. Ive added a few to monitor the charge timers
Instructions are on the github.. which i cant find right now.. just not looking in the right place i think
Alright lads. I've got both a harvi/Eddi and a solis inverter. Which would be the best to monitor via openhab? I'm building my openhab pi with some grafana and Prometheus running too.
I am reading the battery kwh charged directly from the wifi logger but I would like to create two new sensors in HA which track the amount of kwh charged from the grid and from PV, separately.
If someone has this configured do you mind sharing the yaml pls.
So this is what I don't get, before I messed around with 43110 I just read it and was 49 which is 00110001 and then after manually forcing a grid charge it changed to 51 or 00110011 so it looks to me it's just toggling bit 7 on and off.
I can only think that once you change settings via modbus then maybe what you see on the LCD screen of the inverter doesn't match? i.e. once I flip between 49/51 via modbus I don't see Backup mode but Self use
I guess I will never find out until the first power cut/I cut the power myself 🤷♂️
Yes the day night meter is on utc and never changes.
The backup mode toggle is on a different settings page.. (I'd need to be hands on but it's one of the last menu items)
And for the ones not knowing why we are shoving seemly random numbers to change settings:
This register controls various settings, each a single bit. Mine for example is 35 in decimal or 0x23 in hexadecimal or 0010 0011 in binary (bit00 is on the most right, reading right to left)
Bit00 is set to 1, unused
Bit01 set to 1 time of use mode
Bit02 set to 0, off grid mode
Bit03 set to 0 battery wake up mode
Bit04 set to 1 reserve battery mode
Bit05 set to 1 allow charge from grid
Bit06 set to 0 feed in priority mode
And the rest are unused.
Hexadecimal is a base 16 way of representing binary (base2) and goes 0-9 ABCDEF each number or letter represents 4 bits.
If you can work out the 8 bits of binary you need, you can just shove that into google and ask it to convert to decimal!
Maybe it just doesn't show it on the LCD screen, as in it shows Self use when I go to storage mode but it's actually Backup? And 43356 = 0 so everything would indicate otherwise?
It's correct. If you have reserve battery enabled then it's 49/51, otherwise it's 33/35. I've a 6kW hybrid with backup enabled and same on mine.
33132 = 49
It needs to go back to Backup mode after not self use since I have all my network gear hooked up to the AC backup and if the power goes out I need all that to work.
Bit4 seems to toggle backup mode but not sure how to work it out.
Or set this register to 1 or 2, not sure which
Values 33 & 35 is what I send to the inverter to toggle Optimal Income Run/Stop.
What value are you seeing from register 33132?
You should be on Self use mode all the time & just toggle optimal income
Yes I only noticed that after.
I used these to get a reading, started importing and I got 51 when I read 43110, all good.
However when I sent 49 to 43110 it stopped grid charge as expected but did not toggle back to Backup mode, it stayed on Self use. Not sure how to resolve that.
I now set the discharge time 00:00 - 00:00 and the charge time 00:00 - 09:00 because my d/n meter seems to be 1 hour behind and I assume that is what is used to count the d/n kwh right?
Don't worry, you're doing it right. 43110 toggles the optimal income run/stop mode.
Your problem is that you have set a discharge time. That is only useful if you want to dump to the grid at peak times for high feed in tariff payments. Eg. Octopus Agile.
Solution: Set Discharge Time to 00:00 - 00:00.
It catches everyone. Solis should really rename or hide that option.
I need help with setting the correct value to 43110 to toggle the charging from grid on and off.
I can send the write command from home assistant and that works fine, the problem I have no idea what to set it to when enabling charging from grid.
It's a Solis 6Kwh 5G and I am using backup mode by default which is value 49.
I tried setting that to 51 but it switches to feed in priority and starts dumping to the grid (exact opposite of what I want)
I tried to manually go into it, set time of use so I can read the 43110 value again but won't take my settings, says Failed! when I save, what's wrong here?
Any ideas what I'm doing wrong here?
Gave me a proper chuckle :)
It won't come to divorce, but you'll be a sh1tload of brownie points in arrears 😂
Oh, so looks like you wouldn't need something like Node Red on top of HA to create flows. Would make life simpler to not need a 2nd system. I'll have a nosey as I'm deffo in the noob camp of needing gui / flow over code / yaml. Am looking to start very baby steps on HA soon. Don't have it setup yet, but gonna get it to turn on a light at the start. Rome, A Day and all that :)
It's the trying not to get divorced part that might be harder with spending this time on solar.
As regards HA automations vs Node Red, I stumbled upon Shortumation the other day. It basically provides a flow-based UI for HA automations.
Could be useful for those that prefer flows rather than yaml.
"What do you mean by virtual switches? A boolean that you can toggle in the UI which you are then checking the value of in some other automation? If so, check out Settings => Devices and Services => Helpers."
Yep thats what i needed, half the battle is figuring out what they are called!
I've moved this comment over to this thread where it is better suited.
So Modbus is a communications protocol that is used in lots of different industrial equipment, and is also supported by many different solar inverters. It is available in two main flavours; RTU (serial over RS485) and TCP (IP based). The Solarman loggers allow you to pass through Modbus RTU commands encapsulated in a proprietary format. pysolarmanv5 handles all the encapsulation for you, and exposes a simple Modbus API. A copy of the Solis Hybrid modbus registers are available here.
As for integrating with HA, the Solarman integration (as you've discovered) has Modbus read support for Solis Hybrids. There is no technical reason why it cannot be used to control either, other than nobody (myself included) has bothered to extend it. The alternative for reading is to use @reklamos's solismon3 project.
If you want write support, you can use @reklamos's solismod project, you can use @connesha's AppDaemon wrapper, or you can use a pyscript wrapper (which is what I'm using, but I have to tidy up and properly document). All three have different advantages, however if you're running HAOS, it can be a bit awkward to run arbitrary docker images, so a lot of people end up running docker images on another RPi (which is a bit of waste). Your options for running docker images within HAOS are to either add the Portainer add-on or modify @reklamos's projects to turn them into fully fledged HA add-ons (which are just containers with some special metadata).
What do you mean by virtual switches? A boolean that you can toggle in the UI which you are then checking the value of in some other automation? If so, check out Settings => Devices and Services => Helpers.
Finally starting to get a decent poke at this today.. Its been a busy couple of weeks.
Have extended the HA solarman thing too to pull in the Charge rates and times.
Still havent decided to Do the logic in HA or Nodered. I know node red, but the Automations are quite powerful in HA. (using the python in HA)
In HA can you Have Virtual switches.. or Inputs? ... If you know what i need to start looking into The Home assistant UI would be easy to pull up.
This thread is PHD Solar PV 😂
Thanks, sorted now :)
I keep hearing modbus... that's my solarman data logger right?
I took a look at your pysolarmanv5 module, need to get up to speed on python again. Looks like i'll need something like an Rpi running this and a DB to log the data to? Which Home Assistant can read from...
Assuming you are referring to a Solid Hybrid; You need to toggle bit01 in register 43110.
Can any one remind me if there is an easy way of turning the charging on and off, similar to the timed way in self use but a switch from off to on by one of the registers? Thanks.