Skip to content

ac_remote

Iain Prior edited this page Mar 25, 2024 · 1 revision

The ac_remote module is designed to remote control an air conditioner. It loads a UI on a touchscreen.

UI

The UI looks like this:

background The numbers are overlaid over the basic screen.

The user can select the mode, and the temperature by tapping the screen.

Hardware / Pinout

The hardware I used when developing this module was this screen, designed for the D1 Mini: https://www.aliexpress.com/item/32919729730.html

"TFT 2.4 Touch Shield V1.0.0 for LOLIN (WEMOS) D1 mini 2.4" inch 320X240 SPI Touch Screen ILI9341 XPT2046"

I used a S2 Mini as the main controller: https://www.wemos.cc/en/latest/s2/s2_mini.html

I 3d printed a case to hold the screen: Thingiverse Link

20240307_134126

20240307_134108

Configuration

At the moment there are no config options for this module. All the pins are hardcoded.

Telemetry provided

The main point of this module is to provide telemetry about what the user's preference is on ac_mode and ac_setpoint. It provides these as telemetry on each cycle.

def getTelemetry(self):
    telemetry = {
        "ac_mode": self.mode,
        "ac_setpoint": self.setpoint
    }
    return telemetry

Telemetry consumed

This module consumes no telemetry from other modules.

Commands provided

This module does not provide any commands to other modules. It only provides telemetry about the internal state.

Commands consumed

This module processes commands to allow the user to update the ac information via another interface (e.g. Home Assistant). The commands supported are:

  • /current_temp/<number> - This updates the "current" temperature display on the UI. The number is a string representation like /current_temp/13.5
  • /ac_mode/<mode> - This updates the mode, and moves the green line on the UI to the relevant mode. Supported modes: OFF, HEAT, DRY, COOL
  • /ac_setpoint/<number> - This updates the "selected" temperature display on the UI. The number is a string representation like /ac_setpoint/13.5
Clone this wiki locally