Repository navigation
AlphaESS Modbus Integration #4901
Replies: 3 comments 4 replies
|
Thanks for the information and advice for others. Couple of comments I would make:
|
|
I've dropped the borrowed AlphaESSCloud profile and defined a custom inverter type as you suggested. For anyone else bridging an unsupported inverter to Predbat via decoy helper entities + a glue script, this is what worked for a local-Modbus AlphaESS — basing it on GE and only overriding the two flags needed for forced export: Basing it on GE keeps the charge side that already worked (timed charge-enable, power control, kWh SoC) and only changes what's needed for export. With this, forced export now correctly drives my real scheduled_discharge_enable switch — verified end to end, the battery actually discharges to grid — instead of Predbat writing the sensor.predbat_..._scheduled_discharge_enable dummy it created under the mismatched profile. Your point #2 was exactly the root cause: with GE, has_discharge_enable_time is False, so Predbat created that dummy and ignored my apps.yaml mapping, silently — the only visible trace was the ... returned value 'None' validation warning. VerificationWith the custom type, I tested end-to-end (watching the real switches, real SoC, and the AlphaESS app independently):
|
|
Hi - just so you know at least a couple of folks have also been working on this topic of Alpha ESS integration when using local Modbus controls. User Plainseer loaded an sample configuration here: I have also been working to adapt this configuration to the older integration designed by Axel Koegler at Projects @ Hillview site. This older integration is what the HACS integration from Senalse. It's not clear whether that Senalse version will be supported going forward as the author has gone silent (apparently). The older integration is still being updated from time to time but it requires manual installation and has a lot of different entity names. Anyway - if you want to see our approach generally, take a look at the Github above - not sure if you are following a similar approach or not. We are not using scheduled start/end times - we are triggering timers for each of the Predbat services based on the real time service status commands issued by Predbat. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR:
If you use
inverter_typeas a capability/decoy profile for an unsupportedinverter, pick one with
has_discharge_enable_time: True. A profile with it set toFalse(e.g.GE) makes Predbat write an internal dummy entity forscheduled_discharge_enableinstead of the entity you mapped inapps.yaml, so yourforced-export control is never actually written. Charging is unaffected, which makes it
very confusing to diagnose.
My setup (for context — this is not a natively supported config)
inverter_type: "GE"purely as a decoy capability profile —nothing GivEnergy is connected. All of Predbat's control entities
(
scheduled_charge_enable,scheduled_discharge_enable, charge/dischargestart/end times, rates, target SoC) are mapped in
apps.yamlto helper/templateentities (
input_boolean/input_datetime/input_number, plus a template-switchproxy for the enables).
into real AlphaESS Modbus dispatch writes.
Symptom
Expslots correctly and showed themin the Plan,
predbat.statuseven went toExporting— butscheduled_discharge_enable(my template switch + itsinput_boolean) stayed off,so the glue never received an export instruction. The battery never discharged to grid.
Root cause (Predbat v8.54.2)
The
GEprofile hashas_discharge_enable_time: False(real GivEnergy inverters exportvia inverter mode, not a timed discharge-enable). For such profiles Predbat creates an
internal dummy entity
sensor.predbat_GE_0_scheduled_discharge_enableand writes thatfor the enable, instead of the entity I mapped in
apps.yaml. So my real switch — andthe
input_booleanthe glue watches — was never written.Charging worked because
GEhashas_charge_enable_time: True→ no dummy is created →my real charge switch is written. That asymmetry was the whole mystery.
The one visible fingerprint was an easily-missed startup validation warning:
Warn: Validation of apps.yaml found configuration item 'scheduled_discharge_enable'
element sensor.predbat_GE_0_scheduled_discharge_enable returned value 'None', not a valid value
(For anyone who goes down the same rabbit hole I did: the
execute.pyforced-export call isnot the cause — its in-window branch passes a literal
Trueregardless of profile. Theredirect happens at the entity-resolution/write layer, driven purely by
has_discharge_enable_time.)Fix
Use a capability profile that satisfies the enable gate
has_discharge_enable_time and not (ge_eco_toggle or ge_inverter_mode), i.e.has_discharge_enable_time: True,has_ge_eco_toggle: False,has_ge_inverter_mode: False.I switched
inverter_type: "GE"→"AlphaESSCloud"and forced export immediately drovemy real switch → glue → battery discharged to grid (verified, SoC dropped).
GEC(GivEnergy Cloud) does not work — it hashas_ge_eco_toggle: True, so thegate still collapses to
False.DeyeCloud,SunsynkCloud,SolaxCloud. AvoidSolisCloud(has_reserve_soc: False).GEto be aware of:soc_unitschangeskWh → %but is inert inthe code (the attribute is assigned and never read; SoC units come from whether you set
soc_kwvssoc_percent); andtarget_soc_used_for_discharge: Truemeanscharge_limitis also written during export (harmless for a decoy glue that ignores itwhile exporting).
Link to gist for the 'glue' file https://gist.github.com/jonphob/3f793178ec81ca002002f16242715db4
Suggestion (enhancement, not a bug)
When a profile overrides a user-mapped control with an internal dummy, could Predbat make
this louder than the current soft
returned value 'None'warning? e.g. a one-line startupnote: "NOTE: profile GE does not use scheduled_discharge_enable; your mapped entity
switch.xxx will not be written." For the decoy-profile / unsupported-inverter crowd this
would turn a silent, week-long head-scratcher into a 10-second fix.
All reactions