---json { "name": "Customise & disable" } --- ====== Customising and disabling built-in devices ====== Change how Axiom handles a device it already knows about. You can customise a copy of a built-in profile, for example to poll a sensor less often, or disable a device type so Axiom stops detecting it. {{ :axiom:device_library:devlib-devices-changed.png?nolink&800 |}} ===== The Devices tab ===== Connect Axiom and open the **Devices** tab. **Devices on this Axiom** lists every profile Axiom can recognise. Search by name, maker or class (e.g. ''TEMP'' or ''ACC''). The **State** column shows where each profile comes from: ^ State ^ Meaning ^ | **built-in** | Part of Axiom's firmware. | | **yours** | Added or customised by your library. | | **disabled** | Axiom won't try to detect this type. | Some profiles belong to Axiom's own hardware. For example, the battery fuel gauge (MAX17048) is marked **Required by Axiom** and can't be disabled. Changes you make here only affect your **draft**. They take effect after you write the library and restart Axiom from the **Install** tab. ===== Viewing a definition ===== Click **Definition** next to a profile to open it read-only in the **Advanced JSON** tab. The page says, for example, //MCP9808 as this Axiom defines it. Read only until you customise it.// {{ :axiom:device_library:devlib-definition.png?nolink&800 |}} This is a good way to learn the profile format from working examples. ===== Customising a built-in profile ===== This example makes the MCP9808 temperature sensor poll every 10 seconds instead of every 5. - On the **Devices** tab, click **Definition** next to **MCP9808**. - Click **Customise this profile**. A copy goes into your draft, labelled **replaces built-in** in the profile list. - In the JSON, find ''"pollInfo"'' and change ''"i": 5000'' to ''"i": 10000''. The value is in milliseconds. - Click **Save to draft**. The page confirms //Saved to local draft. Axiom has not been changed.// {{ :axiom:device_library:devlib-customised-draft.png?nolink&600 |}} **How customised profiles are used:** Axiom tries your copy first. If your copy doesn't identify the device, the built-in profile is still tried as a fallback. A mistake in your copy therefore usually leaves the device working with its built-in behaviour. To be sure your copy is in use, check the **Origin** column on the **Test & tune** tab after installing. It should say **yours**. ==Just want to try a different polling rate?== You can change a device's polling interval temporarily on the **Test & tune** tab without editing or installing anything. See [[axiom:device_library:test_and_tune|Testing and tuning devices]]. Customise the profile once you've found a value you want to keep. ===== Disabling a device type ===== Click **Disable** next to a profile to stop Axiom detecting that type. Its state changes to **disabled** and the button becomes **Enable built-in**, which undoes it. Disabling works on the **type**, not on one physical device. Every device of that type stops being detected, and so does any customised copy of it. If you had a customised copy, enabling the type again brings your copy back. ===== Installing your changes ===== Open the **Install** tab. **What will change** lists each change: {{ :axiom:device_library:devlib-install-changes.png?nolink&800 |}} * **override**: your customised copy is tried first. * **disable**: Axiom will stop identifying this type. * **add**: a new profile (see [[axiom:device_library:add_a_sensor|Adding a new sensor]]). Tick the review box, click **Write to Axiom**, then click **Restart Axiom**. Check **What Axiom did with the file it has**: your changes are counted under **added** and **disabled**, and **rejected** should be 0. ===== Undoing changes ===== * **One customisation:** in **Advanced JSON**, select the profile and click **Remove custom**. Then write and restart. * **One disabled type:** click **Enable built-in** on the **Devices** tab. Then write and restart. * **Everything:** on the **Install** tab, click **Remove library & restart**. Axiom goes back to its built-in profiles. See [[axiom:device_library:backup_and_updates|Backing up, sharing and removing your library]]. ==Reserved addresses== Axiom uses some I²C addresses for its own hardware, including ''0x25'', ''0x36'' and ''0x70''–''0x77''. The Device Library's add and customise buttons block profiles on those addresses, and the Catalogue marks such profiles //Reserved for Axiom's own hardware//. Axiom itself refuses a library profile at ''0x36'' (its battery fuel gauge).