--- title: "Battery and clock" description: "Read the battery level, minutes left and power source of a Sony, Canon or Nikon camera from your computer, and set its date and time." url: https://darkgrade.com/docs/functionality/power last_updated: 2026-12-04 docs_index: https://darkgrade.com/docs/llms.txt --- # Battery and clock > Read the battery level, minutes left and power source of a Sony, Canon or Nikon camera from your computer, and set its date and time. > ## Documentation Index > Fetch the complete documentation index at: https://darkgrade.com/docs/llms.txt > Use this file to discover all available pages before exploring further. What powers a Sony, Canon or Nikon camera and how long it will last, and the camera's clock, read and set from your computer. | What | Does | | - | - | | [Battery](#battery) | Charge, minutes left and power source. | | [Set the clock](#set-the-clock) | Set the camera's date and time. | Each example has a tab per product. Pick yours once and every example follows. In Studio, the microphone that starts [voice](https://darkgrade.com/docs/studio/voice.md) is under the picture. MCP tabs show the tool Claude calls on Studio; on [your own server](https://darkgrade.com/docs/ai/server.md#what-differs-from-studio) the tools also take `camera`. Each CLI command opens the camera, does one thing and closes it. ## Battery Reads the battery level, the minutes the camera expects to last, and whether it runs on battery, USB or mains power. ```text Studio The camera pill shows the battery. Click it for the time left. Or click the microphone and ask “How's the battery?” ``` ```text MCP Ask Claude: “How's the battery?” → camera_get_battery {} ``` ```bash CLI npx darkgrade camera get-battery ``` ```typescript Slate const battery = await camera.getBattery() // { percent, level, minutesRemaining, powerSource } ``` ### What you get back Slate returns a [`Battery`](https://darkgrade.com/docs/slate/reference/types-results.md#battery). [MCP](https://darkgrade.com/docs/ai/results.md#what-a-tool-returns) and the [CLI](https://darkgrade.com/docs/cli/output.md#json-results) return the same fields as JSON. - **`percent`** · `number` · optional 0–100, when the camera reports a percentage. - **`level`** · `"empty"` `"low"` `"medium"` `"high"` `"full"` · optional The camera's coarse level, when it reports one (Canon reports only this). - **`minutesRemaining`** · `number` · optional The camera's own estimate of the minutes left. - **`powerSource`** · `"battery"` `"usb"` `"dc"` `"poe"` `"unknown"` What powers the camera; `unknown` unless the camera says. - **`batteryPresent`** · `boolean` · optional Whether a battery is in the camera, when the camera reports it. * A field the camera does not report is left out, never guessed. Also called *battery level*, *power level*, *power source*, *charge*. Slate reference: [`getBattery`](https://darkgrade.com/docs/slate/getting_started/camera.md#getbattery) · [Will the battery last the take?](https://darkgrade.com/docs/slate/guides/preflight.md#battery) ## Set the clock Sets the camera's date and time, to now unless you give a time, so file dates line up with your computer's. ```text Studio Studio sets the camera's clock from your Mac when it connects, then once an hour. ``` ```text MCP Ask Claude: “Set the camera's clock.” → camera_set_clock {} ``` ```bash CLI npx darkgrade camera set-clock # or a time of your own npx darkgrade camera set-clock --moment 2026-12-03T09:00:00 ``` ```typescript Slate await camera.setClock() // now await camera.setClock(new Date('2026-12-03T09:00:00')) ``` ### Inputs - **`moment`** · a date and time · CLI `--moment` The date and time to set. Now when left out. A `Date` in Slate; ISO 8601 text, such as `2026-12-03T09:00:00`, in MCP and on the CLI. Also called *sync clock*, *set camera time*. Slate reference: [`setClock`](https://darkgrade.com/docs/slate/getting_started/camera.md#setclock)