feat(fw): integrate the Midea PortaSplit into Home Assistant #445
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!445
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lab/20261008-2355"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #444
What
ac.nix: installs the Midea Smart AC custom component (midea_ac, mill1000/midea-ac-py 2026.4.0 +msmart-ng2026.4.1). 2026.4.0 is the release that added PortaSplit support (Out Silent Mode, defrost and outdoor-fan sensors). It talks to the unit locally on TCP 6444.dnsmasq.nix: reserves10.42.100.194for the PortaSplit (60:7a:d8:8c:0d:90, shows up asnet_ac_0D90). That's the address it already holds, so nothing moves and the host saved in the integration stays valid.default.nix: exposes the HA nixpkgs pin to the container's modules aspkgs-with-home-assistant.No firewall change:
server→smartis already allowed, so the HA container can reach the unit.Why the component comes from the HA pin
HA is built from the pinned unstable nixpkgs, not the host channel. The HA package builds its
PYTHONPATHwithmakePythonPath, which keeps only Python packages whosepythonModuleis its own interpreter. A component from the host channel bringsmsmart-ngbuilt against 26.05'spython3.14, so it's silently dropped. Eval and the dry-build pass, but the integration fails at runtime. Withmidea_acfrom the pin,msmart-ngmakes it onto the service'sPYTHONPATH.epex_spotinelectricity.nixhas the same problem today: itsbeautifulsoup4requirement isn't on HA'sPYTHONPATH. Out of scope here, but possibly related to #222.Verification
home-assistantservice locally (PYTHONPATH,preStart,ExecStart).midea_acandmsmart-ngboth come from cache.nixos.org, and the HA binary is unchanged (homeassistant-2026.5.4, cached).PYTHONPATH:import msmart.deviceworks, and the manifest requirementmsmart-ng==2026.4.1is satisfied.fw: OK.After deploy (manual, one-time)
Settings → Devices & services → Add integration → Midea Smart AC → Discover devices, host
10.42.100.194, cloud region Europe. Discovery fetches the token/key from the Midea cloud once; after that it's fully local. Midea is retiring these token APIs, so save the token/key from the config entry somewhere safe. If the PortaSplit's power reading looks too low, switch the power format from BCD to Binary in the integration options.🤖 Generated with Claude Code