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.
Replace product_id
in src/main.h file with your own Product ID from "Connection info" modal.
-
Download our bash script:
curl https://raw.githubusercontent.com/2SmartCloud/2smart-cloud-cpp-sdk/master/utils/bin/firmware_install.sh > firmware_install.sh
-
Make script executable:
chmod +x firmware_install.sh
-
Have connected device to your computer.
-
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
-
If everything is okay it should start in AP mode and blink once in a second.
-
Need have:
python
(>= v3) installed. You can control it in terminalpython --version
platformio
(>= v5.1.1)pip install -U platformio
-
Have connected device to your computer.
-
Device should be listed in /dev as one of this:
(Linux) /dev/ttyUSB0 (OSX) /dev/cu.SLAB_USBtoUART /dev/cu.usbserial-0001
-
build and write
pio run -t uploadfs pio run -t upload
or just build
pio run
-
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
Feel free to fork this firmware and create you own products with custom functionality. Detailed instruction you could find in our blog.