From fe23b75847bb1eff0dc05f5f61616808c0322876 Mon Sep 17 00:00:00 2001 From: Tester23 Date: Wed, 4 Oct 2023 15:10:38 +0200 Subject: [PATCH] update docs, add bridge info --- docs/README.md | 2 +- docs/channelTypes.md | 1 + docs/drivers.md | 2 +- docs/json/channelTypes.json | 8 ++++++++ docs/json/drivers.json | 2 +- src/driver/drv_main.c | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index 9f6fdc2b7..d324f780f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,7 +17,7 @@ Do not add anything here, as it will overwritten with next rebuild. | [Flags](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md) (43 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) (41 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) (29 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) (43 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.
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) (44 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.
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) (30 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) (280 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 | diff --git a/docs/channelTypes.md b/docs/channelTypes.md index 450b5a8e6..0e4018446 100644 --- a/docs/channelTypes.md +++ b/docs/channelTypes.md @@ -47,4 +47,5 @@ Do not add anything here, as it will overwritten with next rebuild. | Toggle_Inv | Like a Toggle, but inverted states. | | OffOnRemember | Radio buttons with 3 options: off, on and 'remember'. This is used for TuyaMCU memory state | | Voltage_div100 | For TuyaMCU power metering. Not used for BL09** and CSE** sensors. Divider is used by TuyaMCU, because TuyaMCU sends always values as integers so we have to divide them before displaying on UI | +| Temperature_div2 | Just like ChType_Temperature_div10, but for multiplied by 0.5. | | Max | This is the current total number of available channel types. | diff --git a/docs/drivers.md b/docs/drivers.md index 4c9e6fc9a..fe7f753ed 100644 --- a/docs/drivers.md +++ b/docs/drivers.md @@ -47,4 +47,4 @@ Do not add anything here, as it will overwritten with next rebuild. | SGP | SGP Air Quality sensor with I2C interface.
See also [SGP on forum](https://www.elektroda.com/rtvforum/find.php?q=SGP). | | ShiftRegister | ShiftRegisterShiftRegisterShiftRegisterShiftRegister.
See also [ShiftRegister on forum](https://www.elektroda.com/rtvforum/find.php?q=ShiftRegister). | | Battery | Custom mechanism to measure battery level with ADC and an optional relay. See [example here](https://www.elektroda.com/rtvforum/topic3959103.html).
See also [Battery on forum](https://www.elektroda.com/rtvforum/find.php?q=Battery). | -| Bridge | TODO.
See also [Bridge on forum](https://www.elektroda.com/rtvforum/find.php?q=Bridge). | +| Bridge | A bridge relay driver, added for [TONGOU TO-Q-SY1-JWT Din Rail Switch](https://www.elektroda.com/rtvforum/topic3934580.html). See linked topic for info.
See also [Bridge on forum](https://www.elektroda.com/rtvforum/find.php?q=Bridge). | diff --git a/docs/json/channelTypes.json b/docs/json/channelTypes.json index a4dcd64a6..740a2b5d2 100644 --- a/docs/json/channelTypes.json +++ b/docs/json/channelTypes.json @@ -335,6 +335,14 @@ "file": "new_pins.h", "driver": "" }, + { + "name": "Temperature_div2", + "title": "TODO", + "descr": "Just like ChType_Temperature_div10, but for multiplied by 0.5.", + "enum": "ChType_Temperature_div2", + "file": "new_pins.h", + "driver": "" + }, { "name": "Max", "title": "TODO", diff --git a/docs/json/drivers.json b/docs/json/drivers.json index e6dbb98b6..d4aca9648 100644 --- a/docs/json/drivers.json +++ b/docs/json/drivers.json @@ -242,7 +242,7 @@ { "name": "Bridge", "title": "TODO", - "descr": "TODO", + "descr": "A bridge relay driver, added for [TONGOU TO-Q-SY1-JWT Din Rail Switch](https://www.elektroda.com/rtvforum/topic3934580.html). See linked topic for info.", "requires": "" } ] \ No newline at end of file diff --git a/src/driver/drv_main.c b/src/driver/drv_main.c index 837449689..946131ec8 100644 --- a/src/driver/drv_main.c +++ b/src/driver/drv_main.c @@ -313,7 +313,7 @@ static driver_t g_drivers[] = { #ifdef ENABLE_DRIVER_BRIDGE //drvdetail:{"name":"Bridge", //drvdetail:"title":"TODO", - //drvdetail:"descr":"TODO", + //drvdetail:"descr":"A bridge relay driver, added for [TONGOU TO-Q-SY1-JWT Din Rail Switch](https://www.elektroda.com/rtvforum/topic3934580.html). See linked topic for info.", //drvdetail:"requires":""} { "Bridge", Bridge_driver_Init, NULL, NULL, Bridge_driver_QuickFrame, Bridge_driver_DeInit, Bridge_driver_OnChannelChanged, false } #endif