This commit is contained in:
openshwprojects
2023-04-24 08:15:57 +02:00
parent 0068f3cf3b
commit 3f068400c5
8 changed files with 25 additions and 5 deletions

View File

@ -17,11 +17,11 @@ Do not add anything here, as it will overwritten with next rebuild.
| [Flags](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md) (40 total) | Flags are global and allows you to alter behaviour of the device. |
| [Drivers](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/drivers.md) (35 total) | Drivers allows you to control certain peripherals or enable certain features that are off by default. |
| [Script constants](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/constants.md) (24 total) | Every console command that takes an integer argument supports certain constant expansion. |
| [Channel Types](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/channelTypes.md) (35 total) | Channel types are often not required and don't have to be configured, but in some cases they are required for better device control from OpenBeken web panel. Channel types describes the kind of value stored in channel, for example, if you have a Tuya Fan Controller with 3 speeds control, you can set the channel type to LowMidHigh and it will display the correct UI radiobutton on OpenBeken panel.<br>Some channels have '_div10' or '_div100' sufixes. This is for TuyaMCU. This is needed because TuyaMCU sends values as integers, so it sends, for example, 215 for 21.5C temperature, and we store it internally as 215 and only convert to float for display. |
| [Channel Types](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/channelTypes.md) (36 total) | Channel types are often not required and don't have to be configured, but in some cases they are required for better device control from OpenBeken web panel. Channel types describes the kind of value stored in channel, for example, if you have a Tuya Fan Controller with 3 speeds control, you can set the channel type to LowMidHigh and it will display the correct UI radiobutton on OpenBeken panel.<br>Some channels have '_div10' or '_div100' sufixes. This is for TuyaMCU. This is needed because TuyaMCU sends values as integers, so it sends, for example, 215 for 21.5C temperature, and we store it internally as 215 and only convert to float for display. |
| [FAQ](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md) (27 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) (251 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. |
| [Console/Script commands](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md) (252 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) (10 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) (14 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 |
| [MQTT Topics](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/mqttTopics.md) (25 total) | MQTT topic names and content for incoming and ougoing OBK MQTT publishes |
| [Script examples](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/scriptExamples.md) (5 total) | Scripts can be put in autoexec.bat and then they will start automatically on reboot, you can also put script in other LittleFS file and use startScript [fileName] [Label] command to run them. From the firmware point of view, scripts and autoexecs are basically the same thing. There is, however, a little bit more advanced system of execution for scripts which can be written in a form of scripts threads that run over time, can have delays within then, conditional checks and jumps. |
| [Console/Script commands [Extended Edition]](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands-extended.md) (251 total) | More details on commands. |
| [Console/Script commands [Extended Edition]](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands-extended.md) (252 total) | More details on commands. |

View File

@ -39,4 +39,5 @@ Do not add anything here, as it will overwritten with next rebuild.
| OffDimBright | A 3 options radio button for lighting control. |
| LowMidHighHighest | Like LowMidHigh, but with 4 options. Some of TuyaMCU fans might require that. |
| OffLowMidHighHighest | Like LowMidHigh, but with 5 options. Some of TuyaMCU fans might require that. |
| Custom | A custom channel type that is still send to HA. |
| Max | This is the current total number of available channel types. |

View File

@ -34,6 +34,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| restart | | Reboots the module | File: cmnds/cmd_main.c<br/>Function: CMD_Restart |
| reboot | | Same as restart. Needed for bkWriter 1.60 which sends 'reboot' cmd before trying to get bus | File: cmnds/cmd_main.c<br/>Function: CMD_Restart |
| clearConfig | | Clears all config, including WiFi data | File: cmnds/cmd_main.c<br/>Function: CMD_ClearConfig |
| clearIO | | Clears all pins setting, channels settings | File: cmnds/cmd_main.c<br/>Function: CMD_ClearIO |
| clearAll | | Clears config and all remaining features, like runtime scripts, events, etc | File: cmnds/cmd_main.c<br/>Function: CMD_ClearAll |
| DeepSleep | [Seconds] | Starts deep sleep for given amount of seconds. Please remember that there is also a separate command, called PinDeepSleep, which is not using a timer, but a GPIO to wake up device. | File: cmnds/cmd_main.c<br/>Function: CMD_DeepSleep |
| PowerSave | [Optional 1 or 0, by default 1 is assumed] | Enables dynamic power saving mode on BK and W600. You can also disable power saving with PowerSave 0. | File: cmnds/cmd_main.c<br/>Function: CMD_PowerSave |

View File

@ -37,6 +37,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| restart | | Reboots the module |
| reboot | | Same as restart. Needed for bkWriter 1.60 which sends 'reboot' cmd before trying to get bus |
| clearConfig | | Clears all config, including WiFi data |
| clearIO | | Clears all pins setting, channels settings |
| clearAll | | Clears config and all remaining features, like runtime scripts, events, etc |
| DeepSleep | [Seconds] | Starts deep sleep for given amount of seconds. Please remember that there is also a separate command, called PinDeepSleep, which is not using a timer, but a GPIO to wake up device. |
| PowerSave | [Optional 1 or 0, by default 1 is assumed] | Enables dynamic power saving mode on BK and W600. You can also disable power saving with PowerSave 0. |

View File

@ -271,6 +271,14 @@
"file": "new_pins.h",
"driver": ""
},
{
"name": "Custom",
"title": "TODO",
"descr": "A custom channel type that is still send to HA.",
"enum": "ChType_Custom",
"file": "new_pins.h",
"driver": ""
},
{
"name": "Max",
"title": "TODO",

View File

@ -260,6 +260,15 @@
"requires": "",
"examples": ""
},
{
"name": "clearIO",
"args": "",
"descr": "Clears all pins setting, channels settings",
"fn": "CMD_ClearIO",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "clearAll",
"args": "",

View File

@ -3,7 +3,7 @@
{
"topic": "OBK_DEV_NAME/INDEX/get",
"example": "1",
"description": "send when a given channel is changed. INDEX is a number representing channel index. Some channels are not published by default, see flags. You can have any variable in channel, even a custom, fully scriptable counter"
"description": "send when a given channel is changed. INDEX is a number representing channel index. Most of channels are not published by default. See flags to change it. If you want given channel to be published, you can also change its channel type in the Web App, just select one that fits your needs or just a generic 'Custom' type. You can have any variable in channel, even a custom, fully scriptable counter."
},
{
"topic": "OBK_DEV_NAME/connected",

View File

@ -6,7 +6,7 @@ Hint: in HA, you can use MQTT wildcard to listen to multiple publishes. OBK_DEV_
Publishes send by OBK device:
| Topic | Sample Value | Description |
|:------------- |:------------- | -----:|
| OBK_DEV_NAME/INDEX/get | 1 | send when a given channel is changed. INDEX is a number representing channel index. Some channels are not published by default, see flags. You can have any variable in channel, even a custom, fully scriptable counter |
| OBK_DEV_NAME/INDEX/get | 1 | send when a given channel is changed. INDEX is a number representing channel index. Most of channels are not published by default. See flags to change it. If you want given channel to be published, you can also change its channel type in the Web App, just select one that fits your needs or just a generic 'Custom' type. You can have any variable in channel, even a custom, fully scriptable counter. |
| OBK_DEV_NAME/connected | online | Sent on connect. |
| OBK_DEV_NAME/sockets | 5 | Send on connect and every N seconds (default: 60, if enabled) |
| OBK_DEV_NAME/rssi | -70 | Send on connect and every N seconds (default: 60, if enabled) |