Comments (11)
@hcouplet Just pushed 4435415, which includes your code (with small modifications, I think the lambdas aren't needed).
from ginlong-solis.
In my opinion, there is nothing to stop all the things that can be set via ModBus (holding registers, see INV/ESINV register maps) from also being realised via this solution. For example, the inverter's internal clock is synchronized via NTP for INV type inverters.
from ginlong-solis.
I have 3 solis inverter and I must limit the power injected to grid to max 10Kw. (Belgium regulation).
I have a P1 house counter that report the power injected to the grid.
So I am updating inverters power limit to do that. ( I know that I can limit the power by connecting the meter to the inverter but this way I can define the balance myself)
Here is what is working for a solis S6.
By default it is set to 110% . One I change to value, it change the power generated.
number:
## Set ≈ limit
- platform: modbus_controller
modbus_controller_id: modbus_master
id: solis2_set_power_limit
name: "Set Solis2 Power limit"
address: 3051
unit_of_measurement: "%"
register_type: holding
value_type: S_WORD
mode: box
step: 0.5
entity_category: config
skip_updates: 100
min_value: 0
max_value: 110
lambda: "return x / 100; "
write_lambda: |-
int16_t limit = x * 100;
ESP_LOGI("main", "Set Power Limit %d", limit);
//Send power limit
esphome::modbus_controller::ModbusCommandItem set_payload_commandValue = esphome::modbus_controller::ModbusCommandItem::create_write_single_command(modbus_master, 3051, limit);
// Submit the command to the send queue
modbus_master->queue_command(set_payload_commandValue);
return {};
from ginlong-solis.
@hcouplet, great, thanks for sharing your configuration!
Does it actually work? Solis docs say that for reg 3052 to work, you need to set 3041 to 0x03 (fixed power factor) -- did you change this value? My reg 3041 is factory default = 0x00.
from ginlong-solis.
Yep it's working fine.
I tried other registries (i.e. 3081 with 3070) to set the absolute limit but they didn't worked.
This one was in the inverter menu and is limited on the inverter to max 110%. I was also limited to 110% max with the modbus.
I didn't had the 3041, I guess it's by default activated.
Anyway, if the inverter deliver 4000W, setting a value of 10%, instantanely changed the delivery to 500W (I have a 5K inverter). Also changing on the inverter, changed the value on HA and vice-versa.
I can check tomorrow during day time my 3041 value.
I have still lo check with my solis hybrid : I have two S6-GR1P5K and one RHI-6K-48ES-5G. (this is a DIY install).
Once I have the working value, I will post it here.
from ginlong-solis.
3041 is set to "No response mode" on my inverter. So the register 3052 don't seem to use the 3041.
Here is the select I did :
select:
- platform: modbus_controller
name: "Working Mode"
address: 3040
value_type: S_WORD
optionsmap:
"No response mode": 00
"Volt–watt default": 01
"Volt–var": 02
"Fixed power factor": 03
"Fix reactive power": 04
"Power-PF": 05
"Rule21Volt–watt": 06
For the register 3052, On the inverter it's on the menu :
Advanced Settings / 0010 / Power Control / Set Output Power
Maybe the doc is not correct, I am wondering if I am not changing the register describe at 3050 :
This would make sense with the multiply by 100 (value max 11000) and it does not depend on other register.
May be we need to do plus +1 instead of -1 as explained in the doc ? :
Anyway I confirm that it's working great and the power is adjusted down and up directly : I can go down to 500W and the second later it goes back to 4500W
from ginlong-solis.
According to this Solis FAQ 'Set Output Power' is a volatile Setting (= reset during reboot) and 'output_p mit restore' is a permanent setting. Maybe each of this settings is set in different ModBus registers.
Maybe the doc 'This function is only available for working mode 03 Fixed power factor' only relates to the last part of the setting explanaition (set negative values). Just a guess.
from ginlong-solis.
This is good to know. The one I am changing is the 'Set Output Power' and not the one with restore as also available in the inverter menu. For what I want the one in RAM is better so I can update it often without risking to burn the flash with too many write.
from ginlong-solis.
Here is the code for solis hybrid. I tested on Solis RHI-6K-48ES-5G (firmware 3D0037).
To change output power. This is the value in RAM, so there is no write count limitation and it will be gone after reboot.
number:
- platform: modbus_controller
modbus_controller_id: modbus_master
id: set_power_limit_fixed
name: "Set Power limit"
register_type: holding
address: 43052
value_type: U_WORD
unit_of_measurement: '%'
entity_category: config
icon: mdi:percent
skip_updates: 10
mode: box
min_value: 0
max_value: 110
multiply: 100
Grid AC voltage is also useful for me :
- platform: modbus_controller
modbus_controller_id: modbus_master
name: AC Voltage
device_class: voltage
state_class: measurement
unit_of_measurement: V
register_type: read
address: 33073
value_type: U_WORD
accuracy_decimals: 1
filters:- multiply: 0.1
For S6 non hybrid, I am using :
- platform: modbus_controller
modbus_controller_id: modbus_master
name: AC Voltage
device_class: voltage
state_class: measurement
unit_of_measurement: V
register_type: read
address: 3035 # = 3036 - 1
value_type: U_WORD
accuracy_decimals: 1
filters:- multiply: 0.1
Here is the doc I used for the hybrid :
RS485_MODBUS-Hybrid-BACoghlan-201811228-1854.pdf
from ginlong-solis.
Here is another one interesting on the hybrid model. Setting the backflow power.
This is not in the documentation, but a guy discovered it (see https://diysolarforum.com/threads/solis-s5-various-issues.52383/#post-674717)
I tested it and confirm it's working on my inverter.
- platform: modbus_controller
modbus_controller_id: modbus_master
id: set_backflow_power
name: "Set Backflow Power"
register_type: holding
address: 43074
value_type: U_WORD
unit_of_measurement: 'W'
icon: mdi:transmission-tower-export
entity_category: config
mode: box
multiply: 0.01
from ginlong-solis.
@hcouplet I added backflow power setting with 33a4d83 . Can you please double check, I slightly modified your code:
- add min value
- changed icon to
tower-import
, export from inverter is import to the grid, right?
from ginlong-solis.
Related Issues (20)
- Stick won't connect back to WiFi HOT 2
- Values in Home Assistant becomes unavalible for a split second HOT 35
- Battery SOC view and set HOT 1
- Compilation fails with latest LibreTiny HOT 2
- Commit b25f978 prohibiting reboot if WiFi is not connected? HOT 3
- Can't build firmware with latest instructions HOT 2
- Synchronisation intervl HOT 10
- Problems with wemos/esphome & Solis RHI-5K-48ES-5G HOT 2
- Crash after WiFi scan with "RTL8195A Hard Fault Error" with LT 1.5.0 HOT 13
- Problems with flashing wifi stick (data transfer issues?) HOT 5
- Component modbus_controller took a long time for an operation HOT 2
- no success with ESPHome and Wemos D1 mini HOT 4
- High values for Active Power HOT 2
- ltchiptool usage, download mode, wiring HOT 6
- ESPHome missing sensors versus SolisCloud integration HOT 4
- ltchiptool upload error "Not a valid FlashMode" HOT 2
- Limited output power HOT 1
- ESPHome 2024.5.0 linker error: .ram_heap.data will not fit in region BD_RAM HOT 19
- Red led , impossible to re flash HOT 3
- Values Unknown : Inverter type definiton : 2030 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ginlong-solis.