This commit is contained in:
Tester 2024-12-24 15:17:47 +01:00
parent 6152fec831
commit f971f823ea
13 changed files with 185 additions and 8 deletions

Binary file not shown.

BIN
Release/openBeken_win32.exp Normal file

Binary file not shown.

View File

@ -15,13 +15,13 @@ 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) (80 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 corresponding 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) (51 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) (59 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) (40 total) | Every console command that takes an integer argument supports certain constant expansion. |
| [Drivers](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/drivers.md) (61 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) (41 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) (59 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' suffixes. 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) (31 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) (314 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) (326 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) (37 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 outgoing OBK MQTT publishes |
| [Script examples](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/scriptExamples.md) (6 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) (314 total) | More details on commands. |
| [Console/Script commands [Extended Edition]](https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands-extended.md) (326 total) | More details on commands. |

View File

@ -11,6 +11,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| AddChannel | [ChannelIndex][ValueToAdd][ClampMin][ClampMax][bWrapInsteadOfClamp] | Adds a given value to the channel. Can be used to change PWM brightness. Clamp min and max arguments are optional.<br/><br/>See also [AddChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=AddChannel). | File: cmnds/cmd_channels.c<br/>Function: CMD_AddChannel |
| addClockEvent | [TimerSeconds or Time or sunrise or sunset] [WeekDayFlags] [UniqueIDForRemoval][Command] | Schedule command to run on given time in given day of week. NTP must be running. TimerSeconds is seconds from midnight, Time is a time like HH:mm or HH:mm:ss, WeekDayFlag is a bitflag on which day to run, 0xff mean all days, 0x01 means sunday, 0x02 monday, 0x03 sunday and monday, etc, id is an unique id so event can be removed later. (NOTE: Use of sunrise/sunset requires compiling with ENABLE_NTP_SUNRISE_SUNSET set which adds about 11k of code).<br/><br/>See also [addClockEvent on forum](https://www.elektroda.com/rtvforum/find.php?q=addClockEvent). | File: driver/drv_ntp_events.c<br/>Function: CMD_NTP_AddClockEvent |
| AddEventHandler | [EventName][EventArgument][CommandToRun] | This can be used to trigger an action on a button click, long press, etc.<br/><br/>See also [AddEventHandler on forum](https://www.elektroda.com/rtvforum/find.php?q=AddEventHandler). | File: cmnds/cmd_eventHandlers.c<br/>Function: CMD_AddEventHandler |
| addI2CDevice_ADS1115 | DRV_I2C_AddDevice_ADS1115 | .<br/><br/>See also [addI2CDevice_ADS1115 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_ADS1115). | File: i2c/drv_i2c_ads1115.c<br/>Function: NULL); |
| addI2CDevice_LCD_PCF8574 | | Adds a new I2C device - PCF8574.<br/><br/>See also [addI2CDevice_LCD_PCF8574 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_LCD_PCF8574). | File: i2c/drv_i2c_main.c<br/>Function: DRV_I2C_AddDevice_PCF8574 |
| addI2CDevice_LCM1602 | | Adds a new I2C device - LCM1602.<br/><br/>See also [addI2CDevice_LCM1602 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_LCM1602). | File: i2c/drv_i2c_main.c<br/>Function: DRV_I2C_AddDevice_LCM1602 |
| addI2CDevice_MCP23017 | | Adds a new I2C device - MCP23017.<br/><br/>See also [addI2CDevice_MCP23017 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_MCP23017). | File: i2c/drv_i2c_main.c<br/>Function: DRV_I2C_AddDevice_MCP23017 |
@ -174,6 +175,9 @@ Do not add anything here, as it will overwritten with next rebuild.
| obkDeviceList | | Generate the SSDP list of OpenBeken devices found on the network.<br/><br/>See also [obkDeviceList on forum](https://www.elektroda.com/rtvforum/find.php?q=obkDeviceList). | File: driver/drv_ssdp.c<br/>Function: Cmd_obkDeviceList |
| OpenAP | | Temporarily disconnects from programmed WiFi network and opens Access Point.<br/><br/>See also [OpenAP on forum](https://www.elektroda.com/rtvforum/find.php?q=OpenAP). | File: cmnds/cmd_main.c<br/>Function: CMD_OpenAP |
| ota_http | [HTTP_URL] | Starts the firmware update procedure, the argument should be a reachable HTTP server file. You can easily setup HTTP server with Xampp, or Visual Code, or Python, etc. Make sure you are using OTA file for a correct platform (getting N platform RBL on T will brick device, etc etc).<br/><br/>See also [ota_http on forum](https://www.elektroda.com/rtvforum/find.php?q=ota_http). | File: cmnds/cmd_main.c<br/>Function: CMD_HTTPOTA |
| owm_channels | CMD_OWM_Channels | .<br/><br/>See also [owm_channels on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_channels). | File: driver/drv_openWeatherMap.c<br/>Function: NULL); |
| owm_request | CMD_OWM_Request | .<br/><br/>See also [owm_request on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_request). | File: driver/drv_openWeatherMap.c<br/>Function: NULL); |
| owm_setup | CMD_OWM_Setup | .<br/><br/>See also [owm_setup on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_setup). | File: driver/drv_openWeatherMap.c<br/>Function: NULL); |
| Password1 | [ValueString] | Sets the Pass of target WiFi. Command keeps Tasmota syntax.<br/><br/>See also [Password1 on forum](https://www.elektroda.com/rtvforum/find.php?q=Password1). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_Password1 |
| PinDeepSleep | [OptionalTimerForWakeup] | Starts a pin deep sleep (deep sleep that can be interrupted by external IO events like a button press). The argument is an optional extra time to wake up also by timer. See [tutorial](https://www.elektroda.com/rtvforum/topic4041971.html).<br/><br/>See also [PinDeepSleep on forum](https://www.elektroda.com/rtvforum/find.php?q=PinDeepSleep). | File: cmnds/cmd_channels.c<br/>Function: CMD_PinDeepSleep |
| PingHost | [IPStr] | Sets the host to ping by IP watchdog.<br/><br/>See also [PingHost on forum](https://www.elektroda.com/rtvforum/find.php?q=PingHost). | File: cmnds/cmd_main.c<br/>Function: CMD_PingHost |
@ -198,6 +202,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| removeClockEvent | [ID] | Removes clock event wtih given ID.<br/><br/>See also [removeClockEvent on forum](https://www.elektroda.com/rtvforum/find.php?q=removeClockEvent). | File: driver/drv_ntp_events.c<br/>Function: CMD_NTP_RemoveClockEvent |
| resetSVM | | Resets all SVM and clears all scripts.<br/><br/>See also [resetSVM on forum](https://www.elektroda.com/rtvforum/find.php?q=resetSVM). | File: cmnds/cmd_script.c<br/>Function: CMD_resetSVM |
| restart | | Reboots the module.<br/><br/>See also [restart on forum](https://www.elektroda.com/rtvforum/find.php?q=restart). | File: cmnds/cmd_main.c<br/>Function: CMD_Restart |
| Result | NULL | A stub for Tasmota.<br/><br/>See also [Result on forum](https://www.elektroda.com/rtvforum/find.php?q=Result). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_stub |
| return | | Script-only command. Currently it just stops totally current script thread.<br/><br/>See also [return on forum](https://www.elektroda.com/rtvforum/find.php?q=return). | File: cmnds/cmd_script.c<br/>Function: CMD_Return |
| SafeMode | [OptionalDelayBeforeRestart] | Forces device reboot into safe mode (open ap with disabled drivers). Argument is a delay to restart in seconds, optional, minimal delay is 1.<br/><br/>See also [SafeMode on forum](https://www.elektroda.com/rtvforum/find.php?q=SafeMode). | File: cmnds/cmd_main.c<br/>Function: CMD_SafeMode |
| scanI2C | [Soft/I2C1/I2C2] | Scans given I2C line for addresses. I2C driver must be started first.<br/><br/>See also [scanI2C on forum](https://www.elektroda.com/rtvforum/find.php?q=scanI2C). | File: i2c/drv_i2c_main.c<br/>Function: DRV_I2C_MCP23017_MapPinToChannel |
@ -205,6 +210,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| sendGet | [TargetURL] | Sends a HTTP GET request to target URL. May include GET arguments. Can be used to control devices by Tasmota HTTP protocol. Command supports argument expansion, so $CH11 changes to value of channel 11, etc, etc.<br/><br/>See also [sendGet on forum](https://www.elektroda.com/rtvforum/find.php?q=sendGet). | File: cmnds/cmd_send.c<br/>Function: CMD_SendGET |
| SendIR2 | CMD_IR2_SendIR2 | .<br/><br/>See also [SendIR2 on forum](https://www.elektroda.com/rtvforum/find.php?q=SendIR2). | File: driver/drv_ir2.c<br/>Function: NULL); |
| sendPOST | [TargetURL] [HTTP Port] [Content Type] [Post Content] | Sends a HTTP POST request to target URL. Arguments can contain variable expansion.<br/><br/>See also [sendPOST on forum](https://www.elektroda.com/rtvforum/find.php?q=sendPOST). | File: cmnds/cmd_send.c<br/>Function: CMD_SendPOST |
| Sensor | NULL | A stub for Tasmota.<br/><br/>See also [Sensor on forum](https://www.elektroda.com/rtvforum/find.php?q=Sensor). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_stub |
| setButtonColor | [ButtonIndex][Color] | Sets the colour of custom scriptable HTTP page button.<br/><br/>See also [setButtonColor on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonColor). | File: driver/drv_httpButtons.c<br/>Function: CMD_setButtonColor |
| setButtonCommand | [ButtonIndex][Command] | Sets the command of custom scriptable HTTP page button.<br/><br/>See also [setButtonCommand on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonCommand). | File: driver/drv_httpButtons.c<br/>Function: CMD_setButtonCommand |
| setButtonEnabled | [ButtonIndex][1or0] | Sets the visibility of custom scriptable HTTP page button.<br/><br/>See also [setButtonEnabled on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonEnabled). | File: driver/drv_httpButtons.c<br/>Function: CMD_setButtonEnabled |
@ -219,8 +225,11 @@ Do not add anything here, as it will overwritten with next rebuild.
| setChannelType | [ChannelIndex][TypeString] | Sets a custom type for channel. Types are mostly used to determine how to display channel value on GUI.<br/><br/>See also [setChannelType on forum](https://www.elektroda.com/rtvforum/find.php?q=setChannelType). | File: new_pins.c<br/>Function: CMD_SetChannelType |
| SetChannelVisible | [ChannelIndex][bVisible] | This allows you to force-hide a certain channel from HTTP gui. The channel will still work, but will not show up as a button, or a toggle, etc...<br/><br/>See also [SetChannelVisible on forum](https://www.elektroda.com/rtvforum/find.php?q=SetChannelVisible). | File: cmnds/cmd_channels.c<br/>Function: CMD_SetChannelVisible |
| SetFlag | [FlagIndex][0or1] | Sets given flag.<br/><br/>See also [SetFlag on forum](https://www.elektroda.com/rtvforum/find.php?q=SetFlag). | File: cmnds/cmd_main.c<br/>Function: CMD_SetFlag |
| SetFlash | [FlashIndex][FlashValue] | Sets a a flashVars channel directly (if you are using remember state for given channel, it will overwrite, it uses same space for channels memory).<br/><br/>See also [SetFlash on forum](https://www.elektroda.com/rtvforum/find.php?q=SetFlash). | File: cmnds/cmd_channels.c<br/>Function: CMD_SetFlash |
| SetPinChannel | [PinIndex][ChannelIndex][optionalChannel2Index] | This allows you to set a channel linked to pin from console. Usually it's easier to do this through WWW panel, so you don't have to use this command.<br/><br/>See also [SetPinChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=SetPinChannel). | File: cmnds/cmd_channels.c<br/>Function: CMD_SetPinChannel |
| SetPinRole | [PinRole][RoleIndexOrName] | This allows you to set a pin role, for example a Relay role, or Button, etc. Usually it's easier to do this through WWW panel, so you don't have to use this command.<br/><br/>See also [SetPinRole on forum](https://www.elektroda.com/rtvforum/find.php?q=SetPinRole). | File: cmnds/cmd_channels.c<br/>Function: CMD_SetPinRole |
| setStartupSSID | [Value] | Sets startup SSID, 0 (SSID0) 1 (SSID1).<br/><br/>See also [setStartupSSID on forum](https://www.elektroda.com/rtvforum/find.php?q=setStartupSSID). | File: new_pins.c<br/>Function: CMD_setStartupSSID |
| setStartupSSIDChannel | [Value] | Sets retain channel number to store last used SSID, 0..MAX_RETAIN_CHANNELS-1, -1 to disable. Suggested channel number is 7 (MAXMAX_RETAIN_CHANNELS-5).<br/><br/>See also [setStartupSSIDChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=setStartupSSIDChannel). | File: new_pins.c<br/>Function: CMD_setStartupSSIDChannel |
| 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'.<br/><br/>See also [SetStartValue on forum](https://www.elektroda.com/rtvforum/find.php?q=SetStartValue). | File: cmnds/cmd_main.c<br/>Function: CMD_SetStartValue |
| SetupEnergyStats | [Enable1or0][SampleTime][SampleCount][JSonEnable] | Setup Energy Statistic Parameters: [enable 0 or 1] [sample_time[10..90]] [sample_count[10..180]] [JsonEnable 0 or 1]. JSONEnable is optional.<br/><br/>See also [SetupEnergyStats on forum](https://www.elektroda.com/rtvforum/find.php?q=SetupEnergyStats). | File: driver/drv_bl_shared.c<br/>Function: BL09XX_SetupEnergyStatistic |
| SetupIR2 | CMD_IR2_SetupIR2 | .<br/><br/>See also [SetupIR2 on forum](https://www.elektroda.com/rtvforum/find.php?q=SetupIR2). | File: driver/drv_ir2.c<br/>Function: NULL); |
@ -265,7 +274,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| startDriver | [DriverName] | Starts driver.<br/><br/>See also [startDriver on forum](https://www.elektroda.com/rtvforum/find.php?q=startDriver). | File: driver/drv_main.c<br/>Function: DRV_Start |
| startScript | [FileName][Label][UniqueID] | Starts a script thread from given file, at given label - can be * for whole file, with given unique ID.<br/><br/>See also [startScript on forum](https://www.elektroda.com/rtvforum/find.php?q=startScript). | File: cmnds/cmd_script.c<br/>Function: CMD_StartScript |
| StartupCommand | [Command in quotation marks][bRunAfter] | Sets the new startup command (short startup command, the one stored in config) to given string. Second argument is optional, if set to 1, command will be also executed after setting.<br/><br/>See also [StartupCommand on forum](https://www.elektroda.com/rtvforum/find.php?q=StartupCommand). | File: cmnds/cmd_main.c<br/>Function: CMD_StartupCommand |
| State | NULL | NULL.<br/><br/>See also [State on forum](https://www.elektroda.com/rtvforum/find.php?q=State). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_State |
| State | NULL | A stub for Tasmota.<br/><br/>See also [State on forum](https://www.elektroda.com/rtvforum/find.php?q=State). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_stub |
| Status | NULL | A stub for Tasmota.<br/><br/>See also [Status on forum](https://www.elektroda.com/rtvforum/find.php?q=Status). | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_stub |
| stopAllScripts | | Stops all running scripts.<br/><br/>See also [stopAllScripts on forum](https://www.elektroda.com/rtvforum/find.php?q=stopAllScripts). | File: cmnds/cmd_script.c<br/>Function: CMD_StopAllScripts |
| stopDriver | [DriverName] | Stops driver.<br/><br/>See also [stopDriver on forum](https://www.elektroda.com/rtvforum/find.php?q=stopDriver). | File: driver/drv_main.c<br/>Function: DRV_Stop |
| stopScript | [UniqueID] | Force-stop given script thread by ID.<br/><br/>See also [stopScript on forum](https://www.elektroda.com/rtvforum/find.php?q=stopScript). | File: cmnds/cmd_script.c<br/>Function: CMD_StopScript |
@ -319,4 +329,6 @@ Do not add anything here, as it will overwritten with next rebuild.
| VCPPublishThreshold | [VoltageDeltaVolts][CurrentDeltaAmpers][PowerDeltaWats][EnergyDeltaWh] | Sets the minimal change between previous reported value over MQTT and next reported value over MQTT. Very useful for BL0942, BL0937, etc. So, if you set, VCPPublishThreshold 0.5 0.001 0.5, it will only report voltage again if the delta from previous reported value is largen than 0.5V. Remember, that the device will also ALWAYS force-report values every N seconds (default 60).<br/><br/>See also [VCPPublishThreshold on forum](https://www.elektroda.com/rtvforum/find.php?q=VCPPublishThreshold). | File: driver/drv_bl_shared.c<br/>Function: BL09XX_VCPPublishThreshold |
| VoltageSet | Voltage | Measure the real voltage with an external, reliable power meter and enter this voltage via this command to calibrate. The calibration is automatically saved in the flash memory.<br/><br/>See also [VoltageSet on forum](https://www.elektroda.com/rtvforum/find.php?q=VoltageSet). | File: driver/drv_pwrCal.c<br/>Function: NULL); |
| waitFor | [EventName] [Argument] | Wait forever for event. Can be used within script. For example, you can do: waitFor MQTTState 1 or waitFor NTPState 1. You can also do waitFor NoPingTime 600 to wait for 600 seconds without ping watchdog getting successful reply.<br/><br/>See also [waitFor on forum](https://www.elektroda.com/rtvforum/find.php?q=waitFor). | File: cmnds/cmd_script.c<br/>Function: CMD_waitFor |
| widget_clearAll | CMD_Widget_ClearAll | .<br/><br/>See also [widget_clearAll on forum](https://www.elektroda.com/rtvforum/find.php?q=widget_clearAll). | File: driver/drv_widget.c<br/>Function: NULL); |
| widget_create | CMD_Widget_Create | .<br/><br/>See also [widget_create on forum](https://www.elektroda.com/rtvforum/find.php?q=widget_create). | File: driver/drv_widget.c<br/>Function: NULL); |

View File

@ -14,6 +14,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| AddChannel | [ChannelIndex][ValueToAdd][ClampMin][ClampMax][bWrapInsteadOfClamp] | Adds a given value to the channel. Can be used to change PWM brightness. Clamp min and max arguments are optional.<br/><br/>See also [AddChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=AddChannel). |
| addClockEvent | [TimerSeconds or Time or sunrise or sunset] [WeekDayFlags] [UniqueIDForRemoval][Command] | Schedule command to run on given time in given day of week. NTP must be running. TimerSeconds is seconds from midnight, Time is a time like HH:mm or HH:mm:ss, WeekDayFlag is a bitflag on which day to run, 0xff mean all days, 0x01 means sunday, 0x02 monday, 0x03 sunday and monday, etc, id is an unique id so event can be removed later. (NOTE: Use of sunrise/sunset requires compiling with ENABLE_NTP_SUNRISE_SUNSET set which adds about 11k of code).<br/><br/>See also [addClockEvent on forum](https://www.elektroda.com/rtvforum/find.php?q=addClockEvent). |
| AddEventHandler | [EventName][EventArgument][CommandToRun] | This can be used to trigger an action on a button click, long press, etc.<br/><br/>See also [AddEventHandler on forum](https://www.elektroda.com/rtvforum/find.php?q=AddEventHandler). |
| addI2CDevice_ADS1115 | DRV_I2C_AddDevice_ADS1115 | .<br/><br/>See also [addI2CDevice_ADS1115 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_ADS1115). |
| addI2CDevice_LCD_PCF8574 | | Adds a new I2C device - PCF8574.<br/><br/>See also [addI2CDevice_LCD_PCF8574 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_LCD_PCF8574). |
| addI2CDevice_LCM1602 | | Adds a new I2C device - LCM1602.<br/><br/>See also [addI2CDevice_LCM1602 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_LCM1602). |
| addI2CDevice_MCP23017 | | Adds a new I2C device - MCP23017.<br/><br/>See also [addI2CDevice_MCP23017 on forum](https://www.elektroda.com/rtvforum/find.php?q=addI2CDevice_MCP23017). |
@ -177,6 +178,9 @@ Do not add anything here, as it will overwritten with next rebuild.
| obkDeviceList | | Generate the SSDP list of OpenBeken devices found on the network.<br/><br/>See also [obkDeviceList on forum](https://www.elektroda.com/rtvforum/find.php?q=obkDeviceList). |
| OpenAP | | Temporarily disconnects from programmed WiFi network and opens Access Point.<br/><br/>See also [OpenAP on forum](https://www.elektroda.com/rtvforum/find.php?q=OpenAP). |
| ota_http | [HTTP_URL] | Starts the firmware update procedure, the argument should be a reachable HTTP server file. You can easily setup HTTP server with Xampp, or Visual Code, or Python, etc. Make sure you are using OTA file for a correct platform (getting N platform RBL on T will brick device, etc etc).<br/><br/>See also [ota_http on forum](https://www.elektroda.com/rtvforum/find.php?q=ota_http). |
| owm_channels | CMD_OWM_Channels | .<br/><br/>See also [owm_channels on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_channels). |
| owm_request | CMD_OWM_Request | .<br/><br/>See also [owm_request on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_request). |
| owm_setup | CMD_OWM_Setup | .<br/><br/>See also [owm_setup on forum](https://www.elektroda.com/rtvforum/find.php?q=owm_setup). |
| Password1 | [ValueString] | Sets the Pass of target WiFi. Command keeps Tasmota syntax.<br/><br/>See also [Password1 on forum](https://www.elektroda.com/rtvforum/find.php?q=Password1). |
| PinDeepSleep | [OptionalTimerForWakeup] | Starts a pin deep sleep (deep sleep that can be interrupted by external IO events like a button press). The argument is an optional extra time to wake up also by timer. See [tutorial](https://www.elektroda.com/rtvforum/topic4041971.html).<br/><br/>See also [PinDeepSleep on forum](https://www.elektroda.com/rtvforum/find.php?q=PinDeepSleep). |
| PingHost | [IPStr] | Sets the host to ping by IP watchdog.<br/><br/>See also [PingHost on forum](https://www.elektroda.com/rtvforum/find.php?q=PingHost). |
@ -201,6 +205,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| removeClockEvent | [ID] | Removes clock event wtih given ID.<br/><br/>See also [removeClockEvent on forum](https://www.elektroda.com/rtvforum/find.php?q=removeClockEvent). |
| resetSVM | | Resets all SVM and clears all scripts.<br/><br/>See also [resetSVM on forum](https://www.elektroda.com/rtvforum/find.php?q=resetSVM). |
| restart | | Reboots the module.<br/><br/>See also [restart on forum](https://www.elektroda.com/rtvforum/find.php?q=restart). |
| Result | NULL | A stub for Tasmota.<br/><br/>See also [Result on forum](https://www.elektroda.com/rtvforum/find.php?q=Result). |
| return | | Script-only command. Currently it just stops totally current script thread.<br/><br/>See also [return on forum](https://www.elektroda.com/rtvforum/find.php?q=return). |
| SafeMode | [OptionalDelayBeforeRestart] | Forces device reboot into safe mode (open ap with disabled drivers). Argument is a delay to restart in seconds, optional, minimal delay is 1.<br/><br/>See also [SafeMode on forum](https://www.elektroda.com/rtvforum/find.php?q=SafeMode). |
| scanI2C | [Soft/I2C1/I2C2] | Scans given I2C line for addresses. I2C driver must be started first.<br/><br/>See also [scanI2C on forum](https://www.elektroda.com/rtvforum/find.php?q=scanI2C). |
@ -208,6 +213,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| sendGet | [TargetURL] | Sends a HTTP GET request to target URL. May include GET arguments. Can be used to control devices by Tasmota HTTP protocol. Command supports argument expansion, so $CH11 changes to value of channel 11, etc, etc.<br/><br/>See also [sendGet on forum](https://www.elektroda.com/rtvforum/find.php?q=sendGet). |
| SendIR2 | CMD_IR2_SendIR2 | .<br/><br/>See also [SendIR2 on forum](https://www.elektroda.com/rtvforum/find.php?q=SendIR2). |
| sendPOST | [TargetURL] [HTTP Port] [Content Type] [Post Content] | Sends a HTTP POST request to target URL. Arguments can contain variable expansion.<br/><br/>See also [sendPOST on forum](https://www.elektroda.com/rtvforum/find.php?q=sendPOST). |
| Sensor | NULL | A stub for Tasmota.<br/><br/>See also [Sensor on forum](https://www.elektroda.com/rtvforum/find.php?q=Sensor). |
| setButtonColor | [ButtonIndex][Color] | Sets the colour of custom scriptable HTTP page button.<br/><br/>See also [setButtonColor on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonColor). |
| setButtonCommand | [ButtonIndex][Command] | Sets the command of custom scriptable HTTP page button.<br/><br/>See also [setButtonCommand on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonCommand). |
| setButtonEnabled | [ButtonIndex][1or0] | Sets the visibility of custom scriptable HTTP page button.<br/><br/>See also [setButtonEnabled on forum](https://www.elektroda.com/rtvforum/find.php?q=setButtonEnabled). |
@ -222,8 +228,11 @@ Do not add anything here, as it will overwritten with next rebuild.
| setChannelType | [ChannelIndex][TypeString] | Sets a custom type for channel. Types are mostly used to determine how to display channel value on GUI.<br/><br/>See also [setChannelType on forum](https://www.elektroda.com/rtvforum/find.php?q=setChannelType). |
| SetChannelVisible | [ChannelIndex][bVisible] | This allows you to force-hide a certain channel from HTTP gui. The channel will still work, but will not show up as a button, or a toggle, etc...<br/><br/>See also [SetChannelVisible on forum](https://www.elektroda.com/rtvforum/find.php?q=SetChannelVisible). |
| SetFlag | [FlagIndex][0or1] | Sets given flag.<br/><br/>See also [SetFlag on forum](https://www.elektroda.com/rtvforum/find.php?q=SetFlag). |
| SetFlash | [FlashIndex][FlashValue] | Sets a a flashVars channel directly (if you are using remember state for given channel, it will overwrite, it uses same space for channels memory).<br/><br/>See also [SetFlash on forum](https://www.elektroda.com/rtvforum/find.php?q=SetFlash). |
| SetPinChannel | [PinIndex][ChannelIndex][optionalChannel2Index] | This allows you to set a channel linked to pin from console. Usually it's easier to do this through WWW panel, so you don't have to use this command.<br/><br/>See also [SetPinChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=SetPinChannel). |
| SetPinRole | [PinRole][RoleIndexOrName] | This allows you to set a pin role, for example a Relay role, or Button, etc. Usually it's easier to do this through WWW panel, so you don't have to use this command.<br/><br/>See also [SetPinRole on forum](https://www.elektroda.com/rtvforum/find.php?q=SetPinRole). |
| setStartupSSID | [Value] | Sets startup SSID, 0 (SSID0) 1 (SSID1).<br/><br/>See also [setStartupSSID on forum](https://www.elektroda.com/rtvforum/find.php?q=setStartupSSID). |
| setStartupSSIDChannel | [Value] | Sets retain channel number to store last used SSID, 0..MAX_RETAIN_CHANNELS-1, -1 to disable. Suggested channel number is 7 (MAXMAX_RETAIN_CHANNELS-5).<br/><br/>See also [setStartupSSIDChannel on forum](https://www.elektroda.com/rtvforum/find.php?q=setStartupSSIDChannel). |
| 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'.<br/><br/>See also [SetStartValue on forum](https://www.elektroda.com/rtvforum/find.php?q=SetStartValue). |
| SetupEnergyStats | [Enable1or0][SampleTime][SampleCount][JSonEnable] | Setup Energy Statistic Parameters: [enable 0 or 1] [sample_time[10..90]] [sample_count[10..180]] [JsonEnable 0 or 1]. JSONEnable is optional.<br/><br/>See also [SetupEnergyStats on forum](https://www.elektroda.com/rtvforum/find.php?q=SetupEnergyStats). |
| SetupIR2 | CMD_IR2_SetupIR2 | .<br/><br/>See also [SetupIR2 on forum](https://www.elektroda.com/rtvforum/find.php?q=SetupIR2). |
@ -268,7 +277,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| startDriver | [DriverName] | Starts driver.<br/><br/>See also [startDriver on forum](https://www.elektroda.com/rtvforum/find.php?q=startDriver). |
| startScript | [FileName][Label][UniqueID] | Starts a script thread from given file, at given label - can be * for whole file, with given unique ID.<br/><br/>See also [startScript on forum](https://www.elektroda.com/rtvforum/find.php?q=startScript). |
| StartupCommand | [Command in quotation marks][bRunAfter] | Sets the new startup command (short startup command, the one stored in config) to given string. Second argument is optional, if set to 1, command will be also executed after setting.<br/><br/>See also [StartupCommand on forum](https://www.elektroda.com/rtvforum/find.php?q=StartupCommand). |
| State | NULL | NULL.<br/><br/>See also [State on forum](https://www.elektroda.com/rtvforum/find.php?q=State). |
| State | NULL | A stub for Tasmota.<br/><br/>See also [State on forum](https://www.elektroda.com/rtvforum/find.php?q=State). |
| Status | NULL | A stub for Tasmota.<br/><br/>See also [Status on forum](https://www.elektroda.com/rtvforum/find.php?q=Status). |
| stopAllScripts | | Stops all running scripts.<br/><br/>See also [stopAllScripts on forum](https://www.elektroda.com/rtvforum/find.php?q=stopAllScripts). |
| stopDriver | [DriverName] | Stops driver.<br/><br/>See also [stopDriver on forum](https://www.elektroda.com/rtvforum/find.php?q=stopDriver). |
| stopScript | [UniqueID] | Force-stop given script thread by ID.<br/><br/>See also [stopScript on forum](https://www.elektroda.com/rtvforum/find.php?q=stopScript). |
@ -322,4 +332,6 @@ Do not add anything here, as it will overwritten with next rebuild.
| VCPPublishThreshold | [VoltageDeltaVolts][CurrentDeltaAmpers][PowerDeltaWats][EnergyDeltaWh] | Sets the minimal change between previous reported value over MQTT and next reported value over MQTT. Very useful for BL0942, BL0937, etc. So, if you set, VCPPublishThreshold 0.5 0.001 0.5, it will only report voltage again if the delta from previous reported value is largen than 0.5V. Remember, that the device will also ALWAYS force-report values every N seconds (default 60).<br/><br/>See also [VCPPublishThreshold on forum](https://www.elektroda.com/rtvforum/find.php?q=VCPPublishThreshold). |
| VoltageSet | Voltage | Measure the real voltage with an external, reliable power meter and enter this voltage via this command to calibrate. The calibration is automatically saved in the flash memory.<br/><br/>See also [VoltageSet on forum](https://www.elektroda.com/rtvforum/find.php?q=VoltageSet). |
| waitFor | [EventName] [Argument] | Wait forever for event. Can be used within script. For example, you can do: waitFor MQTTState 1 or waitFor NTPState 1. You can also do waitFor NoPingTime 600 to wait for 600 seconds without ping watchdog getting successful reply.<br/><br/>See also [waitFor on forum](https://www.elektroda.com/rtvforum/find.php?q=waitFor). |
| widget_clearAll | CMD_Widget_ClearAll | .<br/><br/>See also [widget_clearAll on forum](https://www.elektroda.com/rtvforum/find.php?q=widget_clearAll). |
| widget_create | CMD_Widget_Create | .<br/><br/>See also [widget_create on forum](https://www.elektroda.com/rtvforum/find.php?q=widget_create). |

View File

@ -22,6 +22,7 @@ Do not add anything here, as it will overwritten with next rebuild.
| $led_saturation | Current LED saturation value |
| $led_temperature | Current LED temperature value |
| $activeRepeatingEvents | Current number of active repeating events |
| $Flash* | Provides flashvarse channel access, as above. |
| $voltage | Current value of voltage from energy metering chip. You can use those variables to make, for example, a change handler that fires when voltage is above 245, etc. |
| $current | Current value of current from energy metering chip |
| $power | Current value of power from energy metering chip |

View File

@ -13,6 +13,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| PixelAnim | PixelAnim provides a simple set of WS2812B animations.<br/>See also [PixelAnim on forum](https://www.elektroda.com/rtvforum/find.php?q=PixelAnim). |
| Drawers | WS2812B driver wrapper with REST API for [smart drawers project](https://www.elektroda.com/rtvforum/topic4054134.html).<br/>See also [Drawers on forum](https://www.elektroda.com/rtvforum/find.php?q=Drawers). |
| HGS02 | [HGS02](https://www.elektroda.com/rtvforum/viewtopic.php?p=21177061#21177061).<br/>See also [HGS02 on forum](https://www.elektroda.com/rtvforum/find.php?q=HGS02). |
| OpenWeatherMap | Widget .<br/>See also [OpenWeatherMap on forum](https://www.elektroda.com/rtvforum/find.php?q=OpenWeatherMap). |
| Widget | Widget .<br/>See also [Widget on forum](https://www.elektroda.com/rtvforum/find.php?q=Widget). |
| TestCharts | Development only driver - a sample of chart generation with chart.js.<br/>See also [TestCharts on forum](https://www.elektroda.com/rtvforum/find.php?q=TestCharts). |
| Charts | Charts driver allows you to create a customizable chart directly on your device. See [tutorial](https://www.elektroda.com/rtvforum/topic4075289.html).<br/>See also [Charts on forum](https://www.elektroda.com/rtvforum/find.php?q=Charts). |
| NTP | NTP driver is required to get current time and date from web. Without it, there is no correct datetime. Put 'startDriver NTP' in short startup line or autoexec.bat to run it on start.<br/>See also [NTP on forum](https://www.elektroda.com/rtvforum/find.php?q=NTP). |

View File

@ -53,6 +53,15 @@
"requires": "",
"examples": ""
},
{
"name": "addI2CDevice_ADS1115",
"args": "DRV_I2C_AddDevice_ADS1115",
"descr": "",
"fn": "NULL);",
"file": "i2c/drv_i2c_ads1115.c",
"requires": "",
"examples": ""
},
{
"name": "addI2CDevice_LCD_PCF8574",
"args": "",
@ -1520,6 +1529,33 @@
"requires": "",
"examples": ""
},
{
"name": "owm_channels",
"args": "CMD_OWM_Channels",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_openWeatherMap.c",
"requires": "",
"examples": ""
},
{
"name": "owm_request",
"args": "CMD_OWM_Request",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_openWeatherMap.c",
"requires": "",
"examples": ""
},
{
"name": "owm_setup",
"args": "CMD_OWM_Setup",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_openWeatherMap.c",
"requires": "",
"examples": ""
},
{
"name": "Password1",
"args": "[ValueString]",
@ -1736,6 +1772,15 @@
"requires": "",
"examples": ""
},
{
"name": "Result",
"args": "NULL",
"descr": "A stub for Tasmota",
"fn": "cmnd_stub",
"file": "cmnds/cmd_tasmota.c",
"requires": "",
"examples": ""
},
{
"name": "return",
"args": "",
@ -1799,6 +1844,15 @@
"requires": "",
"examples": ""
},
{
"name": "Sensor",
"args": "NULL",
"descr": "A stub for Tasmota",
"fn": "cmnd_stub",
"file": "cmnds/cmd_tasmota.c",
"requires": "",
"examples": ""
},
{
"name": "setButtonColor",
"args": "[ButtonIndex][Color]",
@ -1925,6 +1979,15 @@
"requires": "",
"examples": ""
},
{
"name": "SetFlash",
"args": "[FlashIndex][FlashValue]",
"descr": "Sets a a flashVars channel directly (if you are using remember state for given channel, it will overwrite, it uses same space for channels memory).",
"fn": "CMD_SetFlash",
"file": "cmnds/cmd_channels.c",
"requires": "",
"examples": ""
},
{
"name": "SetPinChannel",
"args": "[PinIndex][ChannelIndex][optionalChannel2Index]",
@ -1943,6 +2006,24 @@
"requires": "",
"examples": ""
},
{
"name": "setStartupSSID",
"args": "[Value]",
"descr": "Sets startup SSID, 0 (SSID0) 1 (SSID1)",
"fn": "CMD_setStartupSSID",
"file": "new_pins.c",
"requires": "",
"examples": ""
},
{
"name": "setStartupSSIDChannel",
"args": "[Value]",
"descr": "Sets retain channel number to store last used SSID, 0..MAX_RETAIN_CHANNELS-1, -1 to disable. Suggested channel number is 7 (MAXMAX_RETAIN_CHANNELS-5)",
"fn": "CMD_setStartupSSIDChannel",
"file": "new_pins.c",
"requires": "",
"examples": ""
},
{
"name": "SetStartValue",
"args": "[Channel][Value]",
@ -2342,8 +2423,17 @@
{
"name": "State",
"args": "NULL",
"descr": "NULL",
"fn": "cmnd_State",
"descr": "A stub for Tasmota",
"fn": "cmnd_stub",
"file": "cmnds/cmd_tasmota.c",
"requires": "",
"examples": ""
},
{
"name": "Status",
"args": "NULL",
"descr": "A stub for Tasmota",
"fn": "cmnd_stub",
"file": "cmnds/cmd_tasmota.c",
"requires": "",
"examples": ""
@ -2824,5 +2914,23 @@
"file": "cmnds/cmd_script.c",
"requires": "",
"examples": ""
},
{
"name": "widget_clearAll",
"args": "CMD_Widget_ClearAll",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_widget.c",
"requires": "",
"examples": ""
},
{
"name": "widget_create",
"args": "CMD_Widget_Create",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_widget.c",
"requires": "",
"examples": ""
}
]

View File

@ -95,6 +95,12 @@
"descr": "Current number of active repeating events",
"requires": ""
},
{
"name": "$Flash*",
"title": "$Flash*",
"descr": "Provides flashvarse channel access, as above.",
"requires": ""
},
{
"name": "$voltage",
"title": "$voltage",

View File

@ -35,6 +35,18 @@
"descr": "[HGS02](https://www.elektroda.com/rtvforum/viewtopic.php?p=21177061#21177061)",
"requires": ""
},
{
"name": "OpenWeatherMap",
"title": "TODO",
"descr": "Widget .",
"requires": ""
},
{
"name": "Widget",
"title": "TODO",
"descr": "Widget .",
"requires": ""
},
{
"name": "TestCharts",
"title": "TODO",

View File

@ -273,8 +273,20 @@ waitFor WiFiState 4
owm_request
*/
void DRV_OpenWeatherMap_Init() {
//cmddetail:{"name":"owm_setup","args":"CMD_OWM_Setup",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_openWeatherMap.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("owm_setup", CMD_OWM_Setup, NULL);
//cmddetail:{"name":"owm_request","args":"CMD_OWM_Request",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_openWeatherMap.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("owm_request", CMD_OWM_Request, NULL);
//cmddetail:{"name":"owm_channels","args":"CMD_OWM_Channels",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_openWeatherMap.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("owm_channels", CMD_OWM_Channels, NULL);

View File

@ -118,8 +118,16 @@ static commandResult_t CMD_Widget_ClearAll(const void *context, const char *cmd,
void DRV_Widget_Init() {
//cmddetail:{"name":"widget_clearAll","args":"CMD_Widget_ClearAll",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_widget.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("widget_clearAll", CMD_Widget_ClearAll, NULL);
//cmddetail:{"name":"widget_create","args":"CMD_Widget_Create",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_widget.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("widget_create", CMD_Widget_Create, NULL);
}

View File

@ -121,6 +121,10 @@ commandResult_t DRV_I2C_AddDevice_ADS1115(const void *context, const char *cmd,
}
void DRV_I2C_ADS1115_PreInit() {
//cmddetail:{"name":"addI2CDevice_ADS1115","args":"DRV_I2C_AddDevice_ADS1115",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"i2c/drv_i2c_ads1115.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("addI2CDevice_ADS1115", DRV_I2C_AddDevice_ADS1115, NULL);
}