You’re nearly there.
Did that Protocol Wizard HACS addon help with decoding?
I have to get hold of the cable first to connect the inverter to a laptop through a USB port. I will then try the protocol wizard; maybe it will show more than the exception 11 error message. I might do it. tomorrow. What puzzles me is why all the other enable/disable type of registers can be remotely toggled except the one I need: the one that enables and disables timeslot charging.
It may be a sequence thing, or some other register needs to be enabled first.
The only thing is that I have two time slots already programmed in the inverter to charge during the two discounted periods of the day. For the discharge option, none of the timeslots is programmed. I will clear them and see if that was the preventing thing. But I have the same issue with the discharge option and none of its timeslots is used. I also tested earlier today the code stripped off all other sensors, except the single switch for the difficult register with and without the time: component and get the same behavior
Stepping back: Do you need to configure timeslot charging, if you are doing the same function in HomeAssistant?
I have been setting the timeslots directly on the inverter. And as if you’re reading my mind, I was just experimenting with that, and I’ve added these two entries to select:
# Time charging stages
- platform: modbus_controller
modbus_controller_id: powmr_cntrl
id: start_charg_time1
name: "Start Charge Time1"
optimistic: true
skip_updates: ${settings_skipped_updates}
entity_category: config
address: 0xE026
value_type: U_WORD
optionsmap:
"00:00": 0
"01:00": 256
"02:00": 512
"03:00": 768
- platform: modbus_controller
modbus_controller_id: powmr_cntrl
id: stop_charg_time1
name: "Stop Charge Time1"
optimistic: true
skip_updates: ${settings_skipped_updates}
entity_category: config
address: 0xE027
value_type: U_WORD
optionsmap:
"00:00": 0
"01:00": 256
"02:00": 512
"03:00": 768
I kept getting the same error message when I change the timeslot… Notice the almost 5 seconds delay between the the write request and the response of the register.
Another strange occurring: No state value was showing in front of “Start Charge Time1” before the change request but after the request and the error message, the state updates to the requested value “01:00” in this test. And I verified on the inverter nothing has changed!

Another observation is that for these two registers, the times selected on the inverter do not show or update on the UI table. Each time I restart the ESP 32 they revert back to default, zero time
Can you post a link to that modbus protocol sheet.
Sorry, I just viewed the file looking for the addresses that have been used and realized that it was different from the one I received from the manufacturer.“Sunsmart MODBUS protocol V1.92.pdf”.
Looks correct at first sight.
Esphome prints exception 11. If that’s dec, protocol sheet gives:
“08H
Parameters cannot be changed
during operation The parameters changed in the host write operation are parameters that cannot be changed during operation”
To confirm that, enable uart debugging to see exact response.
What is meant by dec, in “dec, protocol sheet gives?”
I’m a novice about “protocols”. Earlier I have to look for how to communicate the correct numbers for time with hex conversion. I am more on the mechanical hardware side! I learned only a couple hours ago, the meaning of 5947 as the maximum number for the timeslot registers. I divided it, first, by 24h first and that was not an integer number so I rounded up to 248 and I got the error. I have some readings, I learned a new thing and I found it exciting when I discovered that it was instead 23h × 16^2 + 59min !! I’ll try enabling the UART bus and see what it gives. Thank you.
11 in decimal is 08 in HEX.
Esphome log doesn’t specify if it’s presented in hex or dec.
Uart debugging can print out the exact hex exception . ![]()
I got it now. I’m an old timer. We learned this back in college when everything was running on base 8. It takes me a while to figure out base 16 and the addition of the letters to replace the two digits
Lucky you. They didn’t teach this when I did college (or maybe I was sleeping).
I remember an instrumentation course back in 1978, and this was taught to convert a value from analog to digital. I remember enjoying it since it was simple/mathematical.
I agree, simple sounds good by it self. Mathematics is science of nature, enjoyable when you have correct “state of mind”.
I just got the following, and I cannot make sense of it after adding the debug option and trying to modify register E02C:
It’s 08, so consider what I posted above:
how come this parameter can be changed directly on the inverter during operation?
No idea. I don’t own chinese crystal ball…

