I configured a whole bunch of smart plugs back in 2019 and when I moved we got a new router and of course I hard coded the SSID and password into the YAML file so I couldn’t connect them anymore.
I lately managed to find the old router in the attic.
I’ve managed to connect the router to my network and now the plugs can connect through that but i need to change the config file for the new SSID.
The plugs aren’t showing in the ESPHome part of HA but they are showing in the intagrations part.
How do I get them to show there and then how can i pull the old config file off them as I’ve long since lost it and I had worked out the GPIO pins myself (I’m kicking myself as somebody had asked for the YAML file on her but I never got round to posting it for them).
The yaml config files are not stored on the devices. The config file is compiled then uploaded as machine code to the device. If you have deleted the yaml file it may still exist in the config/esphome/trash
folder, in which case you can simply move that file to config/esphome
. The ESPHome add-on will then recognise the device.
The files may also exist in old esphome backups if you have them.
If you do not have the the yaml file then your options are:
-
Re-flash the device serially (hardwire connection) with a new yaml file.
-
Recreate the yaml file in
config/esphome
, if you can get the IP address and password correct then you should be able to connect OTA (wirelessly).
I got lucky and found my 5 year old YAML file still stored away on my PC which is good as I’ve redone home assistant from scratch at least twice since then as couldn’t be bothered to migrate from Rasp3b to Rasb4 then to Proxmox VM.
I managed to cut and paste that and it picked it up, flashed the plugs with the SSID corrected and all is good now. I’m going to try to make a better config file as back then I just kept trying GPIO pins until things worked and the whole RGB was being run via an automation!
Thank you for your help