Ola amigos. Instalei uma ESP32 CAM com ESPHOME. Toda ver que tento visualizar a imagem da câmera recebo o seguinte erro de autenticação:
Login attempt or request with invalid authentication from DESKTOP-5C60T60.Dlink (192.168.1.194). See the log for details.
Log com o erro:
Detalhes do log (ALERTA)
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:124
Integration: HTTP ([documentation](https://www.home-assistant.io/integrations/http), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+http%22))
First occurred: 15:22:02 (5 occurrences)
Last logged: 16:48:21
Login attempt or request with invalid authentication from DESKTOP-5C60T60.Dlink (192.168.1.194). (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36)
código ESPHOME da câmera:
esphome:
name: camera-saurom
platform: ESP32
board: node32s
logger:
api:
ota:
password: !secret senhaota
wifi:
ssid: "Paulo_2G"
password: !secret senhapaulo
domain: .iot.local
fast_connect: on
manual_ip:
static_ip: 192.168.1.195
gateway: 192.168.1.1
subnet: 255.255.255.0
dns1: 192.168.1.1
ap:
ssid: "camera_saurom"
password: "sf6Ec5w0UDSc"
captive_portal:
web_server:
esp32_camera:
name: Camera Saurom
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
max_framerate: 5 fps # default: 10 fps, max 60
idle_framerate: 0.2 fps # default: 0.1 fps - framerate for 'picture' in HA dashboard
resolution: 800x600 # default: 640x480 (VGA) - higher res requires more memory
jpeg_quality: 10 # 10 (best) to 63 (worst)
brightness : 2
switch:
- platform: restart
name: "Restart Camera Saurom"
binary_sensor:
- platform: status
name: "Status Camera Saurom"
sensor:
- platform: uptime
name: Tempo atividade Camera Saurom
id: tempo_atividade_camera_saurom
- platform: wifi_signal
name: "Sinal Wi-Fi Camera Saurom"
update_interval: 60s
text_sensor:
- platform: version
name: "Versão Camera Saurom"
- platform: template
name: "Camera Saurom - Uptime"
lambda: |-
int seconds = (id(tempo_atividade_camera_saurom).state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
icon: mdi:clock-start
update_interval: 70s
# ligar Luz na gpio4 e depois liberar o código
output:
- platform: gpio
pin: GPIO4
id: gpio_4
light:
- platform: binary
output: gpio_4
name: Camera Saurom light
Atualizando a página a imagem chega a aparecer mas depois de alguns segundos ela some e o erro reaparece.
Alguém pode dar uma luz?