# Raspberry Pi

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

{% hint style="info" %}
内存（RAM）较小的型号可能会影响性能。一个 **建议使用至少 4GB 内存的 Raspberry Pi。**

如果你没有 Raspberry Pi，可以考虑 [虚拟机](/english-zh/ru-men-zhi-nan/quickstart/xu-ni-ji/virtualbox.md) 安装。

或者， [购买一台 iHost](https://sonoff.tech/products/sonoff-ihost-smart-home-hub/58) 可从 SONOFF 官方网站或亚马逊购买预装 CUBE OS 的设备，如果上述选项都不可行。
{% endhint %}

## 1. 准备工作

{% stepper %}
{% step %}
访问此 [仓库](https://github.com/eWeLinkCUBE/CUBE-OS/releases/) 以下载最新镜像。
{% endstep %}

{% step %}
获取一台 [Raspberry Pi](https://amzn.to/2S0Gcl1) 并按照 Raspberry Pi 官方的说明进行准备， [指南](https://www.raspberrypi.com/documentation/computers/getting-started.html) 如果你有外壳和散热风扇等套件，请一并准备。
{% endstep %}

{% step %}
其他所需配件：

1. 一张 micro SD 卡（TF 卡）和读卡器。建议使用至少具有 C10 和 A1 评级的存储卡。
2. 以太网线。
3. 如果需要添加 Zigbee 设备，请准备一个 Zigbee 加密狗。已测试的 Zigbee 加密狗包括：
4. 电源适配器（可选：如果你安装了 PoE Hat，请确保网络交换机或路由器以及以太网线能够提供足够电力）

{% hint style="info" %}
确保你有一个 [适配的电源供应](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supply) 用于 Raspberry Pi。手机充电器可能不适用，因为有些只会对特定厂商的手机提供满载电力。电脑的 USB 端口无法提供足够电力，不应使用。
{% endhint %}
{% endstep %}
{% endstepper %}

## 2. 将 CUBE OS 写入 SD 卡

{% stepper %}
{% step %}
从 [Raspberry Pi 网站](https://www.raspberrypi.com/software/).

<img src="/files/f12301b6c80c56ae4b3d5f160ad6bb9305b28e2b" alt="" data-size="original">
{% endstep %}

{% step %}
下载并安装 Raspberry Pi Imager。

<img src="/files/34ea45261bc645a5b0c64b47e78e02f50c2b2569" alt="" data-size="original">
{% endstep %}

{% step %}
打开 Raspberry Pi Imager 并选择你的 Raspberry Pi 设备。

<img src="/files/9765b6c4a6c0b7caaf6b48de72087d3c0a1f9618" alt="" data-size="original">![](/files/319a98e2a202cff89354f5f2a4ed5720108853d4)
{% endstep %}

{% step %}
在操作系统选项中，选择“使用自定义（Use Custom）”并选择已下载的 CUBE 镜像。

<img src="/files/06cf08d2e6072c9f1ef54076c985c195189b5198" alt="" data-size="original">
{% endstep %}

{% step %}
将 SD 卡插入电脑并选择它作为要使用的存储设备。 `如果出现自定义选项提示，点击`.

<img src="/files/3653adc88a5075c65038ccf7831ff425eddc42b0" alt="" data-size="original">
{% endstep %}

{% step %}
否

<img src="/files/290a7161cae956fba966c30c6871ac6f590c74d4" alt="" data-size="original">
{% endstep %}

{% step %}
点击“下一步”以将镜像写入 SD 卡。请注意，卡内内容将被覆盖。

<img src="/files/9dcebf4edb672f919542de7fb2a94dc9cba5a276" alt="" data-size="original">
{% endstep %}
{% endstepper %}

## 等待写入过程达到 100%，完成后弹出 SD 卡。

{% stepper %}
{% step %}
3\. 启动 Raspberry Pi 并访问 CUBE：

<img src="/files/e280dab2bd64a759e4d7aa37e90d63bec10e7c9e" alt="" data-size="original">
{% endstep %}

{% step %}
将 Micro SD 卡插入 Raspberry Pi（位于板上靠近 LED 的短侧）。

<img src="/files/28e7ebd965f541b0535565cc17ef930da5462d1b" alt="" data-size="original">
{% endstep %}

{% step %}
将 Raspberry Pi 连接到电源和以太网线，确保它与电脑在同一网络并已连接到互联网。

<img src="/files/1026592b22042b44ca18f62a2283909ec33caa23" alt="" data-size="original">
{% endstep %}

{% step %}
可选：如果你有 Zigbee 加密狗，请将其插入 USB 端口。 [给 Raspberry Pi 供电后，等待几分钟让其完成启动。然后使用以下地址访问 Web 管理页面：](http://cube.local).

<img src="/files/e1ef48497de441a228601754395cfe25490c8c43" alt="" data-size="original">

cube.local `或者你也可以从路由器界面查找 CUBE 的 IP 并使用该 IP 访问管理页面。通常你可以在名为`cube

<img src="/files/1ca4c88ffd0f09ddd04c1490b40f843d79bf8262" alt="" data-size="original">
{% endstep %}

{% step %}
的设备旁看到该 IP，该设备通常还有最长的剩余租约时间（Leasetime remaining）。在成功访问后，可以在设置页面查看一个短 ID，随后使用 cube-{short id}.local 访问 CUBE Web 管理页面，这在同一局域网内区分多个 CUBE 时非常有用。

<img src="/files/4251c0d8002c8e776b39172e658dbe31af281e38" alt="" data-size="original">
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cube.ewelink.cc/english-zh/ru-men-zhi-nan/quickstart/raspberry-pi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
