A custom Home Assistant integration for the Hisense Hi-Mit II Air-to-Water heat pump (ATW), reverse-engineered from the official mobile app APK.
| Platform | Entity | Description |
|---|---|---|
binary_sensor |
Heat Pump Running | Reports whether the compressor / A2W unit is active |
sensor |
Circuit 1 Water Temp | Live actual water temperature — Circuit 1 (fixedDid18) |
sensor |
Circuit 2 Water Temp | Live actual water temperature — Circuit 2 (fixedDid19) |
sensor |
DHW Water Temp | Live actual domestic hot water temperature (fixedDid16) |
sensor |
Pool Water Temp | Live actual swimming pool temperature (fixedDid17) |
sensor |
Outdoor Ambient Temp | External sensor reading (swj_Ta) |
sensor |
Room 1–8 Temp | Individual room sensor readings (TsR1–TsR8) |
switch |
Circuit 1 (Heating) | Enable / disable Circuit 1 |
switch |
Circuit 2 (Heating) | Enable / disable Circuit 2 |
switch |
Domestic Hot Water | Enable / disable DHW heating |
switch |
Swimming Pool | Enable / disable pool heating |
number |
Circuit 1 Setpoint | Water temperature target for Circuit 1 (°C) |
number |
Circuit 2 Setpoint | Water temperature target for Circuit 2 (°C) |
number |
DHW Setpoint | Domestic hot water target temperature (°C) |
number |
Pool Setpoint | Pool water target temperature (°C) |
Setpoint min/max limits are read live from the device (the pump reports its own allowed ranges per heating/cooling mode).
- In HACS → Integrations → ⋮ → Custom repositories
- Add this repository URL, category Integration
- Install Hi-Mit II
- Restart Home Assistant
# From your HA config directory
git clone https://github.com/YOUR_USERNAME/HiMitII_HomeAssistant.git /tmp/himit
cp -r /tmp/himit/custom_components/himit config/custom_components/himitRestart Home Assistant.
- Settings → Integrations → Add Integration
- Search for Hi-Mit II
- Enter your Hisense / Hi-Mit II account email and password
- If your account has multiple homes, select the one with your heat pump
- Done — entities appear immediately and update every 30 seconds
The integration handles authentication automatically:
- The access token lives 24 h (
accessTokenExpiredTime=86400); the integration refreshes it 1 h before expiry using the stored refresh token - The cloud only accepts a refresh token shortly after recent auth activity (otherwise
errorCode 611702 "token非法"). When the refresh is rejected the integration logs in again with the stored credentials — the same fallback the official app uses. In practice this means one login per day. - If the access token is rejected mid-way (revoked, password changed) a re-login is attempted once; only if that fails does a Re-authenticate prompt appear in the Integrations page
- Logins are multi-session: a login from Home Assistant does not invalidate the mobile app's session (and vice versa)
- All tokens are stored in the Home Assistant config entry (
.storage/)
The cloud keeps answering with the last known state even when the heat pump's Wi-Fi module stops publishing. Every reading carries the device timeStamp; entities become unavailable when it is older than 45 minutes (STALE_AFTER_SECONDS in entity.py) and the "Ultimo dato dalla pompa" timestamp sensor shows when the pump last reported.
The pump reports every ~1 min while running but only a heartbeat every 30 min in standby, so do not lower the threshold below ~35 min or you will get false unavailable periods.
By default the integration polls every 30 seconds. If you need an immediate update there are two options:
Call the standard Home Assistant service on any of the integration's entities:
service: homeassistant.update_entity
target:
entity_id: sensor.hi_mit_ii_circuit_1_water_tempThis triggers coordinator.async_request_refresh() immediately.
A button platform can be added to expose a single Refresh button in the UI / dashboard:
class HimitRefreshButton(HimitEntity, ButtonEntity):
_attr_name = "Refresh"
_attr_icon = "mdi:refresh"
async def async_press(self) -> None:
await self.coordinator.async_request_refresh()Press it from a dashboard card or use it in an automation and data updates instantly.
This integration was built by reverse-engineering the official Hi-Mit II Android APK:
-
RSA request signing — every API request is signed using RSA-PKCS1v15 with a 2048-bit public key embedded in the APK (
assets/rsa_public_key.key). The server holds the private key and decrypts to verify. -
Password encoding — the login password is MD5-hashed (uppercase), then RSA-encrypted with a separate 512-bit key (
assets/rsa_account_public_key.key). -
Temperature field mapping — actual live temperatures come from
fixedDid16–19fields (not obvious names), confirmed by tracingdoSetCycle1Item/doSetCycle2IteminHeatPumpControllActivity.java:Field Description fixedDid18Circuit 1 actual water temp (tvTag333 in app UI) fixedDid19Circuit 2 actual water temp (tvTag444 in app UI) fixedDid16DHW actual water temp (tvTag111 in app UI) fixedDid17Pool actual water temp (tvTag222 in app UI) -
Control —
POST /himit-dshd/setDevicePropertywith apropertiesarray of{cmdType, cmdValue}pairs. The sign covers all scalar fields plus the JSON-stringified properties array.
All on https://hmt-eu-gateway.hijuconn.com:
| Method | Path | Purpose |
|---|---|---|
| POST | /account/acc/login_pwd |
Login (auth-gateway) |
| POST | /account/acc/refresh_token |
Refresh access token |
| GET | /himit-lgs/get_home_list |
List homes |
| GET | /himit-dms/get_customer_device_list_info |
List devices |
| POST | /himit-dshd/getDeviceProperty |
Full device state |
| POST | /himit-dshd/setDeviceProperty |
Send control commands |
custom_components/himit/
├── __init__.py # Integration setup / teardown
├── api.py # Async HTTP client (all crypto + API calls)
├── binary_sensor.py # Read-only status sensors (A2W running)
├── config_flow.py # UI login flow + home selection
├── const.py # All constants (keys, field names, endpoints)
├── coordinator.py # DataUpdateCoordinator — polling + token refresh
├── entity.py # Shared base entity class
├── manifest.json # HA integration manifest
├── number.py # Temperature setpoint controls
├── sensor.py # Temperature sensors
├── switch.py # On/off switches
└── translations/
└── en.json # Config flow UI strings
- Home Assistant 2024.1 or newer
- Python packages (installed automatically):
cryptography>=41.0.0,aiohttp>=3.9.0 - A valid Hisense / Hi-Mit II cloud account
This integration is not affiliated with or endorsed by Hisense. It was built by analysing the official mobile app for personal use. Use at your own risk.