Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.
Post details of your integration with Home Assistant etc.
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.
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)
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.
It has a home assistant integration, you can use it to change target temperatures and enable/disable any of the zones including hot water.
How do you control the Honeywell Evohome? I have the smae and it would be nice to be able to automate it.
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.
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
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.
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.
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.
Oooooh does that work w/o a gateway??
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.
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.
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
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....
@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
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.
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
thanks for that @garo - have you had any luck converting the globalRadiation numbers to a kWh production guess for your system?
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).
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.
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!
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
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.
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.
I think direct interrogation of the Wifi logger is the way to go you can get so much more info than just the current power from the shelly. I'm pushing it into Emoncms then pulling that info into HA. The solis feed is polled directly from the Inverter and each of my strings PV1/PV2 watts is calculated from the voltage and amps for those strings again pulled directly from the inverter. It should be much more reliable and accurate than depending on pulling from the Solarman site.
Only drawback is that you'll not see the solar only. Just what comes from the Inverter be it solar or battery.
Have you tried talking to the wifi logger directly with code from Jonathan and reklamos has done a docker container that publishes to mqtt..
I have been using a node-red scraper that connects to Solis portal and didn't have many issues bar the odd time when the data is not refreshing on their side during maintenance etc which will happen to either solution anyway.
https://flows.nodered.org/flow/1a1e2bac1ecfe8f40527ad930fe788f0
HA and the Solis Portal integration is being give me trouble over the last week or so, it seems to be getting a daily version updates now from HACS and they cant seem to get it to work consistently. I have not being getting readings for the last few days
To be honest though I am thinking of getting another ShellyEM and to monitor my PV with that. I am impressed with the one I have and it gives you instant live readings and it would integrate nicely with my existing ShellyEM readings. Also the second channel in the shelly I can log my utility room plug circuit which has the washing machine and the dryer and a few other bits and bobs so its worth logging this circuit.
Only issue is possibly waiting three weeks for it to show up
Thanks. Have fixed both that and the FC16 issue now with v2.3.0.
As regards FC16, it is handy to be able to sync the datetime values in one go:
timestamp = list(map(int, time.strftime("%y %m %d %H %M %S").split())) modbus.write_multiple_holding_registers(register_addr=43000, values=timestamp))