# Net Zero Air (`sciguy/psychrometrics`) Actor

Compare indoor and outdoor air. Ventilate when the outside holds less heat and less water.

- **URL**: https://apify.com/sciguy/psychrometrics.md
- **Developed by:** [Josh Berry](https://apify.com/sciguy) (community)
- **Categories:** Automation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 air calculations

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Net Zero Air do?

**Net Zero Air** tells you whether outdoor air should come in. Send an indoor reading and an outdoor reading. You get the water the air is holding, the enthalpy it carries, and a call: **ventilate**, **hold**, or a named tradeoff.

Try it from the **Input** tab or POST JSON to `/compare`. On Apify you get a stable API URL, scheduling, monitoring, and pay-per-calculation billing — you pay when you ask, not while the Actor sits idle.

### Why use Net Zero Air?

A thermostat only sees temperature. Two rooms at the same dry-bulb can carry very different amounts of water, and the heat that rides with that water is what a cooling coil actually pays for. **Net Zero Air** turns the sensors you already have into one decision: open to outdoor air, or keep it to the minimum the space needs for air quality.

- **Ventilate when outdoor air is the cheaper air.** The default call opens outdoor air only when it carries less heat and does not hold more water.
- **Name the trade when the two disagree.** Cooler air that is wetter is a cooling tradeoff. Drier air that is hotter is a drying tradeoff. Set `intent` to `cooling` or `drying` if you want that trade to count as ventilate.
- **One POST instead of a psychrometric chart.** Controllers, dashboards, and scripts send both readings and get a call back. No-code users fill the Input tab and run.
- **Metric or imperial, same field names.** `units: "metric"` is °C, hPa, mL of water per m³, and kJ/kg. `units: "imperial"` is °F, inHg, US fl oz per 1,000 ft³, grains/lb, and Btu/lb.
- **The same air sample, the other questions.** `/state` is one reading. `/comfort` is an occupied-zone vote. `/adaptive` is for a window-ventilated room. `/stress` is outdoor heat.

### How to use Net Zero Air

1. Open this Actor on Apify.
2. On the **Input** tab, set indoor and outdoor dry-bulb and relative humidity, plus station pressure or elevation.
3. Click **Start** — or POST the same JSON to `/compare` on the Standby URL.
4. Read **`recommendation`**. `ventilate` means bring outdoor air in. `hold` means keep outdoor air at the minimum needed for air quality.

API example:

```bash
curl -X POST "https://sciguy--psychrometrics.apify.actor/compare" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "content-type: application/json" \
  -d '{
    "units": "metric",
    "intent": "both",
    "pressure": 1013.25,
    "indoor": {"dry_bulb": 24, "relative_humidity": 50},
    "outdoor": {"dry_bulb": 18, "relative_humidity": 40}
  }'
```

A classic run writes the same result to the default dataset. Point a thermostat, an energy dashboard, or a morning check at it.

Deltas are outdoor minus indoor. A negative `delta_enthalpy` means outdoor air carries less heat. A negative `delta_water_volume` means it holds less water.

### Input

`/compare` needs `units` and two readings. Each reading needs `dry_bulb` and either `relative_humidity` or `humidity_ratio`. Both readings share `pressure` (hPa or inHg) or `elevation` (m or ft). Flat Console fields (`indoor_dry_bulb`, `outdoor_relative_humidity`, …) are the same request.

Optional: `intent` (`both` default, `cooling`, `drying`), `pressure_type` (`absolute` default, or `sea_level` with elevation), `enthalpy_margin` (default **0.5 kJ/kg**), `water_margin` (default **0**).

`/state` is one reading: `dry_bulb`, moisture, and pressure or elevation.

`/comfort` needs `dry_bulb`, `relative_humidity`, `metabolic_rate` (met), and `clothing` (clo). Mean radiant defaults to dry-bulb. Air speed defaults to **0.1 m/s** (ft/min if imperial).

`/adaptive` needs `dry_bulb` and `prevailing_outdoor` (the running mean outdoor temperature). Same radiant and air-speed defaults.

`/stress` needs `dry_bulb` and `relative_humidity`. Wind defaults to **1 m/s at 10 m** (mph if imperial). Mean radiant defaults to dry-bulb.

### Output

You can download the dataset in JSON, HTML, CSV, or Excel. A typical comparison:

```json
{
  "units": "metric",
  "intent": "both",
  "recommendation": "ventilate",
  "reasons": [
    "Outdoor air carries less heat.",
    "Outdoor air holds less water.",
    "Bring outdoor air in."
  ],
  "indoor_water_volume": 10.88,
  "outdoor_water_volume": 6.15,
  "indoor_enthalpy": 47.76,
  "outdoor_enthalpy": 31.02,
  "delta_water_volume": -4.73,
  "delta_enthalpy": -16.74,
  "assumptions": ["unit system metric", "absolute pressure"]
}
```

`water_volume` is millilitres of liquid water per cubic metre of air when `units` is `metric`, and US fluid ounces per 1,000 cubic feet when `imperial`. `enthalpy` is kJ per kg of dry air, or Btu per lb. Each reading also includes wet-bulb, dew point, humidity ratio, vapor pressure, and an `si` object that stays in SI.

### Data table

| Field | Meaning |
| --- | --- |
| `recommendation` | `ventilate`, `hold`, `cooling_tradeoff`, or `drying_tradeoff` |
| `intent` | The rule that produced the call |
| `indoor_water_volume` / `outdoor_water_volume` | Water the air is holding |
| `indoor_enthalpy` / `outdoor_enthalpy` | Heat the air is carrying |
| `delta_water_volume` / `delta_enthalpy` | Outdoor minus indoor |
| `reasons` | The heat line, the water line, and the action |
| `si` | The same reading in SI, on `/state` and inside each side of `/compare` |

`/comfort` returns `pmv`, `ppd`, and `sensation` (ISO 7730). `/adaptive` returns `comfort_temperature`, the 80% and 90% bands, and whether the room sits inside them (ASHRAE 55). `/stress` returns `heat_index` (Rothfusz, from 27 °C upward, otherwise null), `humidex` on its native scale, and `utci` with `stress_category`.

### Pricing / Cost estimation

How much does it cost to know when to open? **$5.00 USD per 1,000 successful calculations** — **$0.005** each time `/compare`, `/state`, `/comfort`, `/adaptive`, `/stress`, or a Console run returns a result. You are **not billed while the API sits idle**. A house checking once an hour is about twelve cents a day.

There is no crawl and no long run: each request is a short CPU answer. Set a schedule and only pay when you actually ask.

### Tips or Advanced options

- Compare **enthalpy**, not dry-bulb alone. Outdoor air can be cooler and still carry more heat when it is holding a lot of water.
- Send **station pressure** or **elevation**. At elevation the same relative humidity is more water per kilogram of dry air.
- If the weather report is **sea-level pressure**, set `pressure_type` to `sea_level` and include `elevation`.
- `humidity_ratio` is grains per pound in imperial and kg water per kg dry air in metric. Send it when the sensor already reports absolute moisture.
- The enthalpy margin exists so a 0.1 kJ/kg flicker does not open a damper. Set `enthalpy_margin` to 0 if you want any decrease to count.
- `/adaptive` is the check for a room that is allowed to open its windows. `/compare` is the check for whether the outdoor air itself is worth bringing in.

### FAQ, disclaimers, and support

**Net Zero Air** estimates water, enthalpy, a comfort vote, and a ventilation call from the readings you send. It is not a controls design and it does not replace the minimum outdoor air a code or an air-quality sensor requires. `hold` means “do not increase outdoor air for energy or moisture,” not “seal the building.”

Using the Actor to drive dampers or windows is your responsibility.

Questions and feature requests: use the Actor **Issues** tab. A private deployment or extra indexes are available as a custom solution.

# Actor input Schema

## `units` (type: `string`):

Unit system for every quantity in this request and in the response.

## `intent` (type: `string`):

both opens outdoor air only when it is lighter and not wetter. cooling accepts extra moisture if enthalpy is lower. drying accepts extra heat if the outdoor air holds less water.

## `indoor_dry_bulb` (type: `number`):

Indoor air temperature. °C if metric, °F if imperial.

## `indoor_relative_humidity` (type: `number`):

Indoor relative humidity (%). Omit if you send indoor_humidity_ratio instead.

## `indoor_humidity_ratio` (type: `number`):

Indoor humidity ratio. kg/kg if metric, grains/lb if imperial. Use this or indoor relative humidity.

## `outdoor_dry_bulb` (type: `number`):

Outdoor air temperature. °C if metric, °F if imperial.

## `outdoor_relative_humidity` (type: `number`):

Outdoor relative humidity (%).

## `outdoor_humidity_ratio` (type: `number`):

Outdoor humidity ratio. kg/kg if metric, grains/lb if imperial.

## `pressure` (type: `number`):

Station pressure shared by both readings. hPa if metric, inHg if imperial. Provide this or elevation.

## `pressure_type` (type: `string`):

absolute is station pressure. sea_level is reduced to station pressure with elevation.

## `elevation` (type: `number`):

Site elevation. m if metric, ft if imperial. Used alone to estimate pressure, or with sea-level pressure.

## `enthalpy_margin` (type: `number`):

Outdoor enthalpy must be lower than indoor by this much before it counts. kJ/kg if metric, Btu/lb if imperial. Default 0.5 kJ/kg.

## `water_margin` (type: `number`):

Extra outdoor water ignored before a reading counts as wetter. mL/m³ if metric, fl oz per 1,000 ft³ if imperial. Default 0.

## Actor input object example

```json
{
  "units": "metric",
  "intent": "both",
  "indoor_dry_bulb": 24,
  "indoor_relative_humidity": 50,
  "outdoor_dry_bulb": 18,
  "outdoor_relative_humidity": 40,
  "pressure": 1013.25,
  "pressure_type": "absolute"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "indoor_dry_bulb": 24,
    "indoor_relative_humidity": 50,
    "outdoor_dry_bulb": 18,
    "outdoor_relative_humidity": 40,
    "pressure": 1013.25
};

// Run the Actor and wait for it to finish
const run = await client.actor("sciguy/psychrometrics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "indoor_dry_bulb": 24,
    "indoor_relative_humidity": 50,
    "outdoor_dry_bulb": 18,
    "outdoor_relative_humidity": 40,
    "pressure": 1013.25,
}

# Run the Actor and wait for it to finish
run = client.actor("sciguy/psychrometrics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "indoor_dry_bulb": 24,
  "indoor_relative_humidity": 50,
  "outdoor_dry_bulb": 18,
  "outdoor_relative_humidity": 40,
  "pressure": 1013.25
}' |
apify call sciguy/psychrometrics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sciguy/psychrometrics"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/EusyeHik2hqeHnaPT/builds/KyZ87XqRZFBIWPGdc/openapi.json
