> For the complete documentation index, see [llms.txt](https://wiki.inels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.inels.com/inels-bus/how-to-get-started/cloud-migration-cu-replacement/written-guide.md).

# Written Guide

## Overview

When replacing a Central Unit (CU), the Cloud configuration must be transferred from the original CU to the new CU.

This process **is not performed automatically** and requires authorization using a temporary Bearer Token obtained from the iNELS Cloud.

The most critical part of the procedure is:

* Obtaining the Bearer Token
* Authorizing the API
* Executing the Gateway Swap

Failure during these steps can cause the original Cloud configuration to become unusable.

***

## Prerequisites

Before starting:

* The new CU must already contain the latest firmware.
* The new CU **must not** contain any Cloud configuration.
* Access to:
  * iDM project
  * iNELS Cloud
  * API Documentation
* Google Chrome (recommended)
* Developer Tools access (F12)

***

## Migration Procedure

#### Step 1 – Record MAC Addresses

Record both Central Unit MAC addresses.

| Device         | MAC Address |
| -------------- | ----------- |
| Source CU      | Original CU |
| Destination CU | New CU      |

***

#### Step 2 – Back Up the Project

From the original CU:

1. Download the current project (\*.elp).
2. If the original CU is unavailable, use the latest saved \*.elp project.

***

#### Step 3 – Upload the Project to the New CU

1. Open the saved project.
2. Connect the new CU.
3. Upload the same project.

***

#### Step 4 – Verify Cloud Status

Check the status in iNELS Cloud.

Expected result:

| Device      | Status                                           |
| ----------- | ------------------------------------------------ |
| New CU      | Online (Green), **without Cloud configuration**  |
| Original CU | Offline (Red), with existing Cloud configuration |

> **Important**
>
> Configure all **Third Party Settings** again on the new CU after migration.
>
> These settings are stored directly inside the CU and are **not included** in the project file.
>
> Without reconfiguration:
>
> * Cloud Events will not function correctly.
> * Third-party integrations may stop working.

***

### Critical Migration Steps

The following three steps are the most important parts of the migration.

***

#### Step 5 – Obtain the Bearer Token

1. Log in to iNELS Cloud.
2. Press **F12** to open Developer Tools.
3. Open:
   * **Network**
   * **XHR**
4. Select any API request.
5. Copy the **Authorization: Bearer** token.

> **Note**
>
> Any modern browser may be used, although Google Chrome is recommended.

***

#### Step 6 – Authorize the API

Open the Device Manager API documentation.

1. Open the API documentation page.
2. Click **Authorize**.
3. Paste the copied Bearer Token.
4. Confirm authorization.

It is recommended to verify the authorization by executing:

**Project → Get Devices**

If the device list is returned successfully, the authorization is valid.

***

#### Step 7 – Perform Gateway Swap

Open:

**Gateway → Swap**

Select **Try it out**.

Enter:

* **src\_mac** = Original CU MAC address
* **dst\_mac** = New CU MAC address

Click **Execute**.

***

#### Step 8 – Verify Migration

After execution:

Verify that:

* The number of Cloud devices is identical before and after migration.
* The new CU inherited the complete Cloud configuration.
* The original CU has been removed from the Cloud.
* All devices are online.
* Cloud Events are functioning correctly.

Finally:

1. Log out.
2. Log back into iNELS Cloud.
3. Verify that the project operates normally.
