SleepRadar: Aqara FP2 sleep vitals (heart rate, breathing rate, sleep stage) as Home Assistant MQTT sensors

I’ve had an Aqara FP2 running in Sleep Monitor mode for about a year in the bedroom. Its sleep data (heart rate, breathing rate, body movement, sleep stage) lives in Aqara’s cloud and doesn’t reach Home Assistant through the local integration path, which gives you your presence information.

SleepRadar is a small Home Assistant app (HA OS/Supervised) hat brings those sleep readings in as MQTT discovery sensors, and ships with a one-file Lovelace card that shows the live reading.

Credit first: sdavides’ AqaraPOST covers similar ground with Node-RED or REST setups, and Darkdragon14’s ha-aqara-devices is a HACS integration backed by a RocketMQ bridge and capabilities for more products. Both work. SleepRadar is the narrow take: one app focused on the FP2’s sleep data, card included.

You need:

  • Home Assistant OS or Supervised with support for apps
  • An MQTT broker (I run it with Mosquitto)
  • An FP2 in Sleep Monitor mode
  • Your Aqara Home app login and the FP2’s subject_id (both from the smartphone app)

What I do with it (example YAML ships in the repo):

  • cap bedroom lights at lower brightness, if someone is asleep for more than 5 minutes, and use it as a trigger for sleep light control via Magic Areas integration.
  • control the vacuum cleaner when someone is asleep
  • lower the thermostat when deep sleep starts

What SleepRadar is not: local-only or medical-grade. It polls Aqara’s private, undocumented app API, which Aqara can change or block anytime. But the history already recorded in HA stays yours. Heart rate and breathing are measured by the FP2 sensor and have been reliable for me. Sleep stage is calculated by Aqara; I treat it as a signal but not as definitive.

Repo: https://github.com/florianhorner/ha-fp2-sleep

Questions welcome.

The first FAQ reply below covers the usual questions (local-only, regions, accuracy) as a convenient snapshot. For install steps and the full FAQ, the GitHub README is the canonical, up-to-date documentation.

2026-07-05: removed typos, tightened terminology (add-on -> apps), tightened text, added note on canonical readme

A few answers to the questions I’d ask myself:

Is this local-only? No. It polls the same private cloud API the Aqara Home app uses. If that API goes away, the sensors stop updating; whatever HA already recorded stays yours.

Will it break someday? Possibly. It’s Aqara’s undocumented app API, so this works until Aqara changes it. When that happens I’ll do my best to fix it, but I can’t promise a private API stays open.

Which HA installs can run it? HA OS and Supervised (anything with app (add-on) support). Container/Core can’t run dont run App The poller is a single Python script, so adapting it standalone is possible, just not a path Isupport.

Do I need Node-RED, Docker, or an Aqara developer account? No. The app (add-on) is the whole thing: Aqara app login, subject_id, MQTT broker.

Where do I find the subject_id? Aqara Home app, under the FP2’s device info. Treat it as semi-private and redact it in logs and issues
(lumi1.xxxxxxxxxxxx).

Does it interfere with HomeKit? No. It only reads Aqara’s cloud API. An existing HomeKit pairing stays exactly as it is.

How accurate is it? Heart rate and breathing are measured by the sensor and have matched reality well for me. The sleep stage (awake/REM/light/deep) is Aqara’s algorithm and is the weakest part; I read about users report being marked awake while asleep. Pair stage triggers with a time window.

What does the card show when nobody’s in bed? A “not measuring” state. The FP2 retains its last in-bed heart-rate and breathing values, and the card hides those instead of presenting them as live. Same when data goes stale: freshness is labeled in the header.

The card says “no data yet” but the add-on is running? Open Developer Tools > States and check what your sensors are actually called. Home Assistant pins an entity’s id when it first creates it and never renames it afterward, so sensors created under other ids (or renamed by you) need
the card’s entities: override. The card’s no-data message walks you through it.

Can it give me a nightly summary or a sleep score? No. The card shows the live reading. The “last night” image in the README is a mockup of what I may add in the future but I didn't want to hold the sensor capabilities back until then. The mockup is labeled as such. The raw sensors plus Recorder let you build your own meanwhile.

Which Aqara regions work? CN, EU, USA, RU, KR. Set aqara_area to match your account’s region. EU (Germany endpoint) is the default.

Is my Aqara password safe? It stays in the add-on options managed by Supervisor. The appid/appkey constants in the source are public Aqara app constants, not your credentials.

License? MIT. Issues and PRs welcome.

Add-ons no longer exist and building new Apps and using the words and links to the old way in the readme is very confusing for users wanting to try your stuff...

For instance, this don't work:

  1. In Home Assistant go to Settings → Add-ons → Add-on Store.

It would be good to proofread what you repost from other sources to make sure things are right. I hope the code itself doesn't have the same kind of problems.

This is the way. Thank you for flagging the documentation issue and the drifting terminology.

I updated the repo to reflect the current path, Settings -> Apps -> Install app. And also cleaned up the terminology more broadly. I added My Home Assistant redirect links, so the docs are less dependent on UI labels that may get renamed again. Happy to credit you on GitHub for catching the docs drift, too.

On code quality: I take that seriously, too. The repo runs CI on every PR/push with YAML linting, package validation, and the SleepRadar card regression test. PR #20 (the doc changes) is merged with green CI. One reason I keep the project open source is exactly so the implementation can be checked, challenged, and improved in public. Concrete code issues are very welcome as issues or PRs.