主权项 |
1. A method performed by data processing apparatuses, the method comprising:
determining, by a computing device, that a mattress is unoccupied; receiving, from a mattress pump and at a computing device, a stream of pump pressure readings, the pump pressure readings recording the air pressure of the mattress; identifying, by the computing device, an increase in pump pressure readings within a time window; after identifying the increase in pump pressure readings within the time window and for each received pump pressure readings, until the computing device determines that a difference is significant compared to a threshold value:
calculating, by the computing device, a trailing average pressure that represents the average of the N most recent pump pressure readings in the stream of pump pressure readings; anddetermining, by the computing device, the difference between the received pump pressure reading and the trailing average pressure; and responsive to the computing device determining that the difference is significant compared to the threshold value, performing one of the group consisting of: issuing a presence event, storing a value in computer readable memory, and engaging a peripheral device. |