# Raspberry Pi

{% embed url="<https://youtu.be/DKgI4VWSGUM?si=eChZLV6MoFySbS5z>" %}

{% hint style="info" %}
Models with smaller memory (RAM) may counter performance issues. A **Raspberry Pi with at least 4GB of memory is recommended.**

If you do not have a Raspberry Pi, consider the [virtual machine](https://cube.ewelink.cc/getting-started/quickstart/virtual-machine/virtualbox) installation.

Alternatively, [purchase an iHost](https://sonoff.tech/products/sonoff-ihost-smart-home-hub/58) shipped with CUBE OS from the SONOFF website or Amazon if neither option is feasible.
{% endhint %}

## 1. Preparation

{% stepper %}
{% step %}
Visit this [repo](https://github.com/eWeLinkCUBE/CUBE-OS/releases/) to download the latest image.
{% endstep %}

{% step %}
Obtain a [Raspberry Pi](https://amzn.to/2S0Gcl1) and get it ready following the Raspberry Pi official [guides](https://www.raspberrypi.com/documentation/computers/getting-started.html) if you have a kit like the enclosure and cooling fan.
{% endstep %}

{% step %}
Other Required Accessories:

1. A micro SD card (TF Card) and a card reader. Storage cards with at least a C10 and A1 rating are recommended.
2. Ethernet cable.
3. If you need to add Zigbee devices, prepare a Zigbee Dongle. Tested Zigbee Dongles include:

> SONOFF ZBDongle-MAX\
> SONOFF ZBDongle-PMG24\
> SONOFF ZBDongle-LMG21\
> SONOFF ZBDongle-E\
> SONOFF ZBDongle-P\
> [Others listed](https://darkxst.github.io/silabs-firmware-builder/) by developer @darkxst&#x20;

{% hint style="info" %}
For more information on Zigbee configurations and compatibility, please refer to this [guide](https://cube.ewelink.cc/compatibility-check/zigbee).
{% endhint %}

4. Power Adapter (Alternatively, if you have a Power over Ethernet (PoE) Hat installed, ensure your network switch or router, as well as the Ethernet cable, can provide sufficient power)

{% hint style="info" %}
Ensure you have an [appropriate power supply](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supply) for the Raspberry Pi. Smartphone chargers may not be suitable, as some only provide full power to certain manufacturers’ phones. USB ports on computers do not supply adequate power and should not be used.
{% endhint %}
{% endstep %}
{% endstepper %}

## 2. Burn CUBE OS to SD Card

{% stepper %}
{% step %}
Download and install the Raspberry Pi Imager from the [Raspberry Pi website](https://www.raspberrypi.com/software/).

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F5B46Vg2xra7HWPE07VaK%2FScreenshot%202024-11-18%20at%2010.55.07.png?alt=media&#x26;token=a3871eb8-b815-4c2c-8d75-1e5c96e1bbe8" alt="" data-size="original">
{% endstep %}

{% step %}
Open Raspberry Pi Imager and select your Raspberry Pi device.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Faspk4R2HmFtRFuoHKWSZ%2FScreenshot%202024-11-15%20at%2017.27.08.png?alt=media&#x26;token=0c249868-3a45-4092-bd06-1aae77ee2956" alt="" data-size="original">
{% endstep %}

{% step %}
For the operating system, choose “Use Custom” and select the downloaded CUBE image.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FRPdxJoo4RUIjS7LoSlju%2FScreenshot%202024-11-15%20at%2017.27.12.png?alt=media&#x26;token=68f3ee2c-b2cc-4ab4-b63d-a30966b60861" alt="" data-size="original">![](https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FVSEZsAF8RhxQetSQKr2l%2FScreenshot%202024-11-15%20at%2017.27.40.png?alt=media\&token=6b1a3e5f-825d-4039-98d5-8a805ac63b4f)
{% endstep %}

{% step %}
Insert the SD card into the computer and select it as the storage to use.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FJf1GeNXHY34sNUkQwcKX%2FScreenshot%202024-11-15%20at%2017.27.48.png?alt=media&#x26;token=f50f39f7-bf42-4fb9-9f7a-ea0cc6e98edd" alt="" data-size="original">
{% endstep %}

{% step %}
If you are promoted with customization options, click `NO`.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FoaVBw3HwqvZCiZHSgfO5%2FScreenshot%202024-11-15%20at%2017.27.52.png?alt=media&#x26;token=9d3aef50-65b2-418b-bb2a-b583ba489607" alt="" data-size="original">
{% endstep %}

{% step %}
Click “Next” to write the image to the SD card. Note that the card’s contents will be overwritten.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FFVyczYr2WXfmIIJAkcES%2FScreenshot%202024-11-15%20at%2017.27.56.png?alt=media&#x26;token=dbec868e-06db-41e8-9f94-e6b9f1209990" alt="" data-size="original">
{% endstep %}

{% step %}
Wait until the write process reaches 100% and eject the SD card upon completion.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FoXSRA52I2y31mPWujWXc%2FScreenshot%202024-11-15%20at%2017.28.06.png?alt=media&#x26;token=b6a0ef97-904d-401e-9014-be54c13f1aed" alt="" data-size="original">
{% endstep %}
{% endstepper %}

## 3. Boot Raspberry Pi and Accessing CUBE:

{% stepper %}
{% step %}
Insert the Micro SD card into the Raspberry Pi (on the short side of the board near the LED).

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FeG76zDQ7Do73B4AcmPHj%2FIMG_3191.JPG?alt=media&#x26;token=5ed8d8d3-5872-4705-83da-8b643fdc1ccf" alt="" data-size="original">
{% endstep %}

{% step %}
Connect the Raspberry Pi to a power source and Ethernet cable, ensuring it is on the same network as your computer and connected to the internet.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F79Kb4vE4uFcwr6IUJaHU%2FF17ABFCB-DC06-43F1-A1D9-266A7F063FD0_1_201_a.jpeg?alt=media&#x26;token=9915c5cd-ecd6-4238-a679-917f59ff4c3e" alt="" data-size="original">
{% endstep %}

{% step %}
Optional: If you have a Zigbee Dongle, plug it into a USB port.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fy8fbNvPTAbTykeYOhIt2%2FIMG_3192.JPG?alt=media&#x26;token=f455cc05-2d50-478b-ae2a-6fa6aeac4f8f" alt="" data-size="original">
{% endstep %}

{% step %}
After powering the Raspberry Pi, wait a few minutes for it to boot up. Then, access the Web management page using [cube.local](http://cube.local).

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FAihP549ni2nOMCEPJRyF%2FScreenshot%202024-11-18%20at%2011.24.57.png?alt=media&#x26;token=6176bc04-01b5-4e18-aec9-7830c149b0cf" alt="" data-size="original">

Or you can find the CUBE’s IP from your router’s interface and use it to access the management page. Usually, you can see the IP next to the device named `cube`, which also has the longest expiring time (Leasetime remaining).

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F86D0Dm4uHbjX61IaAJGG%2FScreenshot%202024-11-18%20at%2011.28.29.png?alt=media&#x26;token=298b1360-1267-4ca0-9e92-c4c022801501" alt="" data-size="original">
{% endstep %}

{% step %}
Upon successful access, view a short ID on the settings page. Access the CUBE Web management page subsequently using cube-{short id}.local, especially useful for distinguishing multiple CUBEs on the same local network.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FXJi8azaU8jWkoxymkz8K%2FScreenshot%202024-11-18%20at%2011.33.14.png?alt=media&#x26;token=eb4c5fc2-307f-41d9-b0c7-ccefb6d3ad73" alt="" data-size="original">
{% endstep %}
{% endstepper %}
