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 have just a straight Solis inverter no hybrid battery one so I am only really interested in AC power being fed to me, but since I already have the inverter connected using the logger and CAT6 into my network I might give it a go. To be honest I have been looking at this thread and what you guys are doing and it looked a bit above my paygrade programming wise. I was impressed with myself I actually got the solarman integration to work, but I will look at this again to try and set it up.
There are new two Solarman HA integrations based on V5 protocol that have popped up on Github in recent days. Neither are at the moment suitable for out of box use with Solis inverters, but plan to work on fixing that. They were built based on other inverters, but it should just be a case of mapping out and updating the registers.
https://github.com/StephanJoubert/home_assistant_solarman
https://github.com/YodaDaCoda/hass-solarman-modbus
The former is in HACS so that it probably the one to target.
Ah, Shelly em would be perfect then.
I have a straight inverter too, It has different registers I have them, and there is a pdf somewhere here too that defines them
A shelly is probably easiest but wheres the fun in that :) Which model inverter do have you? I'm happy to share the script I hacked together to do mine it could be a good base to start from. I push the data into opencms and then pull from it to HomeAssistant but there should be a way to push that data into Home Assistant with MQTT or node red. I'm sure someone on here will have a suggestion I'm very much new to this and HA!
In light of the new wind generation record on the Irish grid over the weekend, I figured this might of use to some people here. Home Assistant rest sensor config to pull stats from the Eirgrid dashboard.
rest: - resource: http://smartgriddashboard.eirgrid.com/DashboardService.svc/stats?area=CO2Stats®ion=ALL scan_interval: 900 sensor: - name: "eirgrid_co2_intensity" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','LATEST_INTENSITY') | list | first).Value }}" unit_of_measurement: gCO2eq/kWh - resource: http://smartgriddashboard.eirgrid.com/DashboardService.svc/stats?area=WindStats®ion=ALL scan_interval: 900 sensor: - name: "eirgrid_latest_wind_generation" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','LATEST_WIND_GENERATION') | list | first).Value }}" unit_of_measurement: MW - name: "eirgrid_forecast_peak_wind_generation" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','FORECAST_PEAK_TODAY') | list | first).EffectiveTime }}" - resource: http://smartgriddashboard.eirgrid.com/DashboardService.svc/stats?area=FrequencyStats®ion=ALL scan_interval: 900 sensor: - name: "eirgrid_grid_frequency" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','LATEST_FREQUENCY') | list | first).Value | round(2) }}" unit_of_measurement: Hz - resource: http://smartgriddashboard.eirgrid.com/DashboardService.svc/stats?area=GenerationStats®ion=ALL scan_interval: 900 sensor: - name: "eirgrid_latest_generation" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','LATEST_GENERATION') | list | first).Value }}" unit_of_measurement: MW - name: "eirgrid_net_import_pct" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','NET_IMPORT_PCT') | list | first).Value | round(2) }}" unit_of_measurement: "%" - name: "eirgrid_renewable_generation_pct" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','RENEWABLE_GENERATION_PCT') | list | first).Value | round(2) }}" unit_of_measurement: "%" - name: "eirgrid_thermal_generation_pct" value_template: "{{ (value_json.Rows | selectattr('FieldName','eq','THERMAL_GENERATION_PCT') | list | first).Value | round(2) }}" unit_of_measurement: "%"
The CO2 intensity figure is particularly useful for automating loads to run at the greenest time.
import urllib.request import xml.etree.ElementTree as ET from pandas import DataFrame, to_datetime response = urllib.request.urlopen('http://metwdb-openaccess.ichec.ie/metno-wdb2t s/locationforecast?lat=53;long=-6') data = response.read() tree = ET.fromstring(data) parent_map = {c:p for p in tree.iter() for c in p} result_dict = {} for n in tree.iter('globalRadiation'): result_dict[parent_map[parent_map[n]].attrib['from']] = n.attrib['value'] #print(parent_map[parent_map[n]].attrib['from'], n.attrib['value']) df = DataFrame.from_dict(result_dict, orient='index') df.index = df.index.map(to_datetime) df.columns = ['globalRadiation'] df['globalRadiation'] = df.globalRadiation.astype('float') print (df.resample('H').ffill().resample('D').sum()) print (df[df['globalRadiation'] != 0][:12]) #df.globalRadiation.plot()
Someone had asked about pulling in solar radiation data. Here is a little bit I wrote. Change the lat/long to suit.
(I have posted this before I think but not in this thread).
thanks for that @garo - have you had any luck converting the globalRadiation numbers to a kWh production guess for your system?
Had a right result today 😁 I ordered another ShellyEM to log my solar PV and and my utility sockets circuit and it arrived today (only after a week a bit last one took 3 weeks) but the best thing was they sent me an extra one by mistake. Just checked the invoice and I only ordered one. It came in two packages so They must have f**ked up somewhere, came with CT clamps and everything.
So I will now I will have 6 circuits being logged in real time 😎 result
My rule of thumb is multiply by 4.8nwhich is the power of my E/W panels. It sort of works. If your panels are in a different orientation and tilt then your multiplier would be different. The radiation forecast isn't always 100% accurate mind you.
@reklamos I've pushed pysolarmanv5 to pypi, so you can remove the embedded copies in your apps now
pysolarmanv5
You should just be able to run pip install pysolarmanv5
pip install pysolarmanv5
Got my two extra ShellyEMs set up this morning so I am now logging 6 channels in my main consumer unit. Shelly sent me an extra one by mistake...
Circuits I logging at the moment are; Main ESB Incomer (to see if I am exporting), Heat Pump, Utility Rooms sockets, Solar PV, Kitchen ovens and my TV room. Probably might shift around the CTs over the coming months to different circuits so get a full breakdown of my energy consumption.
For a comparison see the graph below which is the HACS Solarman Web scraper in Home Assistant and the Shelly logger. This was the primary reason I got the extra ShellyEM as you can see the frequency of the readings there is no comparison....
I just tweaked my Node-Red setup to use the MyEnergi API to turn my Eddi on and off. This will only apply to people with an Eddi AND Zappi
The idea now is to charge my batteries from PV generation, but if the car is conneected and generation is 1.4kW, that the car will now be charged irrespective of the SOC level of my batteries. It requires the Storage parameter in MyEnergi master to be set to Avoid Both (Charge and Drain). When you have a Zappi AND an Eddi, in this setup, the Eddi will heat from any excess before the batteries will charge, so by having control of the Eddi, I will only turn on the Eddi once the Batteries are 100% full and the car is not charging / excess going to the grid < 1.4kW
Eddi to Stopped
/cgi-eddi-mode-Eeddiserial-0
Eddi to Normal
/cgi-eddi-mode-Eeddiserial-1
In the summer I was doing something along the lines of that, but I allowed the car to charge when the battery got to 80-90%, So when excess dropped off in the evening, the batteries were topped off at the end of the day.
Are you using any lib to wrap the MyEnergy Api, like this?
https://github.com/CJNE/pymyenergi
I've and Eddi, but no Zappi. Looking to do an Eddi Boost, or set the Boost Timer, at night, if the following days forecast is bad.
Oooooh does that work w/o a gateway??
Requires the Hub, if thats that you mean by a gateway. There was work done on reverse engineering the myEnergi RF protocol, but was all taken down unfortunately. Presumably due to NDAs.
Bleh, not bothered getting a hub just yet. Yeah, that's what i meant by gateway. It's very annoying so much stuff won't let you connect directly.
Depends a little on the inverter and the setup they have. Some of them have very good apps on your phone where you can change the parameters without having to write code. Others have very good API's that even a rudimentary coding knowledge you can get things running with a 10-15 liner script/batch file.
Then there's the stuff that the lads have been doing - quite impressively too I might add. That does indeed involve as certain know-how.
The hub is worth getting especially if you have both an Eddi and Zappi. Apart from being able to upgrade the firmwares, you can then obviously use the API
I'm doing something similar w.r.t. controlling my hot water. If the forecast for the day is bad, my oil boiler automatically heats the water at 6am. If the forecast is good, the oil boiler is switched off for water heating (via Honeywell Evohome) and as soon as the output solar PV power breaks 3kW, it triggers the Eddi to heat the water until max temp reached. So I'm able to fully control the priority between my DC-coupled batteries, Eddi and Zappi depending on needs.
How do you control the Honeywell Evohome? I have the smae and it would be nice to be able to automate it.
It has a home assistant integration, you can use it to change target temperatures and enable/disable any of the zones including hot water.
Looking for some help finding the Solis modbus registers for the details below as I would like to stop pulling from the cloud and hit the inverter directly.
I have gone through that pdf but I either can't find them or they called something odd.
I am bringing all of these values in from Solis cloud so they exist there (but maybe not on the inverter?)
Also, is there any way to read the 12xxx registers? pysolarmanv5 fails when trying to read those, need it for Grid Status which is 12590, and a few others.
Don't think a battery (dis)charge month register exists. For the rest of the battery ones, have a look at 33161 through 33168.
Don't have the rest of them to hand right now. Need to compare values to ensure correct register.
As for 12590, that is a coil, not a register, so you need to use a different modbus function code (FC02).
modbus.read_discrete_inputs(register_addr=12590, quantity=1)
Yeah they're not there for this month/this year it seems:
Unless they could be somewhere still since this list is quite old at this stage. Would be nice to have an official one from Solis.
And thanks for the correction, that works, I didn't realize they use a different method than the rest.
Also is there a way to pass an array of non-sequential registers to the method instead of calling it multiple times with different registers? I know you can give it a range but that would also grab not needed data.
Guys,
This all sounds great.
I downloaded node red and my laptop didnt have javascript etc..I'm ordering a new laptop in the next couple of weeks.
So I'm wondering would anyone have a list of items I need to look at...I've tried you tube (but I really just want basic for the time being..
Any help would be appreciated
I have solis inverter 6kw hybrid
Cheers lads
I'd imagine all the long term stats are computed in the cloud rather than on device. Doubtful they're doing anything fancy, compute them whatever way you want.
Easiest starting point for a newbie is to get a Raspberry Pi 4B and stick Home Assistant on it.
Yeah what I might do as a stop gap until I can add all of them up myself in HA, is bring whatever I can from modbus and the missing ones from the cloud for now.
It's usually the daily ones that solis cloud is not updating correctly anyway, which are correct coming from the inverter.
I just wish there was a way to not do 50 individual register reads, I know I can read multiple in one go but they are not sequential.
Also anyone know the register for battery discharged today? This is a basic one and I cannot find it.
Any suggestions are welcome 😁
Will do tks Jonathan