This custom integration for Home Assistant allows you to monitor and control your Hoymiles solar inverter system through the Hoymiles Cloud API.
-
Data Monitoring:
- Solar PV power generation
- Battery power (charge/discharge)
- Battery state of charge
- Grid power import/export
- Load power consumption
- Daily and total energy generation
- Dynamic PV channel discovery based on the indicators returned by the account
- Per-channel PV voltage/current/power values via the module-data endpoint when the indicators feed only returns placeholders
- Reported inverter count and battery settings access diagnostics
-
Control Functions:
- Set battery operation mode when the account exposes writable battery settings
- Configure battery reserve state of charge for the modes returned by the account
- Peak Shaving Mode specific settings (
max_soc,meter_power) when supported - Home Assistant-native draft editors for Economy and Time of Use schedules using built-in selects, text fields, numbers, buttons, and summary sensors
- Advanced battery mode payload updates through Home Assistant services for Economy and Time of Use schedules
This integration focuses on safe production use:
- Read-only telemetry should still work even if the account cannot access battery settings
- Controls are only exposed when the Hoymiles account returns writable settings data
- Battery setting reads and writes now follow the observed async Hoymiles
read/write -> job id -> status pollflow - Station discovery supports accounts with more than one page of stations
- Authentication now preserves more specific Hoymiles failure reasons instead of flattening them into a generic login error
Not all available Hoymiles API fields are exposed as entities yet, but unsupported or permission-denied controls should now stay out of Home Assistant instead of showing misleading defaults.
- Make sure you have HACS installed
- Go to HACS → Integrations → Plus Icon → "Add Custom Repository"
- Enter the URL:
https://github.com/Philra94/homeassistant-hoymiles-cloud - Select category: "Integration"
- Click "Add"
- Find and install "Hoymiles Cloud"
- Restart Home Assistant
- Download this repository
- Copy the
custom_components/hoymiles_clouddirectory to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Home Assistant → Settings → Devices & Services → Add Integration
- Search for "Hoymiles Cloud"
- Enter your Hoymiles Cloud login credentials
- Click "Submit"
The integration currently auto-tries multiple authentication strategies:
- browser-compatible v3 login
- an
S-Miles Installerv3 retry with app-version metadata - an
S-Miles Homev3 retry with app-version metadata - legacy v0 login fallback
If Hoymiles rejects an account with a more specific message, the config flow should now surface that reason instead of only showing a generic authentication failure.
After configuration, the integration will create:
- A device for each Hoymiles station with sensors for power, energy, and battery levels
- Controls for battery mode and reserve capacity settings only when the account exposes writable battery settings
- A schedule editor surface for Economy (
mode: 2) and Time of Use (mode: 8) when those modes are present in the live Hoymiles payload
The integration creates PV input sensors from the indicator keys returned by the API. If a system has more than two PV inputs and Hoymiles exposes them in the indicators payload, matching Home Assistant sensors will be created automatically.
The sensors will update every minute by default, but this can be changed in the integration options.
The integration now exposes a Home Assistant-native draft editor for the two schedule-bearing battery modes:
Schedule Editor Modechooses whether you are editing Economy or Time of Use- Summary and count sensors show the live/draft schedule at a glance
- Validation and dirty-state sensors show whether the draft is safe to apply
- Built-in buttons load, apply, discard, add, and remove schedule rows
Time of Use draft entities expose:
- active period selector
- charge/discharge start and end times
- charge/discharge power
- charge and discharge SOC targets
Economy draft entities expose:
- active date window selector
- active weekday-group selector
- active duration-type selector
- start and end date fields (
MM-DD) - start and end time fields for the selected duration
inandoutnumeric fields for the selected duration
For structured battery settings and automation-friendly editor flows, the integration registers these services:
hoymiles_cloud.set_battery_modehoymiles_cloud.set_battery_mode_settingshoymiles_cloud.load_schedule_drafthoymiles_cloud.apply_schedule_drafthoymiles_cloud.reset_schedule_drafthoymiles_cloud.add_schedule_entryhoymiles_cloud.remove_schedule_entry
set_battery_mode_settings accepts a raw settings dictionary and merges it into the live Hoymiles mode payload by default. This is the recommended path for advanced Economy (mode: 2) and Time of Use (mode: 8) schedule updates because the backend expects the full mode payload to be preserved.
- The integration uses the modern Hoymiles v3 authentication flow with the observed browser-compatible hashing fallback.
- Some accounts appear to require a different Hoymiles client/account family. If Hoymiles responds with messages like
Can only login to the S-Miles Home.orYour app version is low. Please update to the latest version., the integration now exposes those outcomes more clearly in the config flow and logs while still keeping the user-facing setup flow simple. - Some accounts expose live battery telemetry but deny access to battery settings. In that case the integration keeps the telemetry sensors and hides the unsupported controls.
- Economy and Time-of-Use schedules now have draft editor entities in Home Assistant, but the integration still writes the full structured Hoymiles payload on apply.
- Validation is intentionally conservative for schedule editing: time/date formats and basic numeric ranges are checked before writes, while ambiguous Hoymiles-specific semantics are kept internal.
- API endpoints and payload structures are based on observed Hoymiles Cloud behavior and may still vary by region, account role, and hardware family.
- On some hardware (observed: HF-800-1WB) the indicators endpoint returns placeholder values for per-channel PV data; the integration then falls back to the module-data chart endpoint (see
docs/hoymiles-module-data-api.md) for single-microinverter stations. Those values are cached for a few minutes to match the cloud's own refresh rate, and drop to0once the inverter stops reporting for the day rather than repeating the last daylight reading.
Contributions are welcome! If you have recommendations, improvements, or additions to this repository, please feel free to:
- Open an issue with your suggestions
- Create a pull request with your changes
- Share your feedback on what could be improved
Please note that this code was developed with the assistance of AI, which may explain why some parts are not always the prettiest or most straightforward. Your help in improving and refining the codebase would be greatly appreciated.
- Check Home Assistant logs for details about any errors
- Verify your Hoymiles Cloud credentials
- If setup fails, note the exact Hoymiles message shown in the logs or config flow. Messages about
S-Miles Homeor app version requirements usually indicate an account/client compatibility issue rather than a wrong password. - The integration logs now include all attempted auth profiles and their returned status/message. Useful loggers are
custom_components.hoymiles_cloud.config_flowandcustom_components.hoymiles_cloud.hoymiles_api. - If a browser login works but the integration still fails, the most helpful follow-up is a sanitized network trace of the v3 login flow: the full
/iam/pub/3/auth/pre-inspresponse body, the/iam/pub/3/auth/loginrequest body, and the relevant request headers with secrets masked. - Ensure your Home Assistant instance has internet access to reach the Hoymiles Cloud API
You can test live authentication outside Home Assistant without saving credentials in the repository:
python3 scripts/test_login_flow.py --username "you@example.com" --try-matrixTarget a single profile:
python3 scripts/test_login_flow.py --username "you@example.com" --auth-mode home_v3Override the app version for installer/home testing:
python3 scripts/test_login_flow.py --username "you@example.com" --auth-mode installer_v3 --app-version 3.7.1For bugs or feature requests, please open an issue on GitHub.
This integration is not affiliated with, endorsed by, or connected to Hoymiles Power Electronics Inc. This is a third-party integration developed for personal use.