I have a few devices running ESPHome that are in HA but not in the ESPHome Builder. I have 2 of the Midea AC modules and a ratgdo. I want to put them into ESPHome so I can tweak some settings. How do I do this?
How did initially install firmware
You just add the device config. Installing is the hard part.
If you have the encryption key you key ota the firmware. If not you must connect to PV and transfer it
The firmware came pre-installed. When you plug them in, they broadcast their own WIFI network. You connect, navigate to an IP address, then enter your wifi information. It then connects to your network automatically and shows up as a device in HA
What device?
You will need to create a config. The manufacturer may have this posted the factory config. Most devices are fairly generic.
You will likely need to connect to PC to install. WiFi (OTA) is likely not an option.
I do not see any info on how to change the firmware.
The link you provide says dongle uses midea esphome component
Esphome file are fairly generic and kinda just work
Look at dongle and identify the Esp Chip type. Esp32, esp8266 or other. Post picture here or numbers/letters and someone can help
After identify chip you just need “+ newdevice” >> continue >> add name >> select the esp chip type >> “skip” install
“Edit” the newly created file.
Edit WiFi section with your network details
Add section for “uart”
The hard part is you will need to determine what pins are used for tx/rx. Honestly you may be able to contact cloud free and ask them to give you Device file or tx/rx. You may also guess or look at chip and maybe able to determine.
Copy/paste the midea component code to end of file
you have now created the code for “install”
You will end up with something like below based on my instruction above
esphome:
name: hvac-module
friendly_name: hvac module
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: !secret ap_ssid
password: !secret ap_password
captive_portal:
##############################################################################
# above this is default created when you "+ new device" #
# change "wifi" to match your network settings #
# OTA password and API key should be unique for your install. #
# I save many of these items in the secrets file so I dont need to add with each new device #
##############################################################################
##############################################################################
# uart required for climate to work #
# midea docs say "require 9600 baud rate" #
# you must determine the pin #
##############################################################################
uart:
tx_pin: GPIOXX
rx_pin: GPIOXX
baud_rate: 9600
##############################################################################
# cloudfree says dongle uses climate module #
##############################################################################
climate:
- platform: midea
name: Midea Climate # Use a unique name.
period: 1s # Optional
timeout: 2s # Optional
num_attempts: 3 # Optional
autoconf: true # Autoconfigure most options.
beeper: true # Beep on commands.
visual: # Optional. Example of visual settings override.
min_temperature: 17 °C # min: 17
max_temperature: 30 °C # max: 30
temperature_step: 0.5 °C # min: 0.5
supported_modes: # Optional. All capabilities in this section may be detected by autoconf.
- FAN_ONLY
- HEAT_COOL
- COOL
- HEAT
- DRY
custom_fan_modes: # Optional
- SILENT
- TURBO
supported_presets: # Optional. All capabilities in this section may be detected by autoconf.
- ECO
- BOOST
- SLEEP
custom_presets: # Optional. All capabilities in this section may be detected by autoconf.
- FREEZE_PROTECTION
supported_swing_modes: # Optional
- VERTICAL
- HORIZONTAL
- BOTH
outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
name: Temp
power_usage: # Optional. Power usage sensor (only for devices that support this feature).
name: Power
humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature).
name: Humidity
I definitely want to try that. Is there a way to backup my current device file just in case this doesn’t work?
Nope
Not that I know of
Technically you can read out memory using same manner of flashing I believe but not using esphome. Another software yes
But basically. No