User Tools

Site Tools


rpi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rpi [2024/09/29 18:28] – created karciorpi [2024/09/29 20:20] (current) karcio
Line 1: Line 1:
-== Home Assistant, ESPHome, BMP280 - monitorowanie temperatury i ciśnienia. ==+== Home Assistant, ESPHome, BMP280 - temperature and pressure monitoring. ==
  
  
 == List:== == List:==
-  * Raspbery PI 3 or newer +  * raspberry PI 3 or newer [[https://en.wikipedia.org/wiki/Raspberry_Pi|raspberry pi]] - cost about €43.09 
-  * ESP32  +  * ESP32 [[https://en.wikipedia.org/wiki/ESP32|esp32]] - cost about €3.5 
-  * microSD card +  * microSD card - cost about €10 
-  * Sensor BMP280 - temperature, pressure+  * sensor BMP280 - temperature, pressure [[https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp280/|bmp028]] - cost about €1.5
   * wires to connect ESP32 with BMP280   * wires to connect ESP32 with BMP280
-  * kabel zasilający ESP32 micro usb  +  * cable to power ESP32 micro usb  
-  * Ethernet cabel +  * ethernet cable 
-  * WIFI dongle+  * wifi dongle
   * optional case for esp32 and sensor, I've made one - you can look here https://github.com/karcio/stls/blob/main/esp32_sensor_bottom_v1.scad   * optional case for esp32 and sensor, I've made one - you can look here https://github.com/karcio/stls/blob/main/esp32_sensor_bottom_v1.scad
  
-ZDJECIE RPI3+Raspberry Pi 3 
 +{{ :img_3050.jpg?direct&600 |}}
  
-ZDJECIE PLYTKI+ESP32 controller 
 +{{ :image0.jpeg?direct&600 |}}
  
-ZDJECIE CZUJNIKA+BMP280 sensor 
 +{{ :image1.jpeg?direct&600 |}}
  
-ZDJECIE OBUDOWY+ESP32 custom case 
 +{{ :image_ob2.jpeg?direct&600 |}}
  
 == Prepare image HAOS: == == Prepare image HAOS: ==
-  * ściągnij obraz odpowiedni do twojego RPI z lokalizacji: https://github.com/home-assistant/operating-system/releases/tag/13.0             +  * download HAOS for your rpi from https://github.com/home-assistant/operating-system/releases/tag/13.0            
-  * Wypunktowaniew moim przypadku ściągnąłem ten obraz +
 <code> <code>
 https://github.com/home-assistant/operating-system/releases/download/13.0/haos_rpi2-13.0.img.xz https://github.com/home-assistant/operating-system/releases/download/13.0/haos_rpi2-13.0.img.xz
 </code> </code>
-  * rozpakuj używając komendy +  * unpack image
 <code> <code>
 unxz haos_rpi2-13.0.img.xz unxz haos_rpi2-13.0.img.xz
 </code> </code>
-  * włóż karte SD do slotu laptopie i poniższą komenda sprawdź jak rozpoznana jest karta - u mnie to /dev/mmcbkl0+  * insert sd card to your device and check how your machine recognize it - in mine case it is /dev/mmcbkl0
 <code> <code>
 sudo fdisk -l   sudo fdisk -l  
 </code> </code>
-  * przygotuj obraz na karcie SD  +  * flash your sdcard   
 <code> <code>
 sudo dd if=Downloads/haos_rpi2-13.0.img  of=/dev/mmcblk0 status=progress bs=1M sudo dd if=Downloads/haos_rpi2-13.0.img  of=/dev/mmcblk0 status=progress bs=1M
 </code> </code>
  
-== Pierwsze uruchomienie HA == +== First run HA == 
-  * włóż kartę SD do RPI  +  * insert sd card to RPI  
-  * podłącz Ethernet kabel +  * connect Ethernet cable 
-  * podłącz WIFI dongle +  * insert WIFI dongle to usb port 
-  * podłącz zasilanie i poczekaj moment, aż HA się załąduje +  * connect power to RPI and wait while for HA to run 
-  * na ruterze sprawdź jakie IP na RPI  +  * on your router check your rpi Ip address  
-  * w przeglądarce wpisz adresIP:8123 +  * in web browser insert rpi Ip address with port 8123,  http://your_rpi_ip:8123 
-  * na początku stwórz konto+  * first create account
  
-== Czynności po pierwszym uruchomieniu:== +== Setup wifi connection on first run:== 
-  * idź do ustawień system sieć wybierz zakładke WIFI +  * go to Settings System select Network and then wifi tab 
-  * ip4 wybierz automatyczny +  * in ip4 select automatic 
-  * WI-FI przeskanuj sieć, wpisz SSID i hasło - po czym zapisz ustawienie +  * in WI-FI scan network to find your network and insert SSID and password. Save after that 
-  * zrestartuj HA aby uaktywnić WIFI dongle+  * reboot rpi to set up wifi
  
-==Instalacja dodatków:== +== Install Add-ons:== 
-  * idź doustawienia > Add-ons +  * go to Settings > Add-ons 
-  * naciśnij na klawisz dodaj i zainstaluj esphome File editor +  * click in add and install esphome and File editor 
-  * esphome pozwoli podłączyć esp32 płytkę do HA +  * esphome allows you to use esp32 
-  * file editor pozwoli edytować pliki konfiguracyjne HA+  * file editor allows you to edit config files and check syntax
  
-== Struktura konfiguracyjna HA==+== HA config structure ==
   * configuration.yml   * configuration.yml
   * automation.yml   * automation.yml
   * secrets.yml   * secrets.yml
  
-== Przygotowanie płytki ESP32 i podłączenie BMP280== +== Connect BMP280 to ESP32 == 
-  * BMP280 ma pinów ale my użyjemy 4 VCC, GRN, SCL, SDA +  * BMP280 sensor has pins but we use just 4VCC, GRN, SCL, SDA 
-  * podłącz piny:+  * connet  pins as following:
     * BMP280 VCC -> ESP32 3V     * BMP280 VCC -> ESP32 3V
     * BMP280 GRN -> ESP32 GRN     * BMP280 GRN -> ESP32 GRN
Line 74: Line 77:
     * BMP280 SDA -> ESP32 D21     * BMP280 SDA -> ESP32 D21
    
-ZDJECIE PLYTKI Z PODLACZENIEM+ESP32 and BMP280 final photos.
  
-== Podłączenie esp32 do RPI== +{{ :image_ob1.jpeg?direct&600 |}}
-  * podłącz esp32 za pomocą USB do RPI +
-  * kliknij w ESPHome w zakładce +
-  * kliknij dodaj nowe urządzenie+
  
-tak powinno wyglądać ustawienie:+{{ :image_ob0.jpeg?direct&600 |}} 
 + 
 +{{ :image_ob3.jpeg?direct&600 |}} 
 + 
 +== Connect esp32 to rpi for first initial flash == 
 +  * connect esp32 using usb cable to rpi do RPI 
 +  * open ESPHome tab 
 +  * click on add new device 
 + 
 +this is sample of config file:
  
 <code> <code>
Line 132: Line 141:
 </code> </code>
  
-a tak wygląda przykładowa automatyzacja, jak temperatura wzrośnie powyżej 25 stopni, lub spadnie poniżej 5 lub 0 - wysłany zostanie email z ostrzeżeniem. Chciałbym tutaj zaznaczyć, że poniższa automatyzacja dotyczy czujnika umieszczonego poza domem. Stąd te niskie wartości temperatury :)+This is how looks sample of automation config
  
 <code> <code>
Line 166: Line 175:
 </code> </code>
  
-Dokładna dokumentacja jest tutaj: https://www.home-assistant.io/installation/raspberrypi+Whole documentation is here: https://www.home-assistant.io/installation/raspberrypi
  
rpi.1727634500.txt.gz · Last modified: by karcio