fix and update docs

This commit is contained in:
openshwprojects
2023-03-30 11:05:57 +02:00
parent 8a951bdf44
commit 3e994d8378
9 changed files with 191 additions and 129 deletions

View File

@@ -7,12 +7,12 @@ Do not add anything here, as it will overwritten with next rebuild.
|:------------- |------:|
| [IO/Pin Roles](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/ioRoles.md) (65 total) | You can set pin roles in 'Configure Module' section or use one of predefined templates in Web App. For each pin, you also set coresponding channel value. This is needed for modules with multiple relays. If you have 3 relays and 3 buttons, you need to use channel values like 1, 2, and 3. Just enter '1' in the text field, etc. |
| [Flags](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md) (38 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) (29 total) | Drivers allows you to control certain peripherals or enable certain features that are off by default. |
| [Drivers](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/drivers.md) (30 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) (21 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. |
| [FAQ](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md) (26 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) (235 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) (237 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) (8 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 |
| [Script examples](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/scriptExamples.md) (4 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 advananced 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) (235 total) | More details on commands. |
| [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 advananced 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) (237 total) | More details on commands. |

View File

@@ -46,9 +46,6 @@ Do not add anything here, as it will overwritten with next rebuild.
| SetStartValue | [Channel][Value] | Sets the startup value for a channel. Used for start values for relays. Use 1 for High, 0 for low and -1 for 'remember last state' | File: cmnds/cmd_main.c<br/>Function: CMD_SetStartValue |
| OpenAP | | Temporarily disconnects from programmed WiFi network and opens Access Point | File: cmnds/cmd_main.c<br/>Function: CMD_OpenAP |
| SafeMode | | Forces device reboot into safe mode (open ap with disabled drivers) | File: cmnds/cmd_main.c<br/>Function: CMD_SafeMode |
| SPITestMAX7219 | CMD_SPITestMAX7219 | | File: cmnds/cmd_main.c<br/>Function: NULL); |
| SPITestFlash_ReadID | CMD_SPITestFlash_ReadID | | File: cmnds/cmd_main.c<br/>Function: NULL); |
| SPITestFlash_ReadData | CMD_SPITestFlash_ReadData | | File: cmnds/cmd_main.c<br/>Function: NULL); |
| led_dimmer | [Value] | set output dimmer 0..100 | File: cmnds/cmd_newLEDDriver.c<br/>Function: dimmer |
| Dimmer | [Value] | Alias for led_dimmer | File: cmnds/cmd_newLEDDriver.c<br/>Function: dimmer |
| add_dimmer | [Value][AddMode] | Adds a given value to current LED dimmer. AddMode 0 just adds a value (with a clamp to [0,100]), AddMode 1 will wrap around values (going under 0 goes to 100, going over 100 goes to 0), AddMode 2 will ping-pong value (going to 100 starts going back from 100 to 0, and again, going to 0 starts going up). | File: cmnds/cmd_newLEDDriver.c<br/>Function: add_dimmer |
@@ -109,13 +106,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| lfs_test3 | [FileName] | Tests the LFS file reading feature. | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_lfs_test3 |
| Battery_Setup | [int][int][float][int][int] | measure battery based on ADC args minbatt and maxbatt in mv. optional V_divider(2), Vref(default 2400) and ADC bits(4096) and <br/>e.g.:Battery_Setup 1500 3000 2 2400 4096 | File: drv/drv_battery.c<br/>Function: Battery_Setup |
| Battery_cycle | [int] | change cycle of measurement by default every 10 seconds<br/>e.g.:Battery_Setup 60 | File: drv/drv_battery.c<br/>Function: Battery_cycle |
| PowerSet | | Sets current power value for calibration | File: driver/drv_bl0937.c<br/>Function: BL0937_PowerSet |
| VoltageSet | | Sets current V value for calibration | File: driver/drv_bl0937.c<br/>Function: BL0937_VoltageSet |
| CurrentSet | | Sets current I value for calibration | File: driver/drv_bl0937.c<br/>Function: BL0937_CurrentSet |
| PREF | | Sets the calibration multiplier | File: driver/drv_bl0937.c<br/>Function: BL0937_PowerRef |
| VREF | | Sets the calibration multiplier | File: driver/drv_bl0937.c<br/>Function: BL0937_VoltageRef |
| IREF | | Sets the calibration multiplier | File: driver/drv_bl0937.c<br/>Function: BL0937_CurrentRef |
| PowerMax | [limit] | Sets Maximum power value measurement limiter | File: driver/drv_bl0937.c<br/>Function: BL0937_PowerMax |
| PowerMax | BL0937_PowerMax | | File: driver/drv_bl0937.c<br/>Function: NULL); |
| EnergyCntReset | | Resets the total Energy Counter, the one that is usually kept after device reboots. After this commands, the counter will start again from 0. | File: driver/drv_bl_shared.c<br/>Function: BL09XX_ResetEnergyCounter |
| SetupEnergyStats | [Enable1or0][SampleTime][SampleCount] | Setup Energy Statistic Parameters: [enable<0|1>] [sample_time<10..900>] [sample_count<10..180>] | File: driver/drv_bl_shared.c<br/>Function: BL09XX_SetupEnergyStatistic |
| ConsumptionThreshold | [FloatValue] | Setup value for automatic save of consumption data [1..100] | File: driver/drv_bl_shared.c<br/>Function: BL09XX_SetupConsumptionThreshold |
@@ -133,11 +124,12 @@ Do not add anything here, as it will overwritten with next rebuild.
| setButtonLabel | [ButtonIndex][Label] | Sets the label of custom scriptable HTTP page button | File: driver/drv_httpButtons.c<br/>Function: CMD_setButtonLabel |
| setButtonEnabled | [ButtonIndex][1or0] | Sets the visibility of custom scriptable HTTP page button | File: driver/drv_httpButtons.c<br/>Function: CMD_setButtonEnabled |
| IRSend | [PROT-ADDR-CMD-REP] | Sends IR commands in the form PROT-ADDR-CMD-REP, e.g. NEC-1-1A-0 | File: driver/drv_ir.cpp<br/>Function: IR_Send_Cmd |
| IRAC | IR_AC_Cmd | | File: driver/drv_ir.cpp<br/>Function: NULL); |
| IREnable | [Str][1or0] | Enable/disable aspects of IR. IREnable RXTX 0/1 - enable Rx whilst Tx. IREnable [protocolname] 0/1 - enable/disable a specified protocol | File: driver/drv_ir.cpp<br/>Function: IR_Enable |
| startDriver | [DriverName] | Starts driver | File: driver/drv_main.c<br/>Function: DRV_Start |
| stopDriver | [DriverName] | Stops driver | File: driver/drv_main.c<br/>Function: DRV_Stop |
| MAX72XX_Setup | [Value] | Sets the maximum current for LED driver. | File: driver/drv_sm2135.c<br/>Function: SM2135_Current |
| MAX72XX_Scroll | DRV_MAX72XX_Scroll | | File: driver/drv_max72xx_single.c<br/>Function: NULL); |
| MAX72XX_Print | DRV_MAX72XX_Print | | File: driver/drv_max72xx_single.c<br/>Function: NULL); |
| ntp_timeZoneOfs | [Value] | Sets the time zone offset in hours. Also supports HH:MM syntax if you want to specify value in minutes. For negative values, use -HH:MM syntax, for example -5:30 will shift time by 5 hours and 30 minutes negative. | File: driver/drv_ntp.c<br/>Function: NTP_SetTimeZoneOfs |
| ntp_setServer | [ServerIP] | Sets the NTP server | File: driver/drv_ntp.c<br/>Function: NTP_SetServer |
| ntp_info | | Display NTP related settings | File: driver/drv_ntp.c<br/>Function: NTP_Info |
@@ -149,6 +141,12 @@ Do not add anything here, as it will overwritten with next rebuild.
| toggler_set | [Value] | Sets the VALUE of given output. Handles toggler_set0, toggler_set1, etc. The last digit after command name is changed to slot index. | File: driver/drv_pwmToggler.c<br/>Function: Toggler_SetX |
| toggler_channel | [ChannelIndex] | handles toggler_channel0, toggler_channel1. Sets channel linked to given toggler slot. | File: driver/drv_pwmToggler.c<br/>Function: Toggler_ChannelX |
| toggler_name | | Handles toggler_name0, toggler_name1, etc. Sets the name of a toggler for GUI. | File: driver/drv_pwmToggler.c<br/>Function: Toggler_NameX |
| VoltageSet | CalibrateVoltage | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| CurrentSet | CalibrateCurrent | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| PowerSet | CalibratePower | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| VREF | SetVoltageCal | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| IREF | SetCurrentCal | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| PREF | SetPowerCal | | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| SHT_cycle | [int] | change cycle of measurement by default every 10 seconds 0 to deactivate<br/>e.g.:SHT_Cycle 60 | File: drv/drv_sht3x.c<br/>Function: SHT_cycle |
| SHT_Calibrate | | Calibrate the SHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 | File: driver/drv_sht3x.c<br/>Function: SHT3X_Calibrate |
| SHT_MeasurePer | | Retrieve Periodical measurement for SHT<br/>e.g.:SHT_Measure | File: driver/drv_sht3x.c<br/>Function: SHT3X_MeasurePer |
@@ -170,10 +168,14 @@ Do not add anything here, as it will overwritten with next rebuild.
| SM2235_RGBCW | [HexColor] | Don't use it. It's for direct access of SM2235 driver. You don't need it because LED driver automatically calls it, so just use led_basecolor_rgb | File: driver/drv_sm2235.c<br/>Function: SM2235_RGBCW |
| SM2235_Map | [Ch0][Ch1][Ch2][Ch3][Ch4] | Maps the RGBCW values to given indices of SM2235 channels. This is because SM2235 channels order is not the same for some devices. Some devices are using RGBCW order and some are using GBRCW, etc, etc. Example usage: SM2235_Map 0 1 2 3 4 | File: driver/drv_sm2235.c<br/>Function: SM2235_Map |
| SM2235_Current | [Value] | Sets the maximum current for LED driver. | File: driver/drv_sm2235.c<br/>Function: SM2235_Current |
| SPITestFlash_ReadID | CMD_SPITestFlash_ReadID | | File: cmnds/cmd_main.c<br/>Function: NULL); |
| SPITestFlash_WriteStr | CMD_SPITestFlash_WriteStr | | File: driver/drv_spi_flash.c<br/>Function: NULL); |
| SPITestFlash_Erase | CMD_SPITestFlash_Erase | | File: driver/drv_spi_flash.c<br/>Function: NULL); |
| SPITestFlash_ReadData | CMD_SPITestFlash_ReadData | | File: cmnds/cmd_main.c<br/>Function: NULL); |
| obkDeviceList | | Generate the SSDP list of OpenBeken devices found on the network. | File: driver/drv_ssdp.c<br/>Function: Cmd_obkDeviceList |
| DGR_SendPower | [GroupName][ChannelValues][ChannelsCount] | Sends a POWER message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. | File: driver/drv_tasmotaDeviceGroups.c<br/>Function: CMD_DGR_SendPower |
| DGR_SendBrightness | [GroupName][Brightness] | Sends a Brightness message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. | File: driver/drv_tasmotaDeviceGroups.c<br/>Function: CMD_DGR_SendBrightness |
| DGR_SendRGBCW | [GroupName][HexRGBCW] | Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. | File: driver/drv_tasmotaDeviceGroups.c<br/>Function: CMD_DGR_SendRGBCW |
| DGR_SendRGBCW | [GroupName][HexRGBCW] | Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. You can use this command in two ways, first is like DGR_SendRGBCW GroupName 255 255 0, etc, second is DGR_SendRGBCW GroupName FF00FF00 etc etc. | File: driver/drv_tasmotaDeviceGroups.c<br/>Function: CMD_DGR_SendRGBCW |
| DGR_SendFixedColor | [GroupName][TasColorIndex] | Sends a FixedColor message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. | File: driver/drv_tasmotaDeviceGroups.c<br/>Function: CMD_DGR_SendFixedColor |
| SetupTestPower | | NULL | File: driver/drv_test_drivers.c<br/>Function: TestPower_Setup |
| TM1637_Clear | CMD_TM1637_Clear | | File: driver/drv_tm1637.c<br/>Function: NULL); |

View File

@@ -46,9 +46,6 @@ Do not add anything here, as it will overwritten with next rebuild.
| SetStartValue | [Channel][Value] | Sets the startup value for a channel. Used for start values for relays. Use 1 for High, 0 for low and -1 for 'remember last state' |
| OpenAP | | Temporarily disconnects from programmed WiFi network and opens Access Point |
| SafeMode | | Forces device reboot into safe mode (open ap with disabled drivers) |
| SPITestMAX7219 | CMD_SPITestMAX7219 | |
| SPITestFlash_ReadID | CMD_SPITestFlash_ReadID | |
| SPITestFlash_ReadData | CMD_SPITestFlash_ReadData | |
| led_dimmer | [Value] | set output dimmer 0..100 |
| Dimmer | [Value] | Alias for led_dimmer |
| add_dimmer | [Value][AddMode] | Adds a given value to current LED dimmer. AddMode 0 just adds a value (with a clamp to [0,100]), AddMode 1 will wrap around values (going under 0 goes to 100, going over 100 goes to 0), AddMode 2 will ping-pong value (going to 100 starts going back from 100 to 0, and again, going to 0 starts going up). |
@@ -109,13 +106,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| lfs_test3 | [FileName] | Tests the LFS file reading feature. |
| Battery_Setup | [int][int][float][int][int] | measure battery based on ADC args minbatt and maxbatt in mv. optional V_divider(2), Vref(default 2400) and ADC bits(4096) and <br/>e.g.:Battery_Setup 1500 3000 2 2400 4096 |
| Battery_cycle | [int] | change cycle of measurement by default every 10 seconds<br/>e.g.:Battery_Setup 60 |
| PowerSet | | Sets current power value for calibration |
| VoltageSet | | Sets current V value for calibration |
| CurrentSet | | Sets current I value for calibration |
| PREF | | Sets the calibration multiplier |
| VREF | | Sets the calibration multiplier |
| IREF | | Sets the calibration multiplier |
| PowerMax | [limit] | Sets Maximum power value measurement limiter |
| PowerMax | BL0937_PowerMax | |
| EnergyCntReset | | Resets the total Energy Counter, the one that is usually kept after device reboots. After this commands, the counter will start again from 0. |
| SetupEnergyStats | [Enable1or0][SampleTime][SampleCount] | Setup Energy Statistic Parameters: [enable<0|1>] [sample_time<10..900>] [sample_count<10..180>] |
| ConsumptionThreshold | [FloatValue] | Setup value for automatic save of consumption data [1..100] |
@@ -133,11 +124,12 @@ Do not add anything here, as it will overwritten with next rebuild.
| setButtonLabel | [ButtonIndex][Label] | Sets the label of custom scriptable HTTP page button |
| setButtonEnabled | [ButtonIndex][1or0] | Sets the visibility of custom scriptable HTTP page button |
| IRSend | [PROT-ADDR-CMD-REP] | Sends IR commands in the form PROT-ADDR-CMD-REP, e.g. NEC-1-1A-0 |
| IRAC | IR_AC_Cmd | |
| IREnable | [Str][1or0] | Enable/disable aspects of IR. IREnable RXTX 0/1 - enable Rx whilst Tx. IREnable [protocolname] 0/1 - enable/disable a specified protocol |
| startDriver | [DriverName] | Starts driver |
| stopDriver | [DriverName] | Stops driver |
| MAX72XX_Setup | [Value] | Sets the maximum current for LED driver. |
| MAX72XX_Scroll | DRV_MAX72XX_Scroll | |
| MAX72XX_Print | DRV_MAX72XX_Print | |
| ntp_timeZoneOfs | [Value] | Sets the time zone offset in hours. Also supports HH:MM syntax if you want to specify value in minutes. For negative values, use -HH:MM syntax, for example -5:30 will shift time by 5 hours and 30 minutes negative. |
| ntp_setServer | [ServerIP] | Sets the NTP server |
| ntp_info | | Display NTP related settings |
@@ -149,6 +141,12 @@ Do not add anything here, as it will overwritten with next rebuild.
| toggler_set | [Value] | Sets the VALUE of given output. Handles toggler_set0, toggler_set1, etc. The last digit after command name is changed to slot index. |
| toggler_channel | [ChannelIndex] | handles toggler_channel0, toggler_channel1. Sets channel linked to given toggler slot. |
| toggler_name | | Handles toggler_name0, toggler_name1, etc. Sets the name of a toggler for GUI. |
| VoltageSet | CalibrateVoltage | |
| CurrentSet | CalibrateCurrent | |
| PowerSet | CalibratePower | |
| VREF | SetVoltageCal | |
| IREF | SetCurrentCal | |
| PREF | SetPowerCal | |
| SHT_cycle | [int] | change cycle of measurement by default every 10 seconds 0 to deactivate<br/>e.g.:SHT_Cycle 60 |
| SHT_Calibrate | | Calibrate the SHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 |
| SHT_MeasurePer | | Retrieve Periodical measurement for SHT<br/>e.g.:SHT_Measure |
@@ -170,10 +168,14 @@ Do not add anything here, as it will overwritten with next rebuild.
| SM2235_RGBCW | [HexColor] | Don't use it. It's for direct access of SM2235 driver. You don't need it because LED driver automatically calls it, so just use led_basecolor_rgb |
| SM2235_Map | [Ch0][Ch1][Ch2][Ch3][Ch4] | Maps the RGBCW values to given indices of SM2235 channels. This is because SM2235 channels order is not the same for some devices. Some devices are using RGBCW order and some are using GBRCW, etc, etc. Example usage: SM2235_Map 0 1 2 3 4 |
| SM2235_Current | [Value] | Sets the maximum current for LED driver. |
| SPITestFlash_ReadID | CMD_SPITestFlash_ReadID | |
| SPITestFlash_WriteStr | CMD_SPITestFlash_WriteStr | |
| SPITestFlash_Erase | CMD_SPITestFlash_Erase | |
| SPITestFlash_ReadData | CMD_SPITestFlash_ReadData | |
| obkDeviceList | | Generate the SSDP list of OpenBeken devices found on the network. |
| DGR_SendPower | [GroupName][ChannelValues][ChannelsCount] | Sends a POWER message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. |
| DGR_SendBrightness | [GroupName][Brightness] | Sends a Brightness message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. |
| DGR_SendRGBCW | [GroupName][HexRGBCW] | Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. |
| DGR_SendRGBCW | [GroupName][HexRGBCW] | Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. You can use this command in two ways, first is like DGR_SendRGBCW GroupName 255 255 0, etc, second is DGR_SendRGBCW GroupName FF00FF00 etc etc. |
| DGR_SendFixedColor | [GroupName][TasColorIndex] | Sends a FixedColor message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. |
| SetupTestPower | | NULL |
| TM1637_Clear | CMD_TM1637_Clear | |

View File

@@ -10,9 +10,9 @@ Do not add anything here, as it will overwritten with next rebuild.
| TuyaMCU | TuyaMCU is a protocol used for communication between WiFI module and external MCU. This protocol is using usually RX1/TX1 port of BK chips. See [TuyaMCU dimmer example](https://www.elektroda.com/rtvforum/topic3929151.html), see [TH06 LCD humidity/temperature sensor example](https://www.elektroda.com/rtvforum/topic3942730.html), see [fan controller example](https://www.elektroda.com/rtvforum/topic3908093.html), see [simple switch example](https://www.elektroda.com/rtvforum/topic3906443.html) |
| tmSensor | tmSensor must be used only when TuyaMCU is already started. tmSensor is a TuyaMcu Sensor, it's used for Low Power TuyaMCU communication on devices like TuyaMCU door sensor, or TuyaMCU humidity sensor. After device reboots, tmSensor uses TuyaMCU to request data update from the sensor and reports it on MQTT. Then MCU turns off WiFi module again and goes back to sleep. See an [example door sensor here](https://www.elektroda.com/rtvforum/topic3914412.html). |
| NTP | NTP driver is required to get current time and date from web. Without it, there is no correct datetime. |
| HTTPButtons | This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them |
| TESTPOWER | This is a fake POWER measuring socket driver, only for testing |
| TESTLED | This is a fake I2C LED driver, only for testing |
| HTTPButtons | This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them |
| I2C | Generic I2C, not used for LED drivers, but may be useful for displays or port expanders. Supports both hardware and software I2C. |
| BL0942 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [LSPA9 teardown example](https://www.elektroda.com/rtvforum/topic3887748.html). |
| BL0942SPI | BL0942 is a power-metering chip which uses SPI protocol for communication. It's usually connected to SPI1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [PZIOT-E01 teardown example](https://www.elektroda.com/rtvforum/topic3945667.html). |
@@ -26,6 +26,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| DGR | Tasmota Device groups driver. See [forum example](https://www.elektroda.com/rtvforum/topic3925472.html) and TODO-video tutorial (will post on YT soon) |
| PWMToggler | PWMToggler is a custom abstraction layer that can run on top of raw PWM channels. It provides ability to turn off/on the PWM while keeping it's value, which is not possible by direct channel operations. It can be used for some custom devices with extra lights/lasers. See example [here](https://www.elektroda.com/rtvforum/topic3939064.html). |
| DoorSensor | DoorSensor is using deep sleep to preserve battery. This is used for devices without TuyaMCU, where BK deep sleep and wakeup on GPIO is used. This drives requires you to set a DoorSensor pin. Change on door sensor pin wakes up the device. If there are no changes for some time, device goes to sleep. See example [here](https://www.elektroda.com/rtvforum/topic3960149.html). |
| MAX72XX_Clock | MAX72XX_Clock. |
| SM2135 | SM2135 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2135 pin roles. This may need you to remap the RGBCW indexes with SM2135_Map command |
| BP5758D | BP5758D custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP5758D pin roles. This may need you to remap the RGBCW indexes with BP5758D_Map command. This driver is used in some of BL602/Sonoff bulbs, see [video flashing tutorial here](https://www.youtube.com/watch?v=L6d42IMGhHw) |
| BP1658CJ | BP1658CJ custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP1658CJ pin roles. This may need you to remap the RGBCW indexes with BP1658CJ_Map command |

View File

@@ -368,33 +368,6 @@
"requires": "",
"examples": ""
},
{
"name": "SPITestMAX7219",
"args": "CMD_SPITestMAX7219",
"descr": "",
"fn": "NULL);",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_ReadID",
"args": "CMD_SPITestFlash_ReadID",
"descr": "",
"fn": "NULL);",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_ReadData",
"args": "CMD_SPITestFlash_ReadData",
"descr": "",
"fn": "NULL);",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "led_dimmer",
"args": "[Value]",
@@ -935,65 +908,11 @@
"requires": "",
"examples": "Battery_Setup 60"
},
{
"name": "PowerSet",
"args": "",
"descr": "Sets current power value for calibration",
"fn": "BL0937_PowerSet",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "VoltageSet",
"args": "",
"descr": "Sets current V value for calibration",
"fn": "BL0937_VoltageSet",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "CurrentSet",
"args": "",
"descr": "Sets current I value for calibration",
"fn": "BL0937_CurrentSet",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "PREF",
"args": "",
"descr": "Sets the calibration multiplier",
"fn": "BL0937_PowerRef",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "VREF",
"args": "",
"descr": "Sets the calibration multiplier",
"fn": "BL0937_VoltageRef",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "IREF",
"args": "",
"descr": "Sets the calibration multiplier",
"fn": "BL0937_CurrentRef",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
},
{
"name": "PowerMax",
"args": "[limit]",
"descr": "Sets Maximum power value measurement limiter",
"fn": "BL0937_PowerMax",
"args": "BL0937_PowerMax",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_bl0937.c",
"requires": "",
"examples": ""
@@ -1151,15 +1070,6 @@
"requires": "",
"examples": ""
},
{
"name": "IRAC",
"args": "IR_AC_Cmd",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_ir.cpp",
"requires": "",
"examples": ""
},
{
"name": "IREnable",
"args": "[Str][1or0]",
@@ -1196,6 +1106,24 @@
"requires": "",
"examples": ""
},
{
"name": "MAX72XX_Scroll",
"args": "DRV_MAX72XX_Scroll",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_max72xx_single.c",
"requires": "",
"examples": ""
},
{
"name": "MAX72XX_Print",
"args": "DRV_MAX72XX_Print",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_max72xx_single.c",
"requires": "",
"examples": ""
},
{
"name": "ntp_timeZoneOfs",
"args": "[Value]",
@@ -1295,6 +1223,60 @@
"requires": "",
"examples": ""
},
{
"name": "VoltageSet",
"args": "CalibrateVoltage",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "CurrentSet",
"args": "CalibrateCurrent",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "PowerSet",
"args": "CalibratePower",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "VREF",
"args": "SetVoltageCal",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "IREF",
"args": "SetCurrentCal",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "PREF",
"args": "SetPowerCal",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_pwrCal.c",
"requires": "",
"examples": ""
},
{
"name": "SHT_cycle",
"args": "[int]",
@@ -1484,6 +1466,42 @@
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_ReadID",
"args": "CMD_SPITestFlash_ReadID",
"descr": "",
"fn": "NULL);",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_WriteStr",
"args": "CMD_SPITestFlash_WriteStr",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_spi_flash.c",
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_Erase",
"args": "CMD_SPITestFlash_Erase",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_spi_flash.c",
"requires": "",
"examples": ""
},
{
"name": "SPITestFlash_ReadData",
"args": "CMD_SPITestFlash_ReadData",
"descr": "",
"fn": "NULL);",
"file": "cmnds/cmd_main.c",
"requires": "",
"examples": ""
},
{
"name": "obkDeviceList",
"args": "",
@@ -1514,7 +1532,7 @@
{
"name": "DGR_SendRGBCW",
"args": "[GroupName][HexRGBCW]",
"descr": "Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit.",
"descr": "Sends a RGBCW message to given Tasmota Device Group with no reliability. Requires no prior setup and can control any group, but won't retransmit. You can use this command in two ways, first is like DGR_SendRGBCW GroupName 255 255 0, etc, second is DGR_SendRGBCW GroupName FF00FF00 etc etc.",
"fn": "CMD_DGR_SendRGBCW",
"file": "driver/drv_tasmotaDeviceGroups.c",
"requires": "",

View File

@@ -17,6 +17,12 @@
"descr": "NTP driver is required to get current time and date from web. Without it, there is no correct datetime.",
"requires": ""
},
{
"name": "HTTPButtons",
"title": "TODO",
"descr": "This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them",
"requires": ""
},
{
"name": "TESTPOWER",
"title": "TODO",
@@ -29,12 +35,6 @@
"descr": "This is a fake I2C LED driver, only for testing",
"requires": ""
},
{
"name": "HTTPButtons",
"title": "TODO",
"descr": "This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them",
"requires": ""
},
{
"name": "I2C",
"title": "TODO",
@@ -113,6 +113,12 @@
"descr": "DoorSensor is using deep sleep to preserve battery. This is used for devices without TuyaMCU, where BK deep sleep and wakeup on GPIO is used. This drives requires you to set a DoorSensor pin. Change on door sensor pin wakes up the device. If there are no changes for some time, device goes to sleep. See example [here](https://www.elektroda.com/rtvforum/topic3960149.html).",
"requires": ""
},
{
"name": "MAX72XX_Clock",
"title": "TODO",
"descr": "MAX72XX_Clock.",
"requires": ""
},
{
"name": "SM2135",
"title": "TODO",

View File

@@ -34,5 +34,13 @@
"channel 11 - you may use it as ADC, or just use setChannel 11 100 or setChannel 11 500 in console to change delay"
],
"file": "scripts/using_channel_as_variable.bat"
},
{
"title": "Sending UART from script - WXDM2 dimmer support",
"description": "",
"requirements": [
"a WXDM2 dimmer with custom UART protocol"
],
"file": "scripts/sending_uart_from_script.bat"
}
]

View File

@@ -7,6 +7,8 @@
- channel 1 - output relay<br>
```again:
again:
echo "Step 1"
setChannel 1 0
echo "Step 2"
@@ -124,3 +126,24 @@ looper:
```
<b>Sending UART from script - WXDM2 dimmer support</b>
<br>
<br>Requirements:
- a WXDM2 dimmer with custom UART protocol<br>
```
// WXDM2 dimmer demo
// WXDM2 is using custom UART protocol with no checksum
again:
addChannel 10 1 0 255 1
delay_ms 100
uartSendHex 0A FF 55 02 00 $CH10$ 00 00 0A
goto again
```

View File

@@ -1,4 +1,6 @@
again:
again:
echo "Step 1"
setChannel 1 0
echo "Step 2"