Bazmundi

ESPHOME ttgo t-camera yaml sans mqtt

Feb 19th, 2021 (edited)
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. esphome:
  2. name: t_camv162b
  3. platform: ESP32
  4. board: esp-wrover-kit
  5.  
  6. wifi:
  7. ssid: "xxxx-xxxx"
  8. password: "xxxxxxxx"
  9. manual_ip:
  10. static_ip: 192.168.1.221
  11. subnet: 255.255.255.0
  12. gateway: 192.168.1.1
  13.  
  14.  
  15. # Enable fallback hotspot (captive portal) in case wifi connection fails
  16. ap:
  17. ssid: "T Camv162b Fallback Hotspot"
  18. password: "xxxxxxxx"
  19.  
  20. captive_portal:
  21.  
  22. # Enable logging
  23. logger:
  24.  
  25. # Enable Home Assistant API
  26. api:
  27.  
  28. ota:
  29.  
  30. binary_sensor:
  31. - platform: gpio
  32. pin: GPIO19
  33. name: PIR
  34. id: movement
  35. device_class: motion
  36.  
  37. - platform: gpio
  38. pin:
  39. number: GPIO15
  40. mode: INPUT_PULLUP
  41. inverted: True
  42. name: Button
  43.  
  44. - platform: status
  45. name: Status
  46.  
  47. sensor:
  48. - platform: wifi_signal
  49. name: WiFi Signal
  50. update_interval: 10s
  51. - platform: uptime
  52. name: Uptime
  53.  
  54. esp32_camera:
  55. name: Camera
  56. external_clock:
  57. pin: GPIO4
  58. frequency: 20MHz
  59. i2c_pins:
  60. sda: GPIO18
  61. scl: GPIO23
  62. data_pins: [GPIO34, GPIO13, GPIO14, GPIO35, GPIO39, GPIO38, GPIO37, GPIO36]
  63. vsync_pin: GPIO5
  64. href_pin: GPIO27
  65. pixel_clock_pin: GPIO25
  66. # power_down_pin: GPIO26
  67. resolution: 640x480
  68. jpeg_quality: 10
  69. vertical_flip: false
  70. horizontal_mirror: false
  71.  
  72. i2c:
  73. sda: GPIO21
  74. scl: GPIO22
  75.  
  76. font:
  77. - file: "fonts/times-new-roman.ttf"
  78. id: tnr1
  79. size: 20
  80. - file: "fonts/times-new-roman.ttf"
  81. id: tnr2
  82. size: 35
  83. - file: "fonts/times-new-roman.ttf"
  84. id: tnr3
  85. size: 70
  86.  
  87.  
  88. time:
  89. - platform: homeassistant
  90. id: homeassistant_time
  91.  
  92. display:
  93. - platform: ssd1306_i2c
  94. model: "SSD1306 128x64"
  95. address: 0x3C
  96. rotation: 180
  97. lambda: |-
  98.  
  99. if(id(movement).state) {
  100. it.print(64, 54, id(tnr3), TextAlign::BASELINE_CENTER, "Boo!");
  101. } else {
  102. it.strftime(64, 0, id(tnr1), TextAlign::TOP_CENTER,"%d-%m-%Y", id(homeassistant_time).now());
  103. it.strftime(64, 64, id(tnr2), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now());
  104. }
Add Comment
Please, Sign In to add comment