Skip to content

Repository files navigation

MyZone

A small, self-hosted watchdog for Advantage Air MyAir/MyPlace ducted air conditioning zones.

MyPlace lets anyone in the house change a zone's airflow percentage or turn it on/off from their phone, which is convenient but not always desirable. This tool acts as an admin-style lock: it polls your MyPlace tablet's local API on a schedule and automatically reverts any configured zone back to the percentage and on/off state you've set, so it stays put regardless of who else touches the app.

Runs continuously as a Docker container, with no cloud dependency. Everything happens over your local network.

How it works

The MyPlace tablet exposes an unauthenticated local HTTP API on your LAN (on the tablet itself, not in the cloud). This app polls that API every few seconds, compares each configured zone's current state to your desired state, and corrects any drift.

Requirements

  • A MyAir/MyPlace-controlled ducted system, with the tablet reachable on your LAN.
  • Docker and Docker Compose.

Setup

  1. Find your MyPlace tablet's IP address: on the tablet, go to Wifi Settings > Advanced. Consider giving it a static DHCP reservation on your router so it doesn't change.

  2. Clone this repo and copy the example env file:

    git clone https://github.com/xDeeKay/myzone.git
    cd myzone
    cp .env.example .env
  3. Edit .env and set TABLET_IP to your tablet's address.

  4. Build and start:

    docker compose up -d --build
  5. Check the logs to confirm it's running:

    docker compose logs -f

    You should see Watching /config/zones.json for locked zone definitions... and Config HTTP endpoint listening on :8099 (GET/POST /zones).

Configuring locked zones

Zone locks live in a config file inside the container's persistent volume, editable two ways.

Via the built-in HTTP endpoint (recommended)

# View current config
curl http://<host-ip>:8099/zones

# Replace it
curl -X POST http://<host-ip>:8099/zones \
  -d '{"poll_seconds":5,"zones":{"Living Room":{"on":true,"percent":50},"Study":{"on":false}}}'

On Windows PowerShell:

Invoke-WebRequest -Uri http://<host-ip>:8099/zones -UseBasicParsing
Invoke-RestMethod -Uri http://<host-ip>:8099/zones -Method Post -Body '{"poll_seconds":5,"zones":{"Living Room":{"on":true,"percent":50}}}'

Changes are picked up automatically within one poll cycle, so no restart is needed.

Config format

{
  "poll_seconds": 5,
  "zones": {
    "Living Room": {"on": true, "percent": 50},
    "Study": {"on": false}
  }
}
  • poll_seconds: how often, in seconds, to check and correct zone state.
  • Per zone:
    • on (bool, optional, default true): enforces whether the zone is open or closed.
    • percent (int, optional): enforces airflow percentage. Only applies to percentage-controlled zones; ignored, with a log warning, on temperature-controlled zones. Omit to only manage on/off state.
  • Zone names must exactly match the names shown in the MyPlace app (case-sensitive). A name that doesn't match logs a warning rather than failing.
  • Zones not listed in the config are left alone entirely.

Editing the file directly (alternative)

If you'd rather not use the HTTP endpoint:

docker exec -it myzone sh
echo '{"poll_seconds":5,"zones":{"Living Room":{"on":true,"percent":50}}}' > /config/zones.json

Configuration reference (.env)

Variable Default Description
TABLET_IP (required) LAN IP of your MyPlace tablet
TABLET_PORT 2025 Port the tablet's local API listens on
POLL_SECONDS 5 Fallback poll interval if not set in zones.json
CONFIG_HTTP_PORT 8099 Port this app's own config endpoint listens on
MYZONE_TOKEN (unset) Optional. If set, required as X-MyZone-Token header on all /zones requests

Security note

By default, the /zones HTTP endpoint has no authentication. Anyone who can reach the configured port on your network can view or change your zone locks. This is fine on a trusted home LAN, but if you'd rather not leave it open, set an access token:

  1. Generate one:
    openssl rand -hex 32
  2. Add it to .env:
    MYZONE_TOKEN=<the generated value>
    
  3. Restart the container. All requests to /zones now require an X-MyZone-Token header matching that value:
    curl http://<host-ip>:8099/zones -H "X-MyZone-Token: <the generated value>"
    On PowerShell:
    Invoke-WebRequest -Uri http://<host-ip>:8099/zones -Headers @{"X-MyZone-Token"="<the generated value>"} -UseBasicParsing

Requests without a valid token get a 401. Leave MYZONE_TOKEN blank to keep the endpoint open.

Even with a token set, this still isn't meant to be exposed to the internet or an untrusted network; it's a basic access guard for a home LAN, not a hardened auth system.

License

MIT, see LICENSE.

About

Self-hosted admin lock for Advantage Air MyAir/MyPlace zones. Automatically reverts airflow percentage and on/off state to your configured values, keeping zones locked in place.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages