Skip to main content

Settings reference

The hub is configured in the browser: the setup wizard on a first start, then the Settings pages. There is no file to edit. This page is the reference behind those screens: where each value is stored, every field with its default, and the few things that still come from the command line or the environment. The structs are in crates/nidoo/src/config.rs and the sections in crates/nidoo/src/setup/sections.rs.

Other pages write a field as [topics] ui_prefix or watchdog.acl.enabled. That is the field ui_prefix of topics, or acl.enabled of watchdog, inside the advanced section below.

Where settings live​

Two places, split by what the hub needs before it can reach anything:

WhereWhat it holds
data/hub.jsonThe bootstrap settings: the MQTT connection, the database URL, the home location, the HTTP bind address, the log level, the wizard's progress and a "setup finished" flag. The hub writes it, one wizard step at a time, with mode 0600. You do not edit it, except for the rare field with no screen (below).
The settings table in the databaseEverything else, one JSON row per section: weather, solcast, frigate, push, climate, advanced, mobile, backup and system. Secrets are stored in the same rows.
data/settings-cache.jsonA copy of the settings the hub last read, mode 0600. If the database is down when the hub starts, it starts from this copy with a warning, so the house keeps running.
data/bundled.jsonWritten by the compose init service (nidoo init-bundled): the credentials of the Mosquitto and TimescaleDB that come with Nidoo, mqtt_user, mqtt_password, db_user, db_password and db_name, plus the phone app's broker login app_mqtt_user and app_mqtt_password (missing in a file written before it existed), mode 0600. The wizard reads it to pre-fill the MQTT and Database steps; the phone setup code reads the app login (see Mobile).

data/backup-last.json holds the record of the last backup (see Backup). After a restore from a backup that held Zigbee2MQTT data, data/zigbee2mqtt-restored.zip (mode 0600) holds that data until it is deleted in Settings → Backup.

The documents the hub keeps on the broker (home settings, alarm, climate schedules, flows, groups, dashboards, ambiances) are not part of this: they are edited on their own screens and routes.

You read and change the section rows with Settings, with GET/PUT /api/v1/settings/{section} (HTTP API) or with the get_settings and set_settings MCP tools (MCP tools). A change is checked the way the hub checks its settings at start, then saved, and the hub restarts to apply it. The exceptions are mobile and backup, which are stored without a restart, and the system section's sensor supervisor fields (see System). A value it could not start with is refused with the reason, and nothing is saved.

The folder is ./data by default. nidoo --data <dir> (or NIDOO_DATA_DIR) picks another one; in the Docker image it is /data, mounted from ./data.

Secrets​

A secret is write-only. A read shows {"set": true} or {"set": false}, never the value. A write sets it with a string, clears it with null, and keeps it when the field is absent, "" or sent back as {"set": true}. So a form that posts an empty password field never wipes the stored one.

  • Changing the address a secret goes to (the MQTT or database host and port, the Frigate address) needs the secret sent again. Otherwise anyone on the LAN could point the hub at their own machine and collect the stored password.
  • The secrets are the MQTT and database passwords, the Solcast API key, the Frigate password and the Firebase service-account key. No log line, error or API reply carries one; a URL that holds a password is masked when logged.
  • A login written inside a Frigate address is refused (use the user and password fields).

See Security for what is and is not protected.

Bootstrap settings (hub.json)​

The location, the database and the MQTT connection have a screen in the wizard and in Settings. The HTTP and log settings do not: set them with the NIDOO_* variables below, or in hub.json while the hub is stopped.

Home location​

Settings → Location, or the first wizard step. It replaces the old [flows] and [weather] city fields.

FieldDefaultDescription
citynoneThe place's name. Required.
countrynoneOptional ISO 3166-1 alpha-2 code such as FR, exactly two letters (stored in upper case).
latitudenoneDegrees, north positive, -90 to 90.
longitudenoneDegrees, east positive, -180 to 180.
timezonenoneIANA zone name (Europe/Paris). trigger.schedule runs in it.

The wizard looks the city up and fills the rest, which you can correct. Sun nodes, is_dark, the solar forecast and the weather all use these coordinates. With no location, sun nodes and is_dark use Paris (48.8566, 2.3522), saving a flow that reads the sun reports a warning, and schedules run in the system's zone (UTC if it cannot be read; an unknown zone falls back to UTC with a warning). See Flow nodes.

Database and broker​

Settings → Database and Settings → Broker (the MQTT connection).

FieldDefaultDescription
mqtt.host"localhost"Broker host name or address.
mqtt.port1883Broker port.
mqtt.usernoneBroker user. A password needs a user.
mqtt.passwordnoneBroker password (a secret).
mqtt.client_id"nidoo"MQTT client id and session key. Two hubs on one broker must not share one: the broker would bounce them off each other and hand one the other's session.
z2m_base"zigbee2mqtt"Zigbee2MQTT base topic; the hub reads <z2m_base>/bridge/devices, /info and /state. Under Advanced in the wizard.
database_urlnoneThe Postgres URL, built from the Database page's host, port (5432 for the bundled one), database, user and password. TimescaleDB 2.17+ on Postgres 17 with the timescaledb extension. Without it the hub stays in setup mode.

The hub keeps a persistent MQTT session under client_id, so a write queued just before a connection blip is retransmitted on reconnect.

Two more MQTT fields have no screen. Set them in the mqtt object of data/hub.json while the hub is stopped, or with the environment variables below.

FieldDefaultDescription
mqtt.send_ha_birthfalseWhen true, publish online (not retained) on ha_status_topic each time the hub connects, so bridges re-publish their discovery.
mqtt.ha_status_topic"homeassistant/status"Topic of the birth message.

HTTP and log​

No screen. Set with NIDOO_HTTP__BIND, NIDOO_LOG__LEVEL and NIDOO_LOG__JSON, or in the http and log objects of data/hub.json while the hub is stopped.

FieldDefaultDescription
http.bind"0.0.0.0:8081"Address the HTTP server listens on: the HTTP API, the WebSocket, the MCP server and the web UI share it. 8081 sits next to Jeedom on 80 and clear of Zigbee2MQTT on 8080 on the same server. The Docker image keeps this default; change it with NIDOO_HTTP__BIND in .env.
log.level"info"A tracing filter: a level (debug) or a directive list (nidoo=debug,rumqttc=warn). RUST_LOG wins when it is set and valid; if it is unset or invalid, log.level applies, and if that is invalid too, the level is info.
log.jsonfalsetrue writes JSON lines; otherwise a human-readable format. Logs go to stderr.

Environment variables and flags​

NIDOO_* variables override the bootstrap values only: the MQTT connection, the database URL, the HTTP bind address and the log settings. They are the only way to set them without the wizard, so an unattended install can script them. They win over hub.json at every start.

VariableOverrides
NIDOO_MQTT__HOST, NIDOO_MQTT__PORT, NIDOO_MQTT__USER, NIDOO_MQTT__PASSWORD, NIDOO_MQTT__CLIENT_ID, NIDOO_MQTT__SEND_HA_BIRTH, NIDOO_MQTT__HA_STATUS_TOPICmqtt.*. Setting any one of them makes the MQTT connection complete from the environment.
NIDOO_HISTORY__URLdatabase_url.
NIDOO_HTTP__BINDhttp.bind.
NIDOO_LOG__LEVEL, NIDOO_LOG__JSONlog.level, log.json.
NIDOO_DATA_DIRThe data folder, like --data.
RUST_LOGThe log level, ahead of log.level.

Two underscores separate the levels, and the names are upper case. String values keep the raw text of the variable, so NIDOO_MQTT__PASSWORD=007 stays "007" and is not read as a number; numbers and booleans are parsed. In Docker, put them in a git-ignored .env next to compose.yml. Variables for any other section (NIDOO_WEATHER__ENABLED and the like) are ignored: those settings live in the database.

Command line:

nidoo or nidoo runRun the hub.
nidoo mcp-stdio --server <url>Serve MCP over stdio, proxying to a running hub (for example http://localhost:8081). It reads the log level from data/hub.json when that exists.
nidoo init-bundledCreate the bundled broker and database credentials, the app's broker login and the broker ACL in data/, and exit. The compose init service runs it. Once data/bundled.json exists it only adds the app login and the ACL to an install that lacks them (reload the broker afterwards: docker compose kill -s HUP mosquitto), and otherwise changes nothing.
--data <dir>The data folder (default ./data, or NIDOO_DATA_DIR). Works with every command.

Weather​

Settings → Weather. Outdoor weather from Open-Meteo, a free service with no API key. Off by default: while enabled is false the hub makes no request at all. See Weather.

FieldDefaultDescription
enabledfalseTurn the weather on. Needs the home location. While false, GET /api/v1/weather answers 503 and get_weather answers weather unavailable.
refresh_minutes15Minutes between two fetches, with about 10 % random jitter. Between 10 and 1440 when enabled.
notify_unreachablefalseSend a push alert when Open-Meteo has been unreachable for 30 minutes, and one when it answers again.

The city, country and coordinates come from the home location. An enabled weather with a refresh below 10 or above 1440 is refused when you save, and so is enabling it with no home location.

Solcast​

Settings → Solar forecast. The Solcast rooftop solar forecast. Off by default: while enabled is false the hub makes no request at all. See Solar forecast.

FieldDefaultDescription
enabledfalseTurn the solar forecast on. While false, GET /api/v1/solar answers 503 and get_solar answers solar unavailable.
sites[]Rooftop resource ids from the Solcast Toolkit, one or more. Each id may hold only letters, digits, - and _. One request per site per refresh.
daily_limit10This hub's share of the account's requests per UTC day (the form calls it Calls per day). The hobbyist limit is 10. Refreshes per day are (daily_limit - 2) / number of sites, at least 1; 2 calls are kept in reserve. Must be at least the number of sites.
api_keynoneThe Solcast API key (a secret). Required when enabled.
notify_unreachablefalseSend a push alert when Solcast has been unreachable for 30 minutes, and one when it answers again.

When enabled, no site, an empty or invalid id, a daily_limit below the number of sites, or no key is refused when you save. The key is never written to a log line, an API response or MQTT.

Frigate​

Settings → Cameras. Frigate, for alert media and the event bridge. See Cameras (Frigate).

FieldDefaultDescription
urlnoneFrigate origin. With it set, media on that origin is served by the hub at /api/v1/media, so the browser never sees the login. Any other origin is refused. A blank string counts as unset.
usernoneFrigate login, for its login port (8971). Leave user and password out for the unauthenticated port (5000).
passwordnoneFrigate password (a secret).
media_urlnoneBase URL the phone fetches snapshots and clips from; url when unset. Use the unauthenticated port (5000): the app sends no login.
bridgefalseTurn <topic_prefix>/events into camera push alerts. Needs url or media_url. The topic is subscribed only when the bridge is on.
labels[]Object labels to alert on. Empty: all.
cameras[]Cameras to alert on. Empty: all.
livefalseServe live camera frames at /api/v1/cameras/{id}/latest.jpg and /stream (the dashboard Camera widget). Every device on the LAN can read them once it is on. Needs url.
zones[]No screen. Alert only once the object enters one of these zones. Empty: any.
cooldown0No screen. Seconds to ignore new events on a camera after an alert.
severity"warning"No screen. Severity of the alerts: info, warning or critical.
ttl43200No screen. Time to live of the alerts, in seconds.
topic_prefix"frigate"No screen. Frigate's MQTT topic_prefix.

The hub also keeps a connection timeout (5000 ms) that no screen or route sets. The broker user needs read on <topic_prefix>/events. Frigate needs snapshots.enabled: true, and event clips retained (record.enabled) for the clip update.

Push​

Settings → Notifications. Push notifications, sent by the hub through Firebase Cloud Messaging. Without a key the hub keeps the alert history and sends nothing, with one warning at start. See Push notifications.

FieldDefaultDescription
service_accountnoneThe Firebase service-account key JSON (a secret). A key with no project_id is refused. A read also shows project_id.
prefix"nidoo/push"No screen. Topic prefix: <prefix>/notification/<source>, <prefix>/tokens/<installId>, <prefix>/responses, <prefix>/history.
retry_interval60No screen. Seconds between two passes of the retry queue.
max_retries10No screen. Attempts before a queued alert is given up.
history_size100No screen. Alerts kept in the history.
history_days7No screen. Days an alert stays in the history.

Climate​

The climate engine (beta, still being tested). Switched on from the Climate card of the wizard's Services step. Everything except these two fields is edited through MCP, REST and the web Climate screen, as retained JSON under prefix. See Climate.

FieldDefaultDescription
enabledfalseTurn the engine on. While false, GET /api/v1/climate answers 503 and the climate MCP tools answer climate disabled.
prefix"nidoo/climate"No screen. Topic prefix of the climate documents. When enabled it must not be empty or only /, and must not contain + or #.

Mobile​

The remote gateway the Android app uses away from home, carried by the phone setup code. Read with GET /api/v1/settings/mobile, change with PUT /api/v1/settings/mobile (or get_settings and set_settings). Unlike the other sections, saving it does not restart the hub. A PUT replaces the whole section.

FieldDefaultDescription
gateway_urlnoneThe gateway address, for example https://house.example.ts.net. It must start with https:// and name a host.
gateway_keynoneThe gateway key (a secret): 64 hex characters. A read shows {"set": bool} and gateway_ready, which is true when both fields are set.

GET /api/v1/setup/mobile-code returns {"payload": "<json>"}, the v:1 JSON the phone reads from a QR code. It is built from the broker in hub.json (with the app login of data/bundled.json instead of the hub's when the hub uses the bundled login), the mobile section and the Host of the request (a broker on localhost is replaced by that host, so the phone can reach it). It answers 409 outside Run mode or before the MQTT step is saved, and 403 to a browser page of another origin (see Security). The code holds secrets: the broker login and the gateway key. Show it only to someone you trust, and do not share a screenshot of it. The hub never logs it.

Backup​

Where and how the hub backs up. Read with GET /api/v1/settings/backup, change with PUT /api/v1/settings/backup (HTTP API); the Settings page is Settings → Backup. Like mobile, saving it does not restart the hub: the next backup reads the new values. A PUT replaces the whole section. See Backup and restore.

FieldDefaultDescription
passwordnoneThe backup password (a secret): at least 8 characters. Backups, FTP and download alike, need it. It cannot be removed once set. A read shows {"set": bool}.
ftp.hostemptyThe FTP server. Empty means FTP is not configured.
ftp.port21The FTP port. Plain FTP, passive mode.
ftp.useremptyThe FTP login.
ftp.passwordnoneThe FTP password (a secret). A read shows {"set": bool}. Changing the host or port needs it sent again.
ftp.folder/The remote folder; an empty value is /.
keep7How many backups stay on the server, at least 1. The oldest beyond it are deleted after a good backup.
include_z2mtrueAdd Zigbee2MQTT's own backup (its network key and paired devices) to each backup, asked over MQTT. When it is missing, the backup is saved without it and reported as partial. See Zigbee2MQTT data.
notify_failuretrueSend a push when an FTP backup fails or is saved without its Zigbee2MQTT data (partial). A cancelled backup sends none. Independent of the system notifications switch.

Both passwords are write-only, as in Secrets: a string sets one, null clears the FTP one, and leaving it out, "" or {"set": true} keeps it. The backup password can be replaced but not cleared. They are stored in the settings table like the other sections and carried by a backup, which is encrypted.

The last backup's record is data/backup-last.json (mode 0600), so it survives a database that is down. The time limit of a run is 2 hours for Back up now, and timeout_minutes for the backup.run card.

System​

Settings → System saves its live settings in the system section. Saving them does not restart the hub. The section holds the sensor supervisor, under supervisor.

supervisor​

Set from the Sensor supervisor card on Settings → System, saved as soon as it changes. See System health for what the checks do. The same fields are sent by PUT /api/v1/supervisor (HTTP API).

FieldDefaultDescription
enabledtrueRun the checks. Off: open problems are cleared without pushes.
notifytrueSend pushes. Off: problems are still tracked and listed. Turning it back on does not push problems already open.
notify_recoveredtrueSend the "back to normal" push.
sensitivitynormallow, normal or high. The usual gap is multiplied by 3, 2 or 1.5.
ignored[]Entity ids never checked. Adding one drops its open problems without a push.

Advanced​

The low-level knobs, with no screen. Read the section with GET /api/v1/settings/advanced (or get_settings), change what you need and send the whole document back with PUT /api/v1/settings/advanced (or set_settings): what you leave out takes its default.

topics​

Where the hub looks for discovery and where it keeps its own retained documents. See MQTT topics for what lives under each prefix.

FieldDefaultDescription
discovery_prefixes["nidoo"]Home Assistant discovery prefixes the hub subscribes to (<prefix>/#). The first one is also where the hub publishes the discovery of its own virtual entities and groups.
ui_prefix"nidoo/ui"Entity overrides (<ui_prefix>/<id>), rooms (<ui_prefix>/_areas), the type table (<ui_prefix>/_types) and dashboards (<ui_prefix>/dashboards/<id>).
z2m_base"zigbee2mqtt"Zigbee2MQTT base topic. The one in hub.json (the MQTT step's Advanced field) wins when it is set.
automation_prefix"nidoo/automation"Flow definitions: one retained JSON document per flow at <automation_prefix>/<flow id>.
flow_labels"nidoo/flow_labels"The flow label catalog: one retained JSON document with every label and choice. It must not contain + or #, and must not sit under automation_prefix.

Until Zigbee2MQTT publishes under nidoo, list the Home Assistant prefix next to it so the discovery topics it still retains under homeassistant/ are picked up too: "discovery_prefixes": ["nidoo", "homeassistant"].

commands​

FieldDefaultDescription
confirm_timeout_ms5000How long a command waits for the entity's state echo before it reports accepted: false. Flow command nodes and send_command use it.
subscription_debounce_ms500How long the MQTT task waits after the set of state topics changes before it re-diffs its subscriptions.

automation​

The flow engine.

FieldDefaultDescription
runs_kept20Recent runs remembered per flow, newest first. Runs live in memory only; a restart forgets them. A value of 0 is treated as 1.

groups​

FieldDefaultDescription
enabledfalseKill switch for flexible groups. While false, GET /api/v1/groups, PUT/DELETE /api/v1/groups/{id} and the MCP group tools answer groups disabled (503 over HTTP), group commands are rejected, and the one-shot room-group migration is skipped.

network​

FieldDefaultDescription
enabledtrueKill switch for network presence watches. While false, the network watch routes and MCP tools answer network presence disabled (503 over HTTP) and no pings are sent.

alarm​

The native alarm's topic prefix. The alarm itself is switched on in its settings document (Settings → Alarm, MCP, HTTP), so there is no enabled field here. See Alarm.

FieldDefaultDescription
prefix"nidoo/alarm"Topic prefix of the alarm's retained documents (<prefix>/settings, <prefix>/state) and of its panel topics. Must not be empty or only /, and must not contain + or #.

watchdog​

Two opt-in watchdogs that raise system alerts, both off by default. See Watchdogs for the alert wording and the broker permissions each source needs.

FieldDefaultDescription
gateway.enabledfalseSubscribe to <prefix>/+.
gateway.prefix"encryption-gateway/health"Topic prefix where the gateway publishes one retained state per component. Must not be empty when enabled.
acl.enabledfalseAlert on Mosquitto Denied PUBLISH/SUBSCRIBE/UNSUBSCRIBE log lines.
acl.source"topic""topic" reads log_topic (needs log_dest topic in mosquitto.conf); "file" tails log_file.
acl.log_topic"$SYS/broker/log/#"Topic read when source is "topic". Must not be empty in that case.
acl.log_filenoneMosquitto log path, required when source is "file".
acl.cooldown300Seconds during which repeats of one denial are held back; later denials are counted in the next alert.

history_buffer_rows​

FieldDefaultDescription
history_buffer_rows100000States the history writer keeps while the database is unreachable, before it drops the oldest (one warning per outage). See History.