It was just a curl command to the esp32
curl 'http://192.168.42.11/number/sph_battery_first_start_time/set?value=542' -X POST
It was just a curl command to the esp32
curl 'http://192.168.42.11/number/sph_battery_first_start_time/set?value=542' -X POST
I got a reply from Growatt!
We donât use modbus to change this setting anymore so it may have some problem that we are not realized
You could change the battery first setting on screen, priority
Which isnât hugely helpful, and I have seen the shine stick sending what looks very much like modbus data so on I ploughed.
My next plan was to write a lambda in my config that started off sending exactly what I had seen from the stock shine stick, and pare it down until I got to the minimum data set, and here it is
- lambda: |-
esphome::modbus_controller::ModbusController *controller = id(growatt);
std::vector<uint16_t> battery_data={512,1280,1};
esphome::modbus_controller::ModbusCommandItem set_battery_command =
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller,1100,battery_data.size(),battery_data);
controller->queue_command(set_battery_command);
ESP_LOGI("ModbusLambda","Battery Time Write");
This sets the time to be on during 2am to 5am. I had to set on/off/switch fields together to be able to get the change to stick.
This means that there isnât a simple way of doing it with the SPH6000, but it is doable. All I need to do is replace the three values with id()
calls to some number fields and call this lambda when any of those number fields update.
Amazing, canât believe they replied, even if they did tell you a load of rubbish
You are a cleverer man than me, amazing job to figure all that out!
Looks like I am going to have to learn how to use ESPHome and reflash my stick!
Is it okay if I link your post to an issue I raised about this on the otti firmware GitHub?
Go right ahead, if I didnât want people to read it, I wouldnât have written it
Hi Everyone.
I am getting really frustrated with my Growatt MIC1500TL-X and shine-x combo.
I just got the system,and I am not able to get any data from the inverter. At all!
I started by pairing the Shine-X with the growatt server, and that was ok, besides the crappy manual. I got a connection, but never got a any data. Was not keen on their server anyway, and decided to flash the Shine-x with ESPhome, that went smoothly.
Tried a bunch of ESP home configurations, but never got one bit of data from the inverter.
I am just out of ideas now. My idea now is that the communication is not working in the inverter.
This is my current programming of the Shine-X with ESPhome.
Hi. Try to change the baud rate to 9600.
Same result, or no result It is a Shine-x,should be 115200 as far as ican read, but niether 9600 or 115200 works.
Try the @RT1080 code.
https://community.home-assistant.io/t/esphome-modbus-growatt-shinewifi-s/369171/215?u=candidotsa
Check if you receive any data.
It is not a SPH, it is a MIC-1500, a normal inverter with no hybridfunction. But the idea ask to a specific adress is good. Will try that.
Just wanted to say thanks again!
Had a play with ESPHome this weekend and have now got regular feeds into HA and can set charge times and SOC from a HA dashboard at the push of a button
No more flaky growatt api and 5 minute refresh rate!!!
Dear All,
Just to get it right:
I take the yaml config from the first post and put it into the ESPHome which I installed in Homeassistant
I replace the following:
ota:
password: â1234abcdâ
wifi:
ssid: âMy SSID for WLANâ
password: âmy Passwordâ
I click on compile in ESPHome and I get automatically a bin file.
I flash this bin-file to the Shine-X with ESPHome Flasher.
Whats next? Do I have to configure MQTT or anything, or just plug into the Inverter and everything will be reported to Homeassistant automatically?
Okay I is actually that easy. Thanks for sharing.
Today i got my 12KW Growatt inverter online, and my ESP flashed shine-x worked at once. My USB port on the MIC1500 must be broken. Has never worked with original firmware or ESPHome
Hi,
were you able to set the Battery Cutoff on spf 5000 es?
platform: modbus_controller
name: âBattery Cutoff %â
address: 82
value_type: U_WORD
optionsmap: # 0 - 99
"10": 10
"20": 20
"25": 25
hi. mine is the version with voltage not percentage. i donât have the address 82 will check it later.
for battery i only use time for charging, voltage to pass for grid or grid for battery and amp for charging
.
hi. where did you see the address 82 for the spf 5000es as battery cutoff? i have the address 82 for the fan speed as a read type.
- platform: modbus_controller
name: "${friendly_name} Fan speed"
address: 82
register_type: "read"
unit_of_measurement: "%"
device_class: POWER_FACTOR
state_class: measurement
# entity_category: diagnostic
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 0
filters:
- multiply: 1
Question for others using the SPH combined with ARK batteries, what level of efficiency do you achieve? I am a bit disappointed with mine - today i charged 12.1 kWh, after discharging 9.9kwh i arrived at the same SOC, that implies > 20% efficiency loss, far removed from advertised round trip efficiency.
Naturally i flagged this with Growatt; keen to hear the experience of others with a similar setup.
Thanks!
Have anyone tried to use a D1 mini directly to the usb port the shine dongle connects and have read data from the inverter?
Hi @WilbertV
Is there an updated code ?
I flashed this one for my SHine-S and it works, but has no webserver.
If there is an updated code can you please provide me or a link to the post.
And its not selectable in the energy dashboard.
Thanks for this awsome code!
i use this outdated code:
i recreated the code a bit and added mqtt to it
Works great.
The only thing is how can i add it to the energy dashboard?
Do i need to template for it od can we do it in one go, as its not selectable.
Here my repo with a full tutorial how to flash in ESPHOME Homeassistant, i will add the original bin file to restore it to factory settings soon.
I added a option to set the update time in the gui and added a reboot button so it takes effect when updated
code credits goes to @WilbertV and i modified it and added Mqtt to it
regards