---
title: The driver file
project: IoT Platform
version: 1.0
section: development
language: en
translation: missing
license: Total.js Enterprise
url: https://totaljs.es/docs/it/iot/1-0/development/driver-file/
updated: 2026-11-20T06:56:18.114Z
---

# The driver file

> The parts of a driver file: the server script, the settings form and the read me.

A driver is one HTML-like file with up to three parts. Only the first one is required.

```html
<script total>
	// The server script: exports.id, exports.outputs, exports.make, ...
</script>

<settings>
	<!-- The form for the configuration of one device -->
</settings>

<readme>
The description shown in Read me, in Markdown.
</readme>
```

## The server script

The code in `<script total>` runs on the stream. It sets properties and functions on `exports`. When you select **SUBMIT** in the editor, Admin runs the script once to read these properties. A syntax error stops the save and shows the error, for example `SyntaxError: Unexpected token ';'`.

`exports.id` identifies the driver. Use only lower-case letters and digits, for example `demoweather`. When you save a file with an id that already exists, it replaces that driver. Every property is listed in [Driver reference](../driver-api/).

## The settings form

The `<settings>` part is the form that opens with **Options > Configure** in the device detail. Each field writes to one key of the configuration of the device, with `?.` in front of the key:

```html
<settings>
	<div class="padding">
		<div class="grid-4">
			<div class="m">
				<ui-component name="input" path="?.offset" config="type:number">Temperature correction (°C)</ui-component>
			</div>
		</div>
	</div>
</settings>
```

See [Settings and options](../settings-and-options/).

## The read me

The `<readme>` part is Markdown. People read it with **Read me** in **Drivers** and in the device detail. Describe the address the driver listens on, the data it expects and whether it needs a token.
