How to reflash a Sensibo Sky with ESPHome

Wednesday, February 28th, 2024 at 08:24pm

A few days ago I mentioned how I had reflashed two Sensibo Sky devices with ESPHome as I prefer that arrangement for controlling my AC units. As there were some gaps in the instructions I found on reddit I decided to fully document my steps here. This may not be the best or only method, but it is what I did.

The reddit post that I started from:

Once I picked up the devices my first challenge was actually opening them up. The reddit post didn’t have any information, I couldn’t see any obvious way and a quick search didn’t turn up anything. I briefly considered just trying to use the exposed pins, but I didn’t know what type of connector and didn’t want to wait, so I turned to my iFixit toolkit, using a couple of the plastic picks to wedge open the white casing from the USB port side.

It turns out this was unnecessary and the case is very easy to open.

The translucent part of the case has a hook that clips into the white part, so if you push down on the Sensibo logo you can slide the white part down slightly and it will then lift off. The translucent part can then be unclipped.

This is the diagram from the reddit post:

This is the pinout of the style of USB to TTL UART I used:

Per the instructions I connected:

  • UART GND to Sensibo GND
  • UART TX to Sensibo RX
  • UART RX to Sensibo TX
  • UART GND to Sensibo pins 0 and 15 (though apparently only 0 is required)

I then powered up the device using the USB port, previously the LED would flash when turned on, now it was on solid.

To confirm that I had a connection I used esptool:

$ esptool flash_id
esptool.py v2.8
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: c8:c9:a3:a5:d7:16
Enabling default SPI flash mode...
Manufacturer: eb
Device: 6015
Detected flash size: 2MB
Hard resetting via RTS pin...

Satisfied I was able to connect I now went into the ESPHome Dashboard and created a new device, this didn’t have any sensors yet, just enough configuration to connect to my wifi (with a static IP because I find that easier than hoping mDNS will work).

As I was doing this from my main desktop and not the machine the TTL UART was connected to I opted for the Manual Download of the firmware. After doing its thing the dashboard gave me an image file to flash.

As I had used esptool to check the connection, I used it again but now to flash the new image. I didn’t keep a copy of the output but the command was:

$ esptool write_flash 0x0 bedroom_ac.bin

The flashing said that it had completed successfully so I disconnected all the wires from the Sensibo and then powered it up from just the USB connector. I breathed a sign of relief when the ESPHome Dashboard showed the device was ONLINE and I could look at its logs.

On the reddit post are two main ESPHome configs, one from the original author and then another linked in a comment. I used a mix of both of those to end up with my current configuration:

esphome:
  name: "bedroom-ac"
  friendly_name: Bedroom AC

esp8266:
  board: esp_wroom_02

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "...."

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 10.0.0.61
    gateway: 10.0.0.1
    subnet: 255.255.255.0

captive_portal:

# see https://www.reddit.com/r/Esphome/comments/q1cwsu/converting_a_sensibo_sky_to_esphome/ for more info

# sensibo i2c pins
i2c:
  sda: 02
  scl: 14
  scan: true
  id: bus_a

remote_transmitter:
  id: ir_tx
  pin: 15
  carrier_duty_percent: 50%

remote_receiver:
  id: ir_rx
  pin:
   number: 4
   inverted: true
   mode:
    input: true
    pullup: true

sensor:
  - platform: hdc1080
    temperature:
      id: dht_temp
      name: Temperature
      filters:
      - offset: -2.0  # hdc1080 is reading about 2C above ambient so reduce by this offset
    humidity:
      id: dht_humidity
      name: Humidity
    update_interval: 60s
  
  - platform: wifi_signal
    name: "WiFi Signal"
    id: wifi_dbm
    update_interval: 60s

  - platform: uptime
    name: "Uptime"
    id: device_uptime
    update_interval: 10s

binary_sensor:
  - platform: gpio
    id: button
    name: Button
    pin:
      number: 13
      mode: INPUT_PULLUP
      inverted: true

output:
  - id: light_output
    platform: esp8266_pwm
    frequency: 1000 Hz
    pin: 12

light:
  - platform: status_led
    name: LED
    id: led
    output: light_output

climate:
  - platform: fujitsu_general
    id: controller
    name: Controller
    receiver_id: ir_rx
    transmitter_id: ir_tx
    sensor: dht_temp
    supports_cool: true
    supports_heat: true
    on_state:
      - lambda: |-
          if (x.mode != CLIMATE_MODE_OFF) {
            auto call = id(led).turn_on();
            call.perform();
          } else {
            auto call = id(led).turn_off();
            call.perform();
          }

One big difference was that I used friendlyname and that I configured the LED to be on when the climate platform is also on and also be the statusled. The button currently has no action (I need to drill out the case and extend the physical button so it can be used) and I also like having uptime and wifi diagnostics.

With one device converted for use in my bedroom, I then repeated the process for the one in my study.

Tagged with: , ,