KaufHA / kauf-rgb-switch

Files for the KAUF RGB Wall Switch
21 stars 8 forks source link

Hostname collision in ESP Home #18

Open Stoicmaverick opened 2 weeks ago

Stoicmaverick commented 2 weeks ago

I have an RGB switch roughly installed as part of a three switch gang in my kid's room. I am having an issue however with one of the switche's adoption, as the hostname is identical to another switch currently installed. I had had this switch installed and configured in the past, but incorrectly determined that it had failed, so I purchased a replacement and configured it identically. I installed the new/old switch today, but ESP-Home will not adopt the device without supplying an encryption key (which I don't have), and I can't figure out a way to tell it to treat the device as new.

All that said just to ask: what are the procedures to factory reset the device, including the initial hostname? Any other options?

Big fan of your work. Thanks.

bkaufx commented 2 weeks ago

Instead of adopting you can just create a new device in ESPHome and add the following yaml. change name/friendly_name as desired. Remove the use_address ip address after you flash for the first time.

If it won't flash OTA because it wants a key, download the firmware by clicking manual download instead of wirelessly in the dashboard. You should be able to still flash through the web interface by typing its ip address in a web browser.

substitutions: name: bedroom-light friendly_name: Bedroom Light

packages: Kauf.RGBSw: github://KaufHA/kauf-rgb-switch/kauf-rgbs-4m.yaml

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

use_address: 192.168.1.16

Stoicmaverick commented 2 weeks ago

Unfortunately I can't access the web portal. I see it in my wifi with 192.168.1.183, but shows 'Unable to connect' when dialing in directly. Thoughts?

bkaufx commented 2 weeks ago

If you create a new yaml file from scratch can you then see it in the dashboard and flash via ota?

If the web page won't load, you can also try flashing a bin.gz file via curl command, e.g.:

curl -v -X POST -H "Content-Type: multipart/form-data" -F update=@firmware_filename.bin.gz "http://192.168.1.16/update"