Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.
Post details of your integration with Home Assistant etc.
Looks like it! Going to start hooking things up but I think this is it.
Cool, are you doing batch reads currently? I've tried cranking up the update rate and it's choking on anything faster than every 10 seconds which is surprising as I can read many more registers every 2 seconds from the SolaX inverter no problem.
To-do list is broadly as follows;
Pull requests welcome. 🙂
See post #278 above. BIT01 controls the timed charge mode. You'll need to read 43110 first to confirm what the value is first before XORing with 0x2 to set.
Sweet, so is this ready for prime time now?
Do I still need a pi/docker/etc to run the python code or is it all runnable from within nodered now? Including the code that polls the registers I mean
https://github.com/NosIreland/solismod works with nodered. Nodered published to mqtt and solismod pushes to solis.
Ah, there it is. Weirdly it wasn't there last night after installing both manually and via HACS and post-restart. It's working great now, cheers for putting the changes in for that integration. Do you have any more features planned for it?
How do you guys enable/disable grid charging of the battery? python I assume? What registers do you set? Can you share that code pls.
Is there an easy way to trigger that directly from HA Nodered and not have to mess with sending mqtt messages to the pi that's running the python code?
Has anyone here managed to get pysolarmanv5 code to run directly from nodered?
Configuration -> Devices and Services -> Integrations -> Set up a new integration -> Solarman
I saw that commit message, where in the UI? Can't find it in my integration.
Since 20e3280, config is via the UI. Docs need a tidy up ahead of next release.
20e3280
So I've got the latest and greatest from https://github.com/StephanJoubert/home_assistant_solarman and have the config:
solarman: name: Solis inverter_host: 192.168.0.130 inverter_port: 8899 inverter_serial: <snip> inverter_mb_slaveid: 1 scan_interval: 30 lookup_file: solis_hybrid.yaml
But, I'm getting nothing, no entities and nothing in the logs. Any idea why? Manually trying the example from pysolarmanv5 works fine with the serial and IP (static).
Thanks, have this working now. Bit of messing as had to install the add-on manually as I can't get HACS (my install is 2021.3 and 2021.9 or newer is needed for HACS), but once that was done it was just adding the mqtt sensors linked to the right values.
It's great to see the live values (or at worst 30 seconds old!) as solis cloud was at least 5-10 mins stale at the best of times.
I know, but I see no reason why I should not use it when it works for me. I have not seen any disadvantages on having negative value on battery.
You're using it wrong, all sensors need to be positive, never negative: https://github.com/reptilex/tesla-style-solar-power-card#templates-for-missing-sensors-or-for-negative-sensors
I do not have anything special, I use tesla-style-solar-power-card in HA as that shows everyting I need in one place.
My card config is below but you'll need to adjust them based on your entity names.
type: custom:tesla-style-solar-power-card grid_consumption_entity: sensor.meter_power_in_modified house_consumption_entity: sensor.total_load_power_modified grid_to_house_entity: sensor.meter_power_in_modified grid_to_battery_entity: sensor.grid_to_battery_power_in_modified generation_to_grid_entity: sensor.meter_power_out_modified generation_to_battery_entity: sensor.battery_power_in_modified generation_to_house_entity: sensor.solar_to_house_power_modified battery_to_house_entity: sensor.battery_power_out_modified battery_extra_entity: sensor.battery_capacity_soc appliance1_consumption_entity: sensor.bypass_load_power appliance1_icon: mdi:server-network generation_icon: mdi:solar-power house_extra_entity: sensor.house_load_today generation_extra_entity: sensor.generated_today grid_extra_entity: sensor.imported_today grid_entity: sensor.meter_power_in_modified house_entity: sensor.total_load_power_modified generation_entity: sensor.total_solar_output_power battery_entity: sensor.battery_capacity_soc
I didn't change the mqtt publish, except add optional authentication details, so still a single topic. Was just wondering if you've some HA code for arranging the panels to display the relevant info nicely. I'm new to HA so what I have looks a bit rough
I publish single json topic to MQTT instead of individual ones, this makes it faster and cleaner. I noticed with my testings before that if I do individual topics for each metric I was getting inconsistent behaviour from MQTT as it was not able to process topics fast enough. This is even more relevant to people running on RPI. But probable majority will not run into this since not all are pulling 1000s of metrics.
in configuration.yaml I have sensor: !include devices/sensors.yaml and then in devices/sensors.yaml I define my MQTT sensors that I want to pull to HA like this:
configuration.yam
sensor: !include devices/sensors.yaml
devices/sensors.yaml
- platform: mqtt state_topic: "solis/METRICS" unique_id: "sensor.today_generated" value_template: "{{ (value_json.today_generated | float) /10}}" name: "Generated Today" device_class: energy unit_of_measurement: "kWh" state_class: measurement
I shall indeed many thanks
See register 43110; https://www.scss.tcd.ie/coghlan/Elios4you/RS485_MODBUS-Hybrid-BACoghlan-201811228-1854.pdf
OK, so working off your code, my local copy now has InfluxDB working, with the following changes:
@reklamos - if you are interested in picking these up I can create a pull-request.
Also, could you share the homeassistant config you have for the subset MQTT published values you display?
Works fine but does need the time of use to be turned on so can’t discharge at the same time - #AnotherOne who would really like the time of use settings to be exposed in the pvsolarmanv5 please @Jonathan but very very handy indeed thank you. I’ll have more of a look when I get time.
I've shared code for Solar Forecasting, battery charging and EDDI and Inverter monitoring, on GitHub: https://github.com/connesha/home-energy-mgr-ext-main
There's a good deal of information in the README for getting setup and running it. It was written over the past month or so, and has been running in some form during that period. So far it has provided what I wanted for my setup. If anyone tries it out and has issues, let me know.
There were a few enquiries about this post (#78) on Forecasting and Charging, so this is all the code behind it, and a few basic Home Assistant integrations.
There are lots of people on here with more advanced setups, done in different ways. This runs outside HA by design; others run within HA, but that's not the model I'm going with for now at least. Hopefully it's of some use to those getting setup.
It is a Work-In-Progress, and all the usual disclaimers that come with that. It is my first python programming, and first programming of any sort in about 10 years, so that's my excuses out of the way for the parts that are not so pythonic ;-)
Parts are built on top of code shared previously in this forum by @Jonathan, @reklamos and @garo, so thanks to them for also sharing.
Also, some parts are following ideas discussed with @bullit_dodger and @graememk
Really nice work! Am away for a few days, but when I get back I'm going to set up your .yaml and tinker with it.
It depenend what you want to see/do in HA. I am pulling close to ~100 registers as I want to see them in Grafana but in HA I just need couple of them for automation. In my implementation I use Prometheus instead of InfluxDB and also metrics are published to mqtt. HA pulls the few mettrics that it needs from mqtt.
Thanks. Would be good to put all of this info in a sticky/modify the first post with all the links.
I spent a bit of time updating my previous Web scraper to use pysolarmanv5, and now thabks to you pointing it out see reklamos has done exactly this (and better than I had!). My scraper was publishing to influxdb, so may add this as an option to his version.
Next step is the HA integration of all this. Currently I have my solar details in a grafana dashboard, but no HA integration at all.
Not on the Solis, no. Either multiply them, or use the total DC power for all strings in 33057/33058.
I pushed my draft yaml to GitHub yesterday. Have a few more changes to make before I file a PR, but it should be good enough for testing.
Couldn't get @reklamos' register writing to work for my Solis inverter. Wasn't able to scan the registers properly.
Was chancing a 'modbus.read_input_register_formatted(register_addr=43144, quantity=1)' to see if I can also modify my charging times, but it's throwing the below.
Will crawl into the attic like an animal so! :D
Exception has occurred: error
unpack requires a buffer of 2 bytes
File "C:\Users\home\Python\solismon3\pysolarmanv5\pysolarmanv5.py", line 154, in _get_modbus_response
modbus_values = rtu.parse_response_adu(mb_response_frame, mb_request_frame)
File "C:\Users\home\Python\solismon3\pysolarmanv5\pysolarmanv5.py", line 199, in read_input_registers
modbus_values = self._get_modbus_response(mb_request_frame)
File "C:\Users\home\Python\solismon3\pysolarmanv5\pysolarmanv5.py", line 212, in read_input_register_formatted
modbus_values = self.read_input_registers(register_addr, quantity)
File "C:\Users\home\Python\solismon3\client_example.py", line 17, in main
data = modbus.read_input_register_formatted(register_addr=43143, quantity=1)
File "C:\Users\home\Python\solismon3\client_example.py", line 45, in <module>
main()
Hey guys is there a register for PV1 and PV2 power or just have to get it by pv1 A * pv1 V?
See page 1 of this thread. @reklamos shared a script that pulls from pysolarmanv5 and publishes via mqtt
Hi All,
Just got Jonathan's pysolarmanv5 running - and can query the registers of my solis inverter (starting at 33000..).
To get this integrated into HA are these the options as it stands:
(Jesus formatting is a dose on this new site, tried to simply have an indented list and couldn't get it to work....)