Appearance
Presence, motion and door sensors
Four kinds of sensor answer "is anyone there?" and "did someone come through?" without anyone carrying a tag:
| Kind | Answers | Example models Omaya reads |
|---|---|---|
| PIR motion sensor | Did something warm move here just now? | MOKO S01P, Aqara Motion Sensor P1 (through Home Assistant) |
| Presence sensor (mmWave radar, often with a PIR) | Is someone here, even sitting still? | Aqara Presence MultiSensor FP300 (through Home Assistant), Milesight VS370 (LoRaWAN) |
| Door contact | Is this door open or closed? | the magnet sensor built into the MOKO S01P |
| Doorway people counter | How many people went in, and how many came out? | Minew MSR01-B |
None of them counts how many people are in a room. A PIR or presence sensor says yes or no. A doorway counter counts people crossing a line. For a headcount inside a room, use a radar. For a yes/no from a distance reading (a bed, a parking bay), see Distance sensors.
What each one gives you in Omaya
Every reading arrives as named fields. They are what the device's View panel shows under Latest reading (and All fields), and what a rule reads with Sensor reading (any field).
| Sensor | Fields | Where they end up |
|---|---|---|
| MOKO S01P | occupied (1 while the PIR sees motion, 0 otherwise), motion_detected (same, true/false), door_open (true while the magnet is away), pir_sensitivity, pir_delay, battery_mv, battery_percent | The zone's occupied / free state (Meeting Room app, rules), an hourly record for Space Utilisation, the Battery report |
| Aqara P1, FP300 (Home Assistant) | occupied; the FP300 also sends temperature, humidity, illuminance and battery_percent | As above; the FP300's climate readings also go to the Environment report (Environment sensors) |
| Milesight VS370 and other LoRaWAN motion sensors | occupied, from a field the sensor calls occupancy, presence, motion, pir or occupied | As above |
| Minew MSR01-B | entry and exit: the people who crossed in each direction since its last report | Reports → Enter / Exit, the Entry Count rule metric, door netting for a counted room or venue |
| Milesight EM300-MCS (LoRaWAN) | door_open (1 open, 0 closed), plus temperature, humidity, battery_percent | Rules (Sensor reading (any field)), the device's latest reading |
| Door or window contact through Home Assistant (Aqara, Sonoff and others) | door_open (1 open, 0 closed), from an entity Home Assistant classes as door, window, opening or garage door | Rules, the device's latest reading |
Every door contact, whatever the brand, reports the same field, door_open, so one rule pattern works for all of them.
How many, and where
| Space | What to fit | Where |
|---|---|---|
| Toilet (one per gender) | 1 PIR | Ceiling or high on the wall, looking at the area just inside the door. Not over a cubicle, and not seeing out through the door |
| Small meeting room or phone booth | 1 presence sensor (FP300) | On the wall facing the seats, at about seated head height to standing height; or a PIR on the ceiling over the table |
| Large meeting room | 1 presence sensor, or a radar if you need a headcount | Facing the table, covering every seat |
| Store room, plant room, a door you want watched | 1 S01P on the frame, magnet on the door | The magnet on the moving leaf, the sensor on the fixed frame, lined up when the door is shut |
| Entrance or a room's doorway | 1 MSR01-B per doorway | Ceiling, centred over the threshold |
| A space counted at every door | 1 MSR01-B on every way in and out, fire exits included | As above. See People counters and tags |
One sensor reports one zone. A PIR in a toilet with two separate rooms needs two PIRs, one per zone.
PIR motion sensor: MOKO S01P
The S01P is a battery Bluetooth beacon with a PIR and a magnet (hall) door sensor in one housing. MOKO quotes a detection range of about 5 m, 8 m or 12 m for its Low, Medium and High sensitivity settings.
Before you go to site
- Create the Location, the Venue (the floor) and the Zone (the room) the sensor is for, under Space, if they do not exist yet. See Setting up a site.
- Check that a gateway on that floor is registered and online (Device → Gateway). The S01P is heard by any gateway in range; it needs no gateway of its own.
Set it up on the bench
Do this before the sensor goes on the ceiling, with a phone held next to it. Once it is up, the same settings can be changed from Omaya instead — see Change its settings later.
- Unbox it and fit the batteries if they are not already in. Write the MAC address printed on the unit (or shown in the app) on your install sheet.
- Open MOKO's configuration app for the PIR sensor on your phone and connect to the unit.
- Set PIR delay to Low. MOKO gives Low ≈ 30 s, Medium ≈ 10 s, High ≈ 2 s: a higher level is a shorter time. Low holds the sensor at "motion" the longest, which keeps one visit from being several.
- Set PIR sensitivity to suit the room: Low (≈ 5 m) for a toilet or a small room, so movement in the corridor outside the door is not seen; Medium or High for a larger space.
- Leave the advertising settings at their defaults unless your Omaya operator asks otherwise.
Mount it
- Height and angle. Ceiling, or high on a wall (about 2–2.4 m is common practice for a PIR), looking at the part of the room people must walk through: just inside the door.
- PIRs see movement across their view better than towards them. Aim it so people walk across it, not straight at it.
- Keep it from seeing out. Not facing an open doorway, a window, or a glazed partition onto a corridor.
- Keep heat sources out of view. A hand dryer, a heater, a vent blowing warm air or direct sun can each look like a person.
- Door sensor (optional). Put the sensor on the fixed frame and the magnet on the door leaf, so they sit side by side when the door is closed.
door_openreads true while the magnet is away. - Fix it with the supplied tape or screws. Note the date: the battery forecast starts from it.
Register it in Omaya
Device → Sensor → Add Sensor, then fill the form from the top:
- Sensor Name: where it is, so a list makes sense, e.g. L2 Female Toilet PIR.
- MAC Address: the one on your install sheet.
- Active: leave on.
- Brand / Vendor: Moko Smart. Sensor Model: S01P PIR Presence. What This Device Provides shows the chips for the model; Sensor Type fills itself in as Sensor.
- Location, Venue, Zone: the room it is in. Set the zone yourself. The occupied state is written to the sensor's own zone and to nothing else; a sensor with no zone is decoded and then ignored. If you save it without a zone, Omaya copies the zone of the first gateway that hears it, which is the gateway's room, not necessarily this one.
- Advanced Settings (optional): Labels such as Toilets, so one rule can later cover every toilet.
- Save.
Check it works
- Open the sensor (View). Last seen should be seconds ago: the S01P broadcasts continuously.
- Placement shows the zone you chose.
- Walk under it. Within a few seconds Latest reading shows
occupied1 (andmotion_detectedtrue). Stand outside the room for longer than the delay and it returns to 0. - Sensor settings (S01 only) shows what the sensor says it is set to: PIR delay and PIR sensitivity. Set the values you want there; if the sensor later reports something else, Omaya raises a configuration alert on the Anomalies page until it is put right — from its Configure page (below) or with the app.
- Open and close the door: Door sensor (
door_open) changes. If it never changes, the magnet is not fitted or is too far from the sensor. - Next hour: Reports → Space Utilisation shows the zone with some use.
Change its settings later
No ladder needed. Open the sensor (View) and press Configure: you can change Motion sensitivity, how long it stays "occupied" after the last movement, how often it broadcasts, its signal strength, its broadcast name and beacon numbers, whether a long press switches it off, and its password. Omaya sends the change through a Dusun gateway that hears the sensor and has Accept commands switched on, then reads every value back to confirm it.
The sensor asks for a password first. Save one for your MOKO sensors under Device → Sensor settings → Passwords; until you do, Omaya uses MOKO's factory password. Replace it on the sensors once they are installed, because factory passwords are published. See Configuring devices from Omaya.
Presence sensor: Aqara FP300 and P1 (through Home Assistant)
These are Zigbee or Thread devices. They join your Home Assistant, and Omaya reads them from there. Aqara gives the FP300 a 120° field of view and a range of up to 6 m; it combines a PIR with a 60 GHz radar, so it keeps seeing someone who sits still. The P1 is a PIR only.
Set it up
- In the Aqara or Home Assistant app, pair the sensor with your hub and give it a name that says where it is.
- Mount it facing the area to watch. Aqara sells the FP300 for wall, corner or ceiling mounting; on a wall, aim it at head and upper-body height of the people you want to see. Keep it away from fans, curtains and other things that move.
- In Omaya, Connectors → Smart Home Bridge must be connected to your Home Assistant (Home Assistant URL, Long-Lived Access Token, Poll interval (seconds)).
- Open the bridge's Entity mappings page and press Fetch entities from Home Assistant.
- Under Suggested devices, use the group for this sensor, or tick its entities in Available Home Assistant entities and press Activate as device…. Give it a Device name and press Create device.
- Go to Device → Sensor, open the new device and Edit it: set Brand / Vendor Aqara and the Sensor Model, then Location, Venue and Zone, and Save. A Home Assistant hub fronts a whole building, so Omaya cannot guess the room: without a zone the readings are dropped and a configuration alert says so.
Check it works
Walk in front of it. The View panel's Latest reading shows occupied 1 after the next poll (the bridge's Poll interval). If it stays empty, check that the entity that was included is the occupancy or motion one.
Change its settings later
Whatever Home Assistant offers as a setting for the sensor — the FP300's hold time, for example — can be changed from the device's Configure page in Omaya. Omaya passes the change to Home Assistant and shows the new value once Home Assistant reports it. See Configuring devices from Omaya.
Doorway people counter: Minew MSR01-B
A 60 GHz radar that watches a doorway from above and counts the people who walk through it, in each direction. Minew gives it a 120° detection angle; it is ceiling-mounted and needs a wired 12 V DC supply (Minew allows 10–25 V).
Before you go to site
- Create the Zone on each side of the door if you will count a room (Space → Zone). For a street or lobby door, only the inside zone is needed.
- Arrange a 12 V DC supply at the ceiling above each doorway.
Set it up on the bench
- Power it from a 12 V supply on the bench.
- Open Minew's MinewLink app, connect to the unit, and check it is set to count crossings. Note its MAC address.
- Follow Minew's manual for the mounting height you will use: the counting area depends on it.
Mount it
- Over the threshold, centred on the door width, on the ceiling.
- See the whole width. A unit that sees two thirds of the doorway misses the third it cannot see, every time, and the error adds up.
- Nothing moving in view: a door that swings into the counting area, a fan, a hanging sign.
- Double doors: one unit covering both leaves, rather than two units that can both count the person who walks down the middle.
- Wire the 12 V supply.
entry goes up; if exit does, the unit is turned round. Register it in Omaya
Device → Sensor → Add Sensor:
- Sensor Name, e.g. L1 Main Entrance counter. MAC Address.
- Brand / Vendor Minew, Sensor Model MSR01-B.
- Location, Venue, Zone: where the door is. The Location is required for counting: a counter with no location has its crossings dropped, and nothing reaches the Enter / Exit report.
- Which side of the door is which (shown for counters only):
- First box, the room an ENTER puts someone into: the zone on the inside. Leave it as Not a counted doorway if you only want traffic figures.
- Second box, where they came from: leave Outside, or an uncounted area for a street or lobby door; pick the other room for a door between two counted rooms.
- Save.
Check it works
- Walk in through the door, then out. Latest reading on the View panel shows
entryandexitfor the report that included your walk. - If in shows as
exit, the unit is the other way round: turn it 180°, or swap the zones in Which side of the door is which. - Within the hour, Reports → Enter / Exit shows the crossings for the door.
- To net doors into a room or venue's occupancy, tick Every door of this room is counted (Space → Zone) or Every way in and out of this venue is counted (Space → Venue). Read People counters and tags first: every door, and a daily reset.
First rules
Build them on Rules → Add Rule with Sensor reading (any field); see Rules on any sensor reading.
| Goal | Watch | Condition | Recipe |
|---|---|---|---|
| Count toilet visits by gender | the toilet PIR | occupied Becomes 1, Repeat at most every a few minutes | Toilet visits by gender |
| Someone in a room after hours | the room's zone | occupied = 1, outside opening hours | Safety and security |
| A door left open | the S01P | door_open = 1, held for 10 minutes | Safety and security |
| Switch the lights off when a room empties | the room's zone | occupied = 0, held for 15 minutes | Energy |
| Rooms nobody uses | the zone | Space Utilisation over a week | Space and occupancy |
One visit, one count
A PIR goes back to 0 between movements, even with someone still in the room, and comes back to 1 when they move. An occupied Becomes 1 rule therefore fires several times in one long visit. Set Repeat at most every to a few minutes so one visit is counted once, and set the S01P's PIR delay to Low (the longest hold).
Questions and problems
The sensor shows Last seen, but no occupied state reaches the room. It has no zone, or a different zone from the one you are looking at. Edit it and set Zone.
A toilet reports visits all night. A heat source or a moving air flow is in the PIR's view: a hand dryer, a heater, a vent. Move or re-aim the sensor.
One visit counts as three. The PIR delay is short (High or Medium), or the rule has no repeat interval. Set how long it stays "occupied" to Low on the sensor's Configure page (or with the MOKO app), and Repeat at most every a few minutes on the rule. The Sensor settings card says what the sensor is set to now.
The PIR picks up people in the corridor. Sensitivity too high for the room, or it can see out through the door. Lower Motion sensitivity on the sensor's Configure page, or re-aim it.
door_open never changes. No magnet, or the magnet too far from the sensor when the door is shut. Line them up.
The MSR01-B counts nothing. Check Location on the device: without one nothing is recorded. Then check the 12 V supply and that Last seen is recent.
The Enter / Exit report shows far more out than in. There is a way in with no counter on it, or the unit is turned round. See People counters and tags.
The FP300 says the room is empty with people in it. Sitting people are easiest to see at head and upper-body height; a unit mounted too high or too low, or more than a few metres away, can lose them. Move it closer or lower.