Skip to content

2SmartCloud/2smart-cloud-esp32-ir-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2Smart TV Control

This is a device to control TV with infrared diode via ESP32 dev board (ESP-WROOM-32). All the NEC-commands from original IR TV remote control are defined in ir-control.h The device supports full integration with the mobile application 2Smart Cloud on IOS and Android.

The device firmware is developed based on the public 2Smart Cloud SDK for ESP32.

Configuration

Replace product_id in src/main.h file with your own Product ID from "Connection info" modal.

image

How to write firmware on device

Using Docker (Linux only)

  1. Download our bash script:

    curl https://raw.githubusercontent.com/2SmartCloud/2smart-cloud-cpp-sdk/master/utils/bin/firmware_install.sh > firmware_install.sh
    
  2. Make script executable:

    chmod +x firmware_install.sh
    
  3. Have connected device to your computer.

  4. Build and write the firmware

    ./firmware_install.sh write -d <PORT>
    

    or update existing firmware

    ./firmware_install.sh upload -d <PORT>
    

    full list of commands

    ./firmware_install.sh
    
  5. If everything is okay it should start in AP mode and blink once in a second.

Using installed requirements

  1. Need have: python (>= v3) installed. You can control it in terminal

    python --version
    

    platformio (>= v5.1.1)

    pip install -U platformio
    
  2. Have connected device to your computer.

  3. Device should be listed in /dev as one of this:

    (Linux)
    /dev/ttyUSB0
    
    (OSX)
    /dev/cu.SLAB_USBtoUART
    /dev/cu.usbserial-0001
    
  4. build and write

    pio run -t uploadfs
    pio run -t upload
    

    or just build

    pio run
    
  5. If everything is okay it should start in AP mode and blink once in a second.

If you have error "can't open device "/dev/ttyUSB0": Permission denied" follow Link https://qna.habr.com/q/526674

CLI guide https://docs.platformio.org/en/latest/core/userguide/index.html

Custom firmware

Feel free to fork this firmware and create you own products with custom functionality. Detailed instruction you could find in our blog.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages