prefixkit Ask an engineerAsk Support RU

Zigbee devices Motion and presence sensors

Merrytek MSA201Z

24 GHz human presence sensor. Works with Zigbee2MQTT with no vendor hub or cloud: it pairs with a Zigbee stick and shows up in Home Assistant.

Vendor
Merrytek
Model
MSA201Z
Type
Motion and presence sensors
Power
mains: usually a router that extends the mesh
Firmware updates (OTA)
no

Find it in shops: AliExpress

Links open a search in the shop; some are affiliate links: buying through them costs you nothing extra and supports this site. We do not sell devices or get them from manufacturers.

What it exposes

FeaturePropertyValuesControl
On / offstateabsence, presence, disabledread only
Presencepresence—read only
Current statuscurrent_statusapproaching, departing, clearread only
Illuminanceilluminancelxread only
Hold delay timehold_delay_times · 0…300settable
Sensitivitysensitivitylow, medium, highsettable
Trigger distancetrigger_distancem · 0.5…4settable
Forbidden areaforbidden_aream · 0…1.8settable
AI environment self-learningai_self_learningAI self-learningsettable
Fast settingfast_settingsmall, medium, largesettable
LED indicatorindicator—settable
Sensor modesensor_modepresence, motionsettable
Single modesingle_mode—settable
Absence circling reportabsence_circling_report—settable
Absence circling intervalabsence_circling_intervalmin · 2…30settable
Find devicefind_device—settable
Enable sensorenable_sensor—settable
Factory resetfactory_resetfactory resetsettable
Lux modelux_modethreshold, reportsettable
Daylight thresholddaylight_thresholdlux · 1…3000settable
Lux report modelux_report_modetimed, differencesettable
Lux timed intervallux_timed_intervals · 5…3600settable
Lux difference thresholdlux_difference_thresholdlux · 1…2000settable
Lux difference valuelux_difference_value—read only
Interference positionsinterference_positions—read only
Home environmenthome_environmentnormal, slight, strong, severeread only

MQTT: state and commands

Zigbee2MQTT publishes the device state to zigbee2mqtt/my_device (my_device is the name you give the device). An example message:

{
  "state": "absence",
  "presence": false,
  "current_status": "approaching",
  "illuminance": 120,
  "hold_delay_time": 150,
  "sensitivity": "low",
  "trigger_distance": 2,
  "forbidden_area": 1,
  "ai_self_learning": "AI self-learning",
  "fast_setting": "small",
  "indicator": false,
  "sensor_mode": "presence",
  "single_mode": false,
  "absence_circling_report": false,
  "linkquality": 120
}

Send commands to zigbee2mqtt/my_device/set:

mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"sensitivity":"medium"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"fast_setting":"medium"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"indicator":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"sensor_mode":"motion"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"single_mode":true}'

Watch the topics live from the browser: MQTT client.

Home Assistant automation example

Zigbee2MQTT creates Home Assistant entities from the device name. If it is called my_device, an automation in automations.yaml can look like this:

- alias: "Light on motion"
  mode: single
  triggers:
    - trigger: state
      entity_id: binary_sensor.my_device_presence
      to: "on"
  conditions:
    - condition: sun
      after: sunset
  actions:
    - action: light.turn_on
      target:
        entity_id: light.hallway

Check the YAML: YAML checker.

How to pair it

  1. In Zigbee2MQTT click Permit join.
  2. Put the device in pairing mode: usually a long press of the reset button (5–10 s) until the LED blinks; bulbs: switch the power off and on 5–6 times.
  3. Keep the device close to the coordinator or a router while pairing.
  4. Give it a clear name: MQTT topics and Home Assistant entities are built from it.

Exact procedure and model notes: the device page in the Zigbee2MQTT docs. No coordinator yet: coordinator picker.

Similar devices

Idea?