Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
5 stars 3 forks source link

Cannot connect with password #17

Closed JoachimVeulemans closed 1 year ago

JoachimVeulemans commented 1 year ago

Describe the bug Adding a Sonoff Basic through the Wizard is not working.

To Reproduce Steps to reproduce the behavior:

  1. Flash firmware to Sonoff Basic
  2. Install ESPhome app in Homey
  3. Add device, add ip, standard port, add password
  4. See error "Could not connect to the device, or something went wrong"

Expected behavior The device should be added without errors.

Screenshots image image

Additional context

esphome:
  name: sonoffbasic
  comment: "Sonoff001"

esp8266:
  board: esp8285

logger:

api:
  password: !secret ota_password

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: HIGH # for ESP8266 LOW/HIGH are mixed up, esphome/issues/issues/1532
  ap:
    ssid: ${devicename}
    password: !secret wifi_password

web_server:
  port: 80
  auth:
    username: admin
    password: !secret ota_password

captive_portal:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode:
        input: true
        pullup: true
      inverted: true
    name: "Sonoff Basic Button"
    on_press:
      - switch.toggle: relay

switch:
  - platform: gpio
    name: "Sonoff Basic Relay"
    pin: GPIO12
    id: relay

status_led:
  pin:
    number: GPIO13
    inverted: yes
Baldhor commented 1 year ago

@JoachimVeulemans Possible to activate the console.re logs in your the ESPhome application settings. And paste those logs here ?

You may need to open some of the objects as shown below before you do the screenshot: image

Baldhor commented 1 year ago

I usualy do not use password, so I never tested. I bet you will have logs looking like this: image

I investigate ... why password fail

Baldhor commented 1 year ago

@JoachimVeulemans I confirm, I was missing a single line of code ... I was not sending the password to the low level client :) I will push a test version in a few :)

Baldhor commented 1 year ago

@JoachimVeulemans Fix published, until it is certified, you can install the test version: https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/

JoachimVeulemans commented 1 year ago

Hi @Baldhor this fix you pushed is working, I am stuck at a next step.

I can add the device, using a password. I can create a new virtual device, doesn't matter if I change the name or not.

When I try to add any of the functionalities to the virtual device, the screen keeps loading, suggesting me something went wrong.

Scherm­afbeelding 2023-08-18 om 21 05 09
Baldhor commented 1 year ago

@JoachimVeulemans Which one of the device is concerned? I see you lost connection to 192.168.1.188. Is it the device concerned?

Baldhor commented 1 year ago

if if you can try using your computer: my.homey.app and then open the developper console

image

maybe there are some logs there.

Strange enough, once in a while, the drivers (general statement here) fail to operate because of whatever issues on Homey side seems. Sometimes, you just try again and it is solved ...

Baldhor commented 1 year ago

I opened another issue: https://github.com/Baldhor/Homey-ESPhome-Enhanced/issues/19 Let's continue there please!