mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-05 02:25:38 +00:00
add one more example
This commit is contained in:
@ -13,5 +13,5 @@ Do not add anything here, as it will overwritten with next rebuild.
|
||||
| [FAQ](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md) (15 total) | Here is a detailed list of questions you may ask. Some information from docs is repeated here. |
|
||||
| [Console/Script commands](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md) (225 total) | There are multiple console commands that allow you to automate your devices. Commands can be entered manually in command line, can be send by HTTP (just like in Tasmota), can be send by MQTT and also can be scripted. |
|
||||
| [Command Examples](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commandExamples.md) (6 total) | Here you can find some examples of console commands usage |
|
||||
| [Autoexec.bat examples (configs)](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md) (4 total) | Here you can find examples of autoexec.bat configs. The autoexec.bat file can be created in Web Application, under LittleFS tab, and is run every time device reboots (unless device enters safe mode/AP mode). The autoexec.bat file allows you to create more advanced configs, setup TuyaMCU mappings, etc |
|
||||
| [Autoexec.bat examples (configs)](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md) (5 total) | Here you can find examples of autoexec.bat configs. The autoexec.bat file can be created in Web Application, under LittleFS tab, and is run every time device reboots (unless device enters safe mode/AP mode). The autoexec.bat file allows you to create more advanced configs, setup TuyaMCU mappings, etc |
|
||||
| [Console/Script commands [Extended Edition]](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands-extended.md) (225 total) | More details on commands. |
|
||||
|
||||
@ -60,6 +60,30 @@ linkTuyaMCUOutputToChannel 2 val 2
|
||||
```
|
||||
|
||||
|
||||
[Configuration for controlling LED strip with IR receiver by TV Remote](https://www.elektroda.com/rtvforum/topic3944210.html)
|
||||
<br>
|
||||
```// You must set IRRecv role for one of the pins
|
||||
// IR driver will start itself automatically after reboot
|
||||
|
||||
// P21 role is Btn, a power button that works without scripting
|
||||
// set button hold/repeat/etc times
|
||||
SetButtonTimes 10 3 3
|
||||
// alias to turn off LED after 4 secs (repeating event with 1 repeat)
|
||||
alias add_turnoff_event addRepeatingEvent 4 1 led_enableAll 0
|
||||
// button events - 23, 22, etc are pin numbers
|
||||
addEventHandler OnHold 23 add_dimmer 10
|
||||
addEventHandler OnHold 22 add_dimmer -10
|
||||
addEventHandler OnDblClick 22 led_dimmer 5
|
||||
addEventHandler OnDblClick 23 led_dimmer 100
|
||||
addEventHandler OnClick 20 add_turnoff_event
|
||||
// IR events
|
||||
addEventHandler2 IR_Samsung 0x707 0x62 add_dimmer 10
|
||||
addEventHandler2 IR_Samsung 0x707 0x65 add_dimmer -10
|
||||
addEventHandler2 IR_Samsung 0x707 0x61 led_enableAll 0
|
||||
addEventHandler2 IR_Samsung 0x707 0x60 led_enableAll 1
|
||||
```
|
||||
|
||||
|
||||
[Configuration for Tuya ATORCH AT4P(WP/BW) Smartlife Energy monitor (BK7231N/C3BS/CH573F/BL0924)](https://www.elektroda.com/rtvforum/topic3941692.html)
|
||||
<br>
|
||||
```
|
||||
|
||||
19
docs/autoexecs/LED-strip-with-IR-receiver.bat
Normal file
19
docs/autoexecs/LED-strip-with-IR-receiver.bat
Normal file
@ -0,0 +1,19 @@
|
||||
// You must set IRRecv role for one of the pins
|
||||
// IR driver will start itself automatically after reboot
|
||||
|
||||
// P21 role is Btn, a power button that works without scripting
|
||||
// set button hold/repeat/etc times
|
||||
SetButtonTimes 10 3 3
|
||||
// alias to turn off LED after 4 secs (repeating event with 1 repeat)
|
||||
alias add_turnoff_event addRepeatingEvent 4 1 led_enableAll 0
|
||||
// button events - 23, 22, etc are pin numbers
|
||||
addEventHandler OnHold 23 add_dimmer 10
|
||||
addEventHandler OnHold 22 add_dimmer -10
|
||||
addEventHandler OnDblClick 22 led_dimmer 5
|
||||
addEventHandler OnDblClick 23 led_dimmer 100
|
||||
addEventHandler OnClick 20 add_turnoff_event
|
||||
// IR events
|
||||
addEventHandler2 IR_Samsung 0x707 0x62 add_dimmer 10
|
||||
addEventHandler2 IR_Samsung 0x707 0x65 add_dimmer -10
|
||||
addEventHandler2 IR_Samsung 0x707 0x61 led_enableAll 0
|
||||
addEventHandler2 IR_Samsung 0x707 0x60 led_enableAll 1
|
||||
@ -12,6 +12,10 @@
|
||||
"file": "autoexecs/TH06-thermometer-hygrometer.bat"
|
||||
},
|
||||
{
|
||||
"title": "[Configuration for controlling LED strip with IR receiver by TV Remote](https://www.elektroda.com/rtvforum/topic3944210.html)",
|
||||
"file": "autoexecs/LED-strip-with-IR-receiver.bat"
|
||||
},
|
||||
{
|
||||
"title": "[Configuration for Tuya ATORCH AT4P(WP/BW) Smartlife Energy monitor (BK7231N/C3BS/CH573F/BL0924)](https://www.elektroda.com/rtvforum/topic3941692.html)",
|
||||
"file": "autoexecs/ATORCH-AT4P-Smartlife-Energy-Monitor.bat"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user