Skip to content

An IR signal sender using ESP-WROOM-02.

License

Notifications You must be signed in to change notification settings

obono/ESP8266SmartRemocon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266SmartRemocon

Overvier

Instruction

An IR signal sender using ESP-WROOM-02.

This works as a web server and can send IR signal via Web APIs. The base URL is http://myesp8266.local:8080 as default and the method of each API is GET.

Path and query parameters
/ir/aircon?power=...&mode=...&temp=...fan=...&swing=... Send IR signal to control an air conditioner
/ir/sony?value=...&bits=...&repeat=... Send IR signal for Sony devices
/ir/panasonic?value=...&bits=...&repeat=... Send IR signal for Panasonic devices
/ir/nec?value=...&bits=...&repeat=... Send IR signal for NEC devices
/temp Get temperature in Celsius
/press Get pressure in Pascals
/version Get version information
  • Available query parameters
    • power: off or on
    • mode: auto (default), heat, cool, dry, or fan
    • temp: integer 1830 (default is 24)
    • fan: auto (default), level1, level2, level3, level4, level5, or silent
    • swing: swing (default), up, upmiddle, middle, downmiddle, or down
    • value: hexadecimal (ex) A50
    • bits: integer 164 (default is 20 for Sony / 48 for Panasonic / 32 for NEC)
    • repeat: integer 08 (defualt is 2 for Sony / 0 for otherwise)

Hardware

Components

Schematic

Click to expand

Example

Picture

Software MIT Licensed

Build environment

Clone the source code and open the project file "ESP8266SmartRemocon.ino" with Arduino IDE.

You must import ESP8266 board.

This sketch depends on following libraries. (You can add these by library manager)

You must modify "credential.h" according to your situation.

  • HOSTNAME and PORT if you like.
  • STA_SSID and STA_PASSWORD according to your Wi-Fi access point setting.
    • If you'd like to assign static IP address to the device, uncomment #ifdef STATIC_ADDRESS and edit staticIP, gateway, subnet and dns.

You can build the source code with following configuration.

  • Board: "Generic ESP8266 Module"
  • Builtin Led: "2"
  • Upload Speed: "115200"
  • CPU Frequency: "80 MHz"
  • Crystal Frequency: "26 MHz"
  • Flash Size: "4MB (FS:3MB OTA:~512KB"
  • Flash Mode: "DOUT (compatible)"
  • Flash Frequency: "40 MHz"
  • Reset Method: "dtr (aka modemcu)"
  • Debug port: "Disabled"
  • Debug Level: "None"
  • lwIP Variant: "v2 Lower Memory"
  • VTables: "Flash"
  • Exceptions: "Legacy (new can return nullptr)"
  • Erase Flash: "Only Sketch"
  • Espressif FW: "nonos-sdk 2.2.1+119 (191122)"
  • SSL Support: "Basic SSL ciphers (lower ROM use)"

Then, you can transfer the firmware binary data to ESP-WROOM-02 by any means.

(Optional) Static HTML files

The top level path of URL is mapped to the root directory of file system. Therefore you can customize static HTML files if you transfer the file system binary data.

I provide the sample HTML files that can call /ir/aircon API with GUI. (See "data" directory)

HTML Preview

License

These codes are licensed under MIT License.

References