# Raspberry Pi

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

{% hint style="info" %}
I modelli con memoria (RAM) inferiore possono compromettere le prestazioni. Un **Raspberry Pi con almeno 4GB di memoria è raccomandato.**

Se non possiedi un Raspberry Pi, considera [la macchina virtuale](https://cube.ewelink.cc/english-it/primi-passi/quickstart/macchina-virtuale/virtualbox) installazione.

In alternativa, [acquista un iHost](https://sonoff.tech/products/sonoff-ihost-smart-home-hub/58) spedito con CUBE OS dal sito SONOFF o da Amazon se nessuna delle opzioni è praticabile.
{% endhint %}

## 1. Preparazione

{% stepper %}
{% step %}
Visita questo [repo](https://github.com/eWeLinkCUBE/CUBE-OS/releases/) per scaricare l'immagine più recente.
{% endstep %}

{% step %}
Ottieni un [Raspberry Pi](https://amzn.to/2S0Gcl1) e preparalo seguendo le ufficiali [guide](https://www.raspberrypi.com/documentation/computers/getting-started.html) se hai un kit come il case e la ventola di raffreddamento.
{% endstep %}

{% step %}
Altri accessori necessari:

1. Una scheda micro SD (TF Card) e un lettore di schede. Si raccomandano schede di memoria con almeno classificazione C10 e A1.
2. Cavo Ethernet.
3. Se devi aggiungere dispositivi Zigbee, prepara un Dongle Zigbee. I Dongle Zigbee testati includono:
4. Alimentatore (In alternativa, se hai installato un HAT Power over Ethernet (PoE), assicurati che il tuo switch di rete o router, così come il cavo Ethernet, possano fornire energia sufficiente)

{% hint style="info" %}
Assicurati di avere un [alimentatore appropriato](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supply) per il Raspberry Pi. I caricabatterie per smartphone potrebbero non essere adatti, poiché alcuni forniscono alimentazione completa solo a telefoni di determinati produttori. Le porte USB dei computer non forniscono energia adeguata e non dovrebbero essere utilizzate.
{% endhint %}
{% endstep %}
{% endstepper %}

## 2. Masterizzare CUBE OS sulla scheda SD

{% stepper %}
{% step %}
Scarica e installa Raspberry Pi Imager da [il sito web di Raspberry Pi](https://www.raspberrypi.com/software/).

<img src="https://2847557189-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 %}
Apri Raspberry Pi Imager e seleziona il tuo dispositivo Raspberry Pi.

<img src="https://2847557189-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 %}
Per il sistema operativo, scegli “Use Custom” e seleziona l'immagine CUBE scaricata.

<img src="https://2847557189-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://2847557189-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 %}
Inserisci la scheda SD nel computer e selezionala come memoria da utilizzare.

<img src="https://2847557189-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 %}
Se ti vengono proposte opzioni di personalizzazione, clicca `NO`.

<img src="https://2847557189-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 %}
Clicca “Next” per scrivere l'immagine sulla scheda SD. Nota che il contenuto della scheda verrà sovrascritto.

<img src="https://2847557189-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 %}
Attendi che il processo di scrittura raggiunga il 100% ed espelli la scheda SD al termine.

<img src="https://2847557189-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. Avviare il Raspberry Pi e accedere a CUBE:

{% stepper %}
{% step %}
Inserisci la Micro SD nel Raspberry Pi (sul lato corto della scheda vicino al LED).

<img src="https://2847557189-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 %}
Collega il Raspberry Pi a una fonte di alimentazione e al cavo Ethernet, assicurandoti che sia sulla stessa rete del tuo computer e connesso a Internet.

<img src="https://2847557189-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 %}
Opzionale: se hai un Dongle Zigbee, collegalo a una porta USB.

<img src="https://2847557189-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 %}
Dopo aver alimentato il Raspberry Pi, attendi qualche minuto che si avvii. Quindi, accedi alla pagina di gestione web usando [cube.local](http://cube.local).

<img src="https://2847557189-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">

In alternativa puoi trovare l'IP del CUBE dall'interfaccia del tuo router e usarlo per accedere alla pagina di gestione. Di solito puoi vedere l'IP accanto al dispositivo chiamato `cube`, che ha anche il tempo di lease rimanente più lungo (Leasetime remaining).

<img src="https://2847557189-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 %}
Dopo l'accesso avrai un breve ID sulla pagina delle impostazioni. Accedi successivamente alla pagina di gestione web del CUBE usando cube-{short id}.local, particolarmente utile per distinguere più CUBE sulla stessa rete locale.

<img src="https://2847557189-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 %}


---

# 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-it/primi-passi/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.
