All topics

Home and Sensor Data

A server that is awake around the clock is also a sensor sitting in your house. NAS Reborn reads its own instruments and, on newer devices, your [Apple Home](https://www.apple.com/home-app/) accessories, keeps their history, and hands both to template sites as ordinary template values.

What the device itself measures

No accessories and no extra hardware are needed for these; the phone already has them. Turn the ones you want on from the sensor picker.

Apple Home accessories

The app can also read the accessories already in your Home: temperature and humidity sensors, contact and motion sensors, leak detectors, air quality, switches and their state. Pick them per room in the app, and each one becomes a value your pages can print.

This part needs iOS or iPadOS 16.2 or later. Apple retired the old Home architecture, and devices that stayed behind lost access to it entirely. An iPhone 6s-class server still runs everything else in this help, including its own sensors above, but cannot read Apple Home. Live video from a HomeKit camera is not available on any device; see Camera Feeds.

Reading them in a page

Accessories arrive as a home object and the device's own instruments as device.sensors:

{{ home.hallway.temperature }} °C in the hallway
{{ device.sensors.pressure }} hPa, {{ device.sensors.noise }} dB
{% for a in home.accessories %}{{ a.name }}{% endfor %}

A page re-renders when a value it printed actually moves, and a page that reads nothing stays fully cached, so a dashboard costs the device nothing while the house is quiet.

History and charts

Readings are recorded on the device: 48 hours minute by minute, then hourly figures going back around 400 days. A page reaches them through history on the accessory, with points for the recent window and hourly statistics for the long one, which is enough to draw a chart without any service outside the house.

{% assign series = home.hallway.history.temperature %}

The Sensor Dashboard example

The quickest start is the Content tab's Add example → Sensor Dashboard. Pick the accessories you want and it writes a working site: a tile per reading with meters and charts, a readings.json endpoint, and tiles that update themselves over a live stream rather than reloading the page. Everything it writes is ordinary template source you can edit.

Sensitive readings stay off the open web

Some readings say whether anyone is home: motion, occupancy, contact, locks, security state, the microphone's noise level, and the house's location. Temperature, humidity, air pressure, power, leaks and battery do not, and are treated as ordinary values.

A public folder whose pages read a sensitive value serves nothing until you turn on Serve sensitive data for that folder. Until then the page is replaced by a short refusal that names no accessory and no value. The refusal is also indistinguishable from the outside: a withheld reading records no trace, so nothing about the answer's size, its cache behaviour or its timestamp shifts with the value it is hiding.

The dashboard example is created protected for this reason, so it works for your household from the first minute and only faces the internet when you decide it should.

The microphone is measured only while a page that is actually being served reads the noise level, and it stands aside entirely while a camera feed with audio is streaming. Nothing listens speculatively. The recordings are never kept: what is stored is a number in dB, once a second, not audio.