From c215110cfc4dcfc98cee2b7ec18cc2e051d264d9 Mon Sep 17 00:00:00 2001 From: openshwprojects Date: Mon, 6 Mar 2023 11:37:01 +0100 Subject: [PATCH] drivers doc, post jsons --- docs/drivers.md | 37 + docs/json/channelTypes.json | 266 +++++ docs/json/commands.json | 2027 +++++++++++++++++++++++++++++++++++ docs/json/constants.json | 110 ++ docs/json/drivers.json | 170 +++ docs/json/flags.json | 268 +++++ docs/json/ioRoles.json | 522 +++++++++ scripts/getcommands.js | 2 + 8 files changed, 3402 insertions(+) create mode 100644 docs/drivers.md create mode 100644 docs/json/channelTypes.json create mode 100644 docs/json/commands.json create mode 100644 docs/json/constants.json create mode 100644 docs/json/drivers.json create mode 100644 docs/json/flags.json create mode 100644 docs/json/ioRoles.json diff --git a/docs/drivers.md b/docs/drivers.md new file mode 100644 index 000000000..3dc02bfac --- /dev/null +++ b/docs/drivers.md @@ -0,0 +1,37 @@ +# Drivers +Here is the latest, up to date drivers list. +This file was autogenerated by running 'node scripts/getcommands.js' in the repository. +All descriptions were taken from code. +Remember that some drivers might not be yet enabled on certain platforms, +but we can enable them for you per request. Some drivers might also be WIP. +Do not add anything here, as it will overwritten with next rebuild. +| Driver | Description | +|:------------- | -----:| +| 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. | +| 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. Read more [https://www.elektroda.com/rtvforum/topic3914412.html](here). | +| NTP | NTP driver is required to get current time and date from web. Without it, there is no correct datetime. | +| 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 | +| BL0937 | BL0937 is a power-metering chip which uses custom protocol to report data. It requires setting 3 pins in pin config: CF, CF1 and SEL | +| CSE7766 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK | +| SM16703P | WIP driver | +| IR | IRLibrary wrapper, so you can receive remote signals and send them. | +| DDP | DDP is a LED control protocol that is using UDP. You can use xLights or any other app to control OBK LEDs that way. | +| SSDP | SSDP is a discovery protocol, so BK devices can show up in, for example, Windows network section | +| Wemo | Wemo emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery. | +| DGR | Tasmota Device groups driver. | +| 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. | +| 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. | +| 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 | +| 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 | +| SM2235 | SM2335 andd SM2235 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2235 pin roles. This may need you to remap the RGBCW indexes with SM2235_Map command | +| CHT8305 | TODO | +| MAX72XX | TODO | +| TM1637 | Driver for 7-segment LED display with DIO/CLK interface | +| SHT3X | TODO | +| Battery | TODO | +| Bridge | TODO | diff --git a/docs/json/channelTypes.json b/docs/json/channelTypes.json new file mode 100644 index 000000000..de1168baf --- /dev/null +++ b/docs/json/channelTypes.json @@ -0,0 +1,266 @@ +[ + { + "name": "Default", + "title": "TODO", + "descr": "Default channel type. This channel type is often used in simple devices and is suitable for relays. You don't need to use anything else for most of the non-TuyaMCU devices.", + "enum": "ChType_Default", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Error", + "title": "TODO", + "descr": "This is used to indicate an error.", + "enum": "ChType_Error", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Temperature", + "title": "TODO", + "descr": "This channel type represents a temperature in degrees. The temperature is shown as a read only, integer value on WWW panel.", + "enum": "ChType_Temperature", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Humidity", + "title": "TODO", + "descr": "This channel type represents a humidity in percent. The humidity is shown as a read only, integer value on WWW panel.", + "enum": "ChType_Humidity", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Humidity_div10", + "title": "TODO", + "descr": "This is also humidity, but in TuyaMCU format, multiplied by 10, so 554 is 55.4%. Main WWW panel displays it correctly. If you want multiplied value to be published to MQTT, check flags.", + "enum": "ChType_Humidity_div10", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Temperature_div10", + "title": "TODO", + "descr": "Just like humidity_div10, but for temperature.", + "enum": "ChType_Temperature_div10", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Toggle", + "title": "TODO", + "descr": "This channel will show ON/OFF toggle, so it is very much like default channel type, but the toggle will be always shown, even if channel is not used", + "enum": "ChType_Toggle", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Dimmer", + "title": "TODO", + "descr": "A custom dimmer channel. This will have a 0-100 range and will show a slider. The slider value will be saved to channel, but nothing else is done automatically. You can map it to TuyaMCU dpID to get dimming working or script it however you like.", + "enum": "ChType_Dimmer", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LowMidHigh", + "title": "TODO", + "descr": "This channel has 3 values: 0, 1 and 2. This will show radio selection with those 3 options on the main WWW panel.", + "enum": "ChType_LowMidHigh", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "TextField", + "title": "TODO", + "descr": "This is a custom textfield channel, where you can type any value. Used for testing, can be also used for time countdown on TuyaMCU devices. Text field will be shown on main WWW panel", + "enum": "ChType_TextField", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "ReadOnly", + "title": "TODO", + "descr": "This channel is read only. It will just print its value on main WWW page. Of course, you can still write to it with console commands and scripts.", + "enum": "ChType_ReadOnly", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "OffLowMidHigh", + "title": "TODO", + "descr": "Like LowMidHigh, but with 4 options. Some of TuyaMCU fans might require that.", + "enum": "ChType_OffLowMidHigh", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "OffLowestLowMidHighHighest", + "title": "TODO", + "descr": "Like LowMidHigh, but more options. Some of TuyaMCU fans might require that.", + "enum": "ChType_OffLowestLowMidHighHighest", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LowestLowMidHighHighest", + "title": "TODO", + "descr": "Like LowMidHigh, but more options. Some of TuyaMCU fans might require that.", + "enum": "ChType_LowestLowMidHighHighest", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Dimmer256", + "title": "TODO", + "descr": "Just like dimmer, but it's using 0-255 range. Everything else is the same.", + "enum": "ChType_Dimmer256", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Dimmer1000", + "title": "TODO", + "descr": "Just like dimmer, but it's using 0-1000 range. Everything else is the same.", + "enum": "ChType_Dimmer1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Frequency_div100", + "title": "TODO", + "descr": "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", + "enum": "ChType_Frequency_div100", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Voltage_div10", + "title": "TODO", + "descr": "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", + "enum": "ChType_Voltage_div10", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Power", + "title": "TODO", + "descr": "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", + "enum": "ChType_Power", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Current_div100", + "title": "TODO", + "descr": "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", + "enum": "ChType_Current_div100", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "ActivePower", + "title": "TODO", + "descr": "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", + "enum": "ChType_ActivePower", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "PowerFactor_div1000", + "title": "TODO", + "descr": "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", + "enum": "ChType_PowerFactor_div1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "ReactivePower", + "title": "TODO", + "descr": "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", + "enum": "ChType_ReactivePower", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "EnergyTotal_kWh_div1000", + "title": "TODO", + "descr": "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", + "enum": "ChType_EnergyTotal_kWh_div1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "EnergyExport_kWh_div1000", + "title": "TODO", + "descr": "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", + "enum": "ChType_EnergyExport_kWh_div1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "EnergyToday_kWh_div1000", + "title": "TODO", + "descr": "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", + "enum": "ChType_EnergyToday_kWh_div1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Current_div1000", + "title": "TODO", + "descr": "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", + "enum": "ChType_Current_div1000", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "EnergyTotal_kWh_div100", + "title": "TODO", + "descr": "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", + "enum": "ChType_EnergyTotal_kWh_div100", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "OpenClosed", + "title": "TODO", + "descr": "This will show an 'Open' or 'Closed' string on main WWW panel. Useful for door sensors, etc.", + "enum": "ChType_OpenClosed", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "OpenClosed_Inv", + "title": "TODO", + "descr": "Like OpenClosed, but values are inversed.", + "enum": "ChType_OpenClosed_Inv", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BatteryLevelPercent", + "title": "TODO", + "descr": "This will show current value as a battery level percent on the main WWW panel.", + "enum": "ChType_BatteryLevelPercent", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "OffDimBright", + "title": "TODO", + "descr": "A 3 options radio button for lighting control.", + "enum": "ChType_OffDimBright", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Max", + "title": "TODO", + "descr": "This is the current total number of available channel types.", + "enum": "ChType_Max", + "file": "new_pins.h", + "driver": "" + } +] \ No newline at end of file diff --git a/docs/json/commands.json b/docs/json/commands.json new file mode 100644 index 000000000..74ba41268 --- /dev/null +++ b/docs/json/commands.json @@ -0,0 +1,2027 @@ +[ + { + "name": "SetChannel", + "args": "[ChannelIndex][ChannelValue]", + "descr": "Sets a raw channel to given value. Relay channels are using 1 and 0 values. PWM channels are within [0,100] range. Do not use this for LED control, because there is a better and more advanced LED driver with dimming and configuration memory (remembers setting after on/off), LED driver commands has 'led_' prefix.", + "fn": "CMD_SetChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "ToggleChannel", + "args": "[ChannelIndex]", + "descr": "Toggles given channel value. Non-zero becomes zero, zero becomes 1.", + "fn": "CMD_ToggleChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "AddChannel", + "args": "[ChannelIndex][ValueToAdd][ClampMin][ClampMax][bWrapInsteadOfClamp]", + "descr": "Adds a given value to the channel. Can be used to change PWM brightness. Clamp min and max arguments are optional.", + "fn": "CMD_AddChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "ClampChannel", + "args": "[ChannelIndex][Min][Max]", + "descr": "Clamps given channel value to a range.", + "fn": "CMD_ClampChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "SetPinRole", + "args": "[PinRole][RoleIndexOrName]", + "descr": "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.", + "fn": "CMD_SetPinRole", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "SetPinChannel", + "args": "[PinIndex][ChannelIndex]", + "descr": "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.", + "fn": "CMD_SetPinChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "GetChannel", + "args": "[ChannelIndex]", + "descr": "Prints given channel value to console.", + "fn": "CMD_GetChannel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "GetReadings", + "args": "", + "descr": "Prints voltage etc readings to console.", + "fn": "CMD_GetReadings", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "ShortName", + "args": "[Name]", + "descr": "Sets the short name of the device.", + "fn": "CMD_ShortName", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "FriendlyName", + "args": "[Name]", + "descr": "Sets the full name of the device", + "fn": "CMD_FriendlyName", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "PinDeepSleep", + "args": "", + "descr": "Starts a pin deep sleep (deep sleep that can be interrupted by external IO events like a button press)", + "fn": "CMD_PinDeepSleep", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "SetFlag", + "args": "[FlagIndex][1or0]", + "descr": "Enables/disables given flag.", + "fn": "CMD_SetFlag", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "FullBootTime", + "args": "[Value]", + "descr": "Sets time in seconds after which boot is marked as valid. This is related to emergency AP mode which is enabled by powering on/off device 5 times quickly.", + "fn": "CMD_FullBootTime", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "SetChannelLabel", + "args": "[ChannelIndex][Str]", + "descr": "Sets a channel label for UI.", + "fn": "CMD_SetChannelLabel", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "MapRanges", + "args": "[TargetChannel][InputValue][RangeVal0][RangeVal1][RangeValN]", + "descr": "This will set given channel to an index showing where given input value is within given range sections. For example, MapRanges 10 0.5 0.3 0.6 0.9 will set channel 10 to 1 because 0.5 value is between 0.3 and 0.6", + "fn": "CMD_MapRanges", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "Map", + "args": "[TargetChannel][InputValue][InMin][InMax][OutMin][OutMax]", + "descr": "qqq", + "fn": "CMD_Map", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "SetChannelVisible", + "args": "", + "descr": "NULL", + "fn": "CMD_SetChannelVisible", + "file": "cmnds/cmd_channels.c", + "requires": "", + "examples": "" + }, + { + "name": "AddEventHandler", + "args": "[EventName][EventArgument][CommandToRun]", + "descr": "This can be used to trigger an action on a button click, long press, etc", + "fn": "CMD_AddEventHandler", + "file": "cmnds/cmd_eventHandlers.c", + "requires": "", + "examples": "" + }, + { + "name": "AddChangeHandler", + "args": "[Variable][Relation][Constant][Command]", + "descr": "This can listen to change in channel value (for example channel 0 becoming 100), or for a voltage/current/power change for BL0942/BL0937. This supports multiple relations, like ==, !=, >=, < etc. The Variable name for channel is Channel0, Channel2, etc, for BL0XXX it can be 'Power', or 'Current' or 'Voltage'", + "fn": "CMD_AddChangeHandler", + "file": "cmnds/cmd_eventHandlers.c", + "requires": "", + "examples": "" + }, + { + "name": "listEventHandlers", + "args": "", + "descr": "Prints full list of added event handlers", + "fn": "CMD_ListEventHandlers", + "file": "cmnds/cmd_eventHandlers.c", + "requires": "", + "examples": "" + }, + { + "name": "clearAllHandlers", + "args": "", + "descr": "This clears all added event handlers", + "fn": "CMD_ClearAllHandlers", + "file": "cmnds/cmd_eventHandlers.c", + "requires": "", + "examples": "" + }, + { + "name": "aliasMem", + "args": "", + "descr": "Internal usage only. See docs for 'alias' command.", + "fn": "runcmd", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "alias", + "args": "[Alias][Command with spaces]", + "descr": "add an aliased command, so a command with spaces can be called with a short, nospaced alias", + "fn": "alias", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "echo", + "args": "[Message]", + "descr": "Sends given message back to console. This command expands variables, so writing $CH12 will print value of channel 12, etc. Remember that you can also use special channel indices to access persistant flash variables and to access LED variables like dimmer, etc.", + "fn": "CMD_Echo", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "restart", + "args": "", + "descr": "Reboots the module", + "fn": "CMD_Restart", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "reboot", + "args": "", + "descr": "Same as restart. Needed for bkWriter 1.60 which sends 'reboot' cmd before trying to get bus", + "fn": "CMD_Restart", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "clearConfig", + "args": "", + "descr": "Clears all config, including WiFi data", + "fn": "CMD_ClearConfig", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "clearAll", + "args": "", + "descr": "Clears config and all remaining features, like runtime scripts, events, etc", + "fn": "CMD_ClearAll", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "DeepSleep", + "args": "[Seconds]", + "descr": "Starts deep sleep for given amount of seconds.", + "fn": "CMD_DeepSleep", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "PowerSave", + "args": "[Optional 1 or 0, by default 1 is assumed]", + "descr": "Enables dynamic power saving mode on BK and W600. You can also disable power saving with PowerSave 0.", + "fn": "CMD_PowerSave", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "simonirtest", + "args": "", + "descr": "Simons Special Test", + "fn": "CMD_SimonTest", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "if", + "args": "[Condition]['then'][CommandA]['else'][CommandB]", + "descr": "Executed a conditional. Condition should be single line. You must always use 'then' after condition. 'else' is optional. Use aliases or quotes for commands with spaces", + "fn": "CMD_If", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "ota_http", + "args": "[HTTP_URL]", + "descr": "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)", + "fn": "CMD_HTTPOTA", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "scheduleHADiscovery", + "args": "[Seconds]", + "descr": "This will schedule HA discovery, the discovery will happen with given number of seconds, but timer only counts when MQTT is connected. It will not work without MQTT online, so you must set MQTT credentials first.", + "fn": "CMD_ScheduleHADiscovery", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "flags", + "args": "[IntegerValue]", + "descr": "Sets the device flags", + "fn": "CMD_Flags", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "ClearNoPingTime", + "args": "", + "descr": "Command for ping watchdog; it sets the 'time since last ping reply' to 0 again", + "fn": "CMD_ClearNoPingTime", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "SetStartValue", + "args": "[Channel][Value]", + "descr": "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'", + "fn": "CMD_SetStartValue", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "OpenAP", + "args": "", + "descr": "Temporarily disconnects from programmed WiFi network and opens Access Point", + "fn": "CMD_OpenAP", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "SafeMode", + "args": "", + "descr": "Forces device reboot into safe mode (open ap with disabled drivers)", + "fn": "CMD_SafeMode", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "led_dimmer", + "args": "[Value]", + "descr": "set output dimmer 0..100", + "fn": "dimmer", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "Dimmer", + "args": "[Value]", + "descr": "Alias for led_dimmer", + "fn": "dimmer", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "add_dimmer", + "args": "[Value][AddMode]", + "descr": "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).", + "fn": "add_dimmer", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_enableAll", + "args": "[1or0orToggle]", + "descr": "Power on/off LED but remember the RGB(CW) values", + "fn": "enableAll", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_basecolor_rgb", + "args": "[HexValue]", + "descr": "Puts the LED driver in RGB mode and sets given color.", + "fn": "basecolor_rgb", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "Color", + "args": "[HexValue]", + "descr": "Puts the LED driver in RGB mode and sets given color.", + "fn": "basecolor_rgb", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_basecolor_rgbcw", + "args": "", + "descr": "set PWN color using #RRGGBB[cw][ww]", + "fn": "basecolor_rgbcw", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "add_temperature", + "args": "[DeltaValue][bWrapAroundInsteadOfHold]", + "descr": "Adds a given value to current LED temperature. Function can wrap or clamp if max/min is exceeded.", + "fn": "add_temperature", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_temperature", + "args": "[TempValue]", + "descr": "Toggles LED driver into temperature mode and sets given temperature. It using Home Assistant temperature range (in the range from 154-500 defined in homeassistant/util/color.py as HASS_COLOR_MIN and HASS_COLOR_MAX)", + "fn": "temperature", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "CT", + "args": "[TempValue]", + "descr": "Same as led_temperature", + "fn": "temperature", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_colorMult", + "args": "[Value]", + "descr": "Internal usage.", + "fn": "colorMult", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_saturation", + "args": "[Value]", + "descr": "This is an alternate way to set the LED color.", + "fn": "setSaturation", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_hue", + "args": "[Value]", + "descr": "This is an alternate way to set the LED color.", + "fn": "setHue", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_nextColor", + "args": "", + "descr": "Sets the next color from predefined colours list. Our list is the same as in Tasmota.", + "fn": "nextColor", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_lerpSpeed", + "args": "[LerpSpeed]", + "descr": "Sets the speed of colour interpolation, where speed is defined as a number of RGB units per second, so 255 will lerp from 0 to 255 in one second", + "fn": "lerpSpeed", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "HSBColor", + "args": "[H][S][B]", + "descr": "Tasmota-style colour access. Hue in 0-360 range, saturation in 0-100 and brightness in 0-100 range. ", + "fn": "LED_SetBaseColor_HSB", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "HSBColor1", + "args": "[Hue]", + "descr": "Tasmota-style colour access. Sets hue in 0 to 360 range.", + "fn": "setHue", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "HSBColor2", + "args": "[Saturation]", + "descr": "Tasmota-style colour access. Set saturation in 0 to 100 range.", + "fn": "setSaturation", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "HSBColor3", + "args": "[Brightness]", + "descr": "Tasmota-style colour access. Sets brightness in 0 to 100 range.", + "fn": "setBrightness", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_finishFullLerp", + "args": "", + "descr": "This will force-finish LED color interpolation. You can call it after setting the colour to skip the interpolation/smooth transition time. Of course, it makes only sense if you enabled smooth colour transitions.", + "fn": "led_finishFullLerp", + "file": "cmnds/cmd_newLEDDriver.c", + "requires": "", + "examples": "" + }, + { + "name": "led_gammaCtrl", + "args": "sub-cmd [par]", + "descr": "control LED Gamma Correction and Calibration", + "fn": "rgb_gamma_control", + "file": "cmnds/cmd_rgbGamma.c", + "requires": "", + "examples": "led_gammaCtrl on" + }, + { + "name": "addRepeatingEvent", + "args": "[IntervalSeconds][RepeatsOr-1][CommandToRun]", + "descr": "Starts a timer/interval command. Use 'backlog' to fit multiple commands in a single string.", + "fn": "RepeatingEvents_Cmd_AddRepeatingEvent", + "file": "cmnds/cmd_repeatingEvents.c", + "requires": "", + "examples": "" + }, + { + "name": "addRepeatingEventID", + "args": "[IntervalSeconds][RepeatsOr-1][UserID][CommandToRun]", + "descr": "as addRepeatingEvent, but with a given ID. You can later cancel it with cancelRepeatingEvent.", + "fn": "RepeatingEvents_Cmd_AddRepeatingEvent", + "file": "cmnds/cmd_repeatingEvents.c", + "requires": "", + "examples": "addRepeatingEventID 2 -1 123 Power0 Toggle" + }, + { + "name": "cancelRepeatingEvent", + "args": "[UserIDInteger]", + "descr": "Stops a given repeating event with a specified ID", + "fn": "RepeatingEvents_Cmd_CancelRepeatingEvent", + "file": "cmnds/cmd_repeatingEvents.c", + "requires": "", + "examples": "" + }, + { + "name": "clearRepeatingEvents", + "args": "", + "descr": "Clears all repeating events.", + "fn": "RepeatingEvents_Cmd_ClearRepeatingEvents", + "file": "cmnds/cmd_repeatingEvents.c", + "requires": "", + "examples": "" + }, + { + "name": "listRepeatingEvents", + "args": "", + "descr": "lists all repeating events", + "fn": "RepeatingEvents_Cmd_ListRepeatingEvents", + "file": "cmnds/cmd_repeatingEvents.c", + "requires": "", + "examples": "" + }, + { + "name": "startScript", + "args": "[FileName][Label][UniqueID]", + "descr": "Starts a script thread from given file, at given label - can be * for whole file, with given unique ID", + "fn": "CMD_StartScript", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "stopScript", + "args": "[UniqueID]", + "descr": "Force-stop given script thread by ID", + "fn": "CMD_StopScript", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "stopAllScripts", + "args": "", + "descr": "Stops all running scripts", + "fn": "CMD_StopAllScripts", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "listScripts", + "args": "", + "descr": "Lists all running scripts.", + "fn": "CMD_ListScripts", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "goto", + "args": "[LabelStr]", + "descr": "Script-only command. IF single argument is given, then goes to given label from within current script file. If two arguments are given, then jumps to any other script file by label - first argument is file, second label", + "fn": "CMD_GoTo", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "delay_s", + "args": "[ValueSeconds]", + "descr": "Script-only command. Pauses current script thread for given amount of seconds.", + "fn": "CMD_Delay_s", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "delay_ms", + "args": "[ValueMS]", + "descr": "Script-only command. Pauses current script thread for given amount of ms.", + "fn": "CMD_Delay_ms", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "return", + "args": "", + "descr": "Script-only command. Currently it just stops totally current script thread.", + "fn": "CMD_Return", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "resetSVM", + "args": "", + "descr": "Resets all SVM and clears all scripts.", + "fn": "CMD_resetSVM", + "file": "cmnds/cmd_script.c", + "requires": "", + "examples": "" + }, + { + "name": "sendGet", + "args": "[TargetURL]", + "descr": "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.", + "fn": "CMD_SendGET", + "file": "cmnds/cmd_send.c", + "requires": "", + "examples": "" + }, + { + "name": "power", + "args": "[OnorOfforToggle]", + "descr": "Tasmota-style POWER command. Should work for both LEDs and relay-based devices. You can write POWER0, POWER1, etc to access specific relays.", + "fn": "power", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "powerAll", + "args": "", + "descr": "set all outputs", + "fn": "powerAll", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "backlog", + "args": "[string of commands separated with ;]", + "descr": "run a sequence of ; separated commands", + "fn": "cmnd_backlog", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "exec", + "args": "[Filename]", + "descr": "exec - run autoexec.bat or other file from LFS if present", + "fn": "cmnd_lfsexec", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "SSID1", + "args": "[ValueString]", + "descr": "Sets the SSID of target WiFi. Command keeps Tasmota syntax.", + "fn": "cmnd_SSID1", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "Password1", + "args": "[ValueString]", + "descr": "Sets the Pass of target WiFi. Command keeps Tasmota syntax", + "fn": "cmnd_Password1", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "MqttHost", + "args": "[ValueString]", + "descr": "Sets the MQTT host. Command keeps Tasmota syntax", + "fn": "cmnd_MqttHost", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "MqttUser", + "args": "[ValueString]", + "descr": "Sets the MQTT user. Command keeps Tasmota syntax", + "fn": "cmnd_MqttUser", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "MqttPassword", + "args": "[ValueString]", + "descr": "Sets the MQTT pass. Command keeps Tasmota syntax", + "fn": "cmnd_MqttPassword", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "MqttClient", + "args": "[ValueString]", + "descr": "Sets the MQTT client. Command keeps Tasmota syntax", + "fn": "cmnd_MqttClient", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "State", + "args": "NULL", + "descr": "NULL", + "fn": "cmnd_State", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "testMallocFree", + "args": "", + "descr": "Test malloc and free functionality to see if the device crashes", + "fn": "testMallocFree", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testRealloc", + "args": "", + "descr": "Test realloc and free functions to see if the device crashes", + "fn": "testRealloc", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testJSON", + "args": "", + "descr": "Test the JSON library", + "fn": "testJSON", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testLog", + "args": "", + "descr": "Do some test printfs to log with integer and a float", + "fn": "testLog", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testFloats", + "args": "", + "descr": "Do some more test printfs with floating point numbers", + "fn": "testFloats", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testArgs", + "args": "", + "descr": "Test tokenizer for args and print back all the given args to console", + "fn": "testArgs", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "testStrdup", + "args": "", + "descr": "Test strdup function to see if it allocs news string correctly, also test freeing the string", + "fn": "testStrdup", + "file": "cmnds/cmd_test.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_test1", + "args": "[FileName]", + "descr": "Tests the LFS file reading feature.", + "fn": "cmnd_lfs_test1", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_test2", + "args": "[FileName]", + "descr": "Tests the LFS file reading feature.", + "fn": "cmnd_lfs_test2", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_test3", + "args": "[FileName]", + "descr": "Tests the LFS file reading feature.", + "fn": "cmnd_lfs_test3", + "file": "cmnds/cmd_tasmota.c", + "requires": "", + "examples": "" + }, + { + "name": "Battery_Setup", + "args": "[int][int][float][int][int]", + "descr": "measure battery based on ADC args minbatt and maxbatt in mv. optional V_divider(2), Vref(default 2400) and ADC bits(4096) and ", + "fn": "Battery_Setup", + "file": "drv/drv_battery.c", + "requires": "", + "examples": "Battery_Setup 1500 3000 2 2400 4096" + }, + { + "name": "Battery_cycle", + "args": "[int]", + "descr": "change cycle of measurement by default every 10 seconds", + "fn": "Battery_cycle", + "file": "drv/drv_battery.c", + "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", + "file": "driver/drv_bl0937.c", + "requires": "", + "examples": "" + }, + { + "name": "EnergyCntReset", + "args": "", + "descr": "Reset Energy Counter", + "fn": "BL09XX_ResetEnergyCounter", + "file": "driver/drv_bl_shared.c", + "requires": "", + "examples": "" + }, + { + "name": "SetupEnergyStats", + "args": "[Enable1or0][SampleTime][SampleCount]", + "descr": "Setup Energy Statistic Parameters: [enable<0|1>] [sample_time<10..900>] [sample_count<10..180>]", + "fn": "BL09XX_SetupEnergyStatistic", + "file": "driver/drv_bl_shared.c", + "requires": "", + "examples": "" + }, + { + "name": "ConsumptionThresold", + "args": "[FloatValue]", + "descr": "Setup value for automatic save of consumption data [1..100]", + "fn": "BL09XX_SetupConsumptionThreshold", + "file": "driver/drv_bl_shared.c", + "requires": "", + "examples": "" + }, + { + "name": "BP1658CJ_RGBCW", + "args": "[HexColor]", + "descr": "Don't use it. It's for direct access of BP1658CJ driver. You don't need it because LED driver automatically calls it, so just use led_basecolor_rgb", + "fn": "BP1658CJ_RGBCW", + "file": "driver/drv_bp1658cj.c", + "requires": "", + "examples": "" + }, + { + "name": "BP1658CJ_Map", + "args": "[Ch0][Ch1][Ch2][Ch3][Ch4]", + "descr": "Maps the RGBCW values to given indices of BP1658CJ channels. This is because BP5758D channels order is not the same for some devices. Some devices are using RGBCW order and some are using GBRCW, etc, etc. Example usage: BP1658CJ_Map 0 1 2 3 4", + "fn": "BP1658CJ_Map", + "file": "driver/drv_bp1658cj.c", + "requires": "", + "examples": "" + }, + { + "name": "BP1658CJ_Current", + "args": "[MaxCurrentRGB][MaxCurrentCW]", + "descr": "Sets the maximum current limit for BP1658CJ driver", + "fn": "BP1658CJ_Current", + "file": "driver/drv_bp1658cj.c", + "requires": "", + "examples": "" + }, + { + "name": "BP5758D_RGBCW", + "args": "[HexColor]", + "descr": "Don't use it. It's for direct access of BP5758D driver. You don't need it because LED driver automatically calls it, so just use led_basecolor_rgb", + "fn": "BP5758D_RGBCW", + "file": "driver/drv_bp5758d.c", + "requires": "", + "examples": "" + }, + { + "name": "BP5758D_Map", + "args": "[Ch0][Ch1][Ch2][Ch3][Ch4]", + "descr": "Maps the RGBCW values to given indices of BP5758D channels. This is because BP5758D channels order is not the same for some devices. Some devices are using RGBCW order and some are using GBRCW, etc, etc. Example usage: BP5758D_Map 0 1 2 3 4", + "fn": "BP5758D_Map", + "file": "driver/drv_bp5758d.c", + "requires": "", + "examples": "" + }, + { + "name": "BP5758D_Current", + "args": "[MaxCurrent]", + "descr": "Sets the maximum current limit for BP5758D driver", + "fn": "BP5758D_Current", + "file": "driver/drv_bp5758d.c", + "requires": "", + "examples": "" + }, + { + "name": "BridgePulseLength", + "args": "[FloatValue]", + "descr": "Setup value for bridge pulse len", + "fn": "Bridge_Pulse_length", + "file": "driver/drv_bridge_driver.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonColor", + "args": "[ButtonIndex][Color]", + "descr": "Sets the colour of custom scriptable HTTP page button", + "fn": "CMD_setButtonColor", + "file": "driver/drv_httpButtons.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonCommand", + "args": "[ButtonIndex][Command]", + "descr": "Sets the command of custom scriptable HTTP page button", + "fn": "CMD_setButtonCommand", + "file": "driver/drv_httpButtons.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonLabel", + "args": "[ButtonIndex][Label]", + "descr": "Sets the label of custom scriptable HTTP page button", + "fn": "CMD_setButtonLabel", + "file": "driver/drv_httpButtons.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonEnabled", + "args": "[ButtonIndex][1or0]", + "descr": "Sets the visibility of custom scriptable HTTP page button", + "fn": "CMD_setButtonEnabled", + "file": "driver/drv_httpButtons.c", + "requires": "", + "examples": "" + }, + { + "name": "IRSend", + "args": "[PROT-ADDR-CMD-REP]", + "descr": "Sends IR commands in the form PROT-ADDR-CMD-REP, e.g. NEC-1-1A-0", + "fn": "IR_Send_Cmd", + "file": "driver/drv_ir.cpp", + "requires": "", + "examples": "" + }, + { + "name": "IRAC", + "args": "IR_AC_Cmd", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_ir.cpp", + "requires": "", + "examples": "" + }, + { + "name": "IREnable", + "args": "[Str][1or0]", + "descr": "Enable/disable aspects of IR. IREnable RXTX 0/1 - enable Rx whilst Tx. IREnable [protocolname] 0/1 - enable/disable a specified protocol", + "fn": "IR_Enable", + "file": "driver/drv_ir.cpp", + "requires": "", + "examples": "" + }, + { + "name": "startDriver", + "args": "[DriverName]", + "descr": "Starts driver", + "fn": "DRV_Start", + "file": "driver/drv_main.c", + "requires": "", + "examples": "" + }, + { + "name": "stopDriver", + "args": "[DriverName]", + "descr": "Stops driver", + "fn": "DRV_Stop", + "file": "driver/drv_main.c", + "requires": "", + "examples": "" + }, + { + "name": "MAX72XX_Setup", + "args": "[Value]", + "descr": "Sets the maximum current for LED driver.", + "fn": "SM2135_Current", + "file": "driver/drv_sm2135.c", + "requires": "", + "examples": "" + }, + { + "name": "ntp_timeZoneOfs", + "args": "[Value]", + "descr": "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.", + "fn": "NTP_SetTimeZoneOfs", + "file": "driver/drv_ntp.c", + "requires": "", + "examples": "" + }, + { + "name": "ntp_setServer", + "args": "[ServerIP]", + "descr": "Sets the NTP server", + "fn": "NTP_SetServer", + "file": "driver/drv_ntp.c", + "requires": "", + "examples": "" + }, + { + "name": "ntp_info", + "args": "", + "descr": "Display NTP related settings", + "fn": "NTP_Info", + "file": "driver/drv_ntp.c", + "requires": "", + "examples": "" + }, + { + "name": "addClockEvent", + "args": "[Time] [WeekDayFlags] [UniqueIDForRemoval][Command]", + "descr": "Schedule command to run on given time in given day of week. NTP must be running. 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 removede later", + "fn": "CMD_NTP_AddClockEvent", + "file": "driver/drv_ntp_events.c", + "requires": "", + "examples": "" + }, + { + "name": "removeClockEvent", + "args": "[ID]", + "descr": "Removes clock event wtih given ID", + "fn": "CMD_NTP_RemoveClockEvent", + "file": "driver/drv_ntp_events.c", + "requires": "", + "examples": "" + }, + { + "name": "listClockEvents", + "args": "", + "descr": "Print the complete set clock events list", + "fn": "CMD_NTP_ListEvents", + "file": "driver/drv_ntp_events.c", + "requires": "", + "examples": "" + }, + { + "name": "clearClockEvents", + "args": "", + "descr": "Removes all set clock events", + "fn": "CMD_NTP_ClearEvents", + "file": "driver/drv_ntp_events.c", + "requires": "", + "examples": "" + }, + { + "name": "toggler_enable", + "args": "[1or0]", + "descr": "Sets the given output ON or OFF. handles toggler_enable0, toggler_enable1, etc", + "fn": "Toggler_EnableX", + "file": "driver/drv_pwmToggler.c", + "requires": "", + "examples": "" + }, + { + "name": "toggler_set", + "args": "[Value]", + "descr": "Sets the VALUE of given output. Handles toggler_set0, toggler_set1, etc. The last digit after command name is changed to slot index.", + "fn": "Toggler_SetX", + "file": "driver/drv_pwmToggler.c", + "requires": "", + "examples": "" + }, + { + "name": "toggler_channel", + "args": "[ChannelIndex]", + "descr": "handles toggler_channel0, toggler_channel1. Sets channel linked to given toggler slot.", + "fn": "Toggler_ChannelX", + "file": "driver/drv_pwmToggler.c", + "requires": "", + "examples": "" + }, + { + "name": "toggler_name", + "args": "", + "descr": "Handles toggler_name0, toggler_name1, etc. Sets the name of a toggler for GUI.", + "fn": "Toggler_NameX", + "file": "driver/drv_pwmToggler.c", + "requires": "", + "examples": "" + }, + { + "name": "SHT_cycle", + "args": "[int]", + "descr": "change cycle of measurement by default every 10 seconds 0 to deactivate", + "fn": "SHT_cycle", + "file": "drv/drv_sht3x.c", + "requires": "", + "examples": "SHT_Cycle 60" + }, + { + "name": "SHT_Calibrate", + "args": "", + "descr": "Calibrate the SHT Sensor as Tolerance is +/-2 degrees C.", + "fn": "SHT3X_Calibrate", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_Calibrate -4 10" + }, + { + "name": "SHT_MeasurePer", + "args": "", + "descr": "Retrieve Periodical measurement for SHT", + "fn": "SHT3X_MeasurePer", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_Measure" + }, + { + "name": "SHT_LaunchPer", + "args": "[msb][lsb]", + "descr": "Launch/Change periodical capture for SHT Sensor", + "fn": "SHT3X_ChangePer", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_LaunchPer 0x23 0x22" + }, + { + "name": "SHT_StopPer", + "args": "", + "descr": "Stop periodical capture for SHT Sensor", + "fn": "SHT3X_StopPerCmd", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "" + }, + { + "name": "SHT_Measure", + "args": "", + "descr": "Retrieve OneShot measurement for SHT", + "fn": "SHT3X_Measure", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_Measure" + }, + { + "name": "SHT_Heater", + "args": "", + "descr": "Activate or Deactivate Heater (0 / 1)", + "fn": "SHT3X_Heater", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_Heater 1" + }, + { + "name": "SHT_GetStatus", + "args": "", + "descr": "Get Sensor Status", + "fn": "SHT3X_GetStatus", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_GetStatusCmd" + }, + { + "name": "SHT_ClearStatus", + "args": "", + "descr": "Clear Sensor Status", + "fn": "SHT3X_ClearStatus", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_ClearStatusCmd" + }, + { + "name": "SHT_ReadAlert", + "args": "", + "descr": "Get Sensor alert configuration", + "fn": "SHT3X_ReadAlertcmd", + "file": "driver/drv_sht3x.c", + "requires": "", + "examples": "SHT_ReadAlertCmd" + }, + { + "name": "SHT_SetAlert", + "args": "[temp_high, temp_low, hum_high, hum_low]", + "descr": "Set Sensor alert configuration", + "fn": "SHT3X_SetAlertcmd", + "file": "driver/drv_sht3x.c", + "requires": "all", + "examples": "SHT_SetAlertCmd" + }, + { + "name": "SM16703P_Test", + "args": "", + "descr": "qq", + "fn": "SM16703P_Test", + "file": "driver/drv_ucs1912.c", + "requires": "", + "examples": "" + }, + { + "name": "SM16703P_Send", + "args": "", + "descr": "NULL", + "fn": "SM16703P_Send_Cmd", + "file": "driver/drv_sm16703P.c", + "requires": "", + "examples": "" + }, + { + "name": "SM16703P_Test_3xZero", + "args": "", + "descr": "NULL", + "fn": "SM16703P_Test_3xZero", + "file": "driver/drv_sm16703P.c", + "requires": "", + "examples": "" + }, + { + "name": "SM16703P_Test_3xOne", + "args": "", + "descr": "NULL", + "fn": "SM16703P_Test_3xOne", + "file": "driver/drv_sm16703P.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2135_RGBCW", + "args": "[HexColor]", + "descr": "Don't use it. It's for direct access of SM2135 driver. You don't need it because LED driver automatically calls it, so just use led_basecolor_rgb", + "fn": "SM2135_RGBCW", + "file": "driver/drv_sm2135.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2135_Map", + "args": "[Ch0][Ch1][Ch2][Ch3][Ch4]", + "descr": "Maps the RGBCW values to given indices of SM2135 channels. This is because SM2135 channels order is not the same for some devices. Some devices are using RGBCW order and some are using GBRCW, etc, etc. Example usage: SM2135_Map 0 1 2 3 4", + "fn": "SM2135_Map", + "file": "driver/drv_sm2135.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2135_Current", + "args": "[Value]", + "descr": "Sets the maximum current for LED driver.", + "fn": "SM2135_Current", + "file": "driver/drv_sm2135.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2235_RGBCW", + "args": "[HexColor]", + "descr": "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", + "fn": "SM2235_RGBCW", + "file": "driver/drv_sm2235.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2235_Map", + "args": "[Ch0][Ch1][Ch2][Ch3][Ch4]", + "descr": "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", + "fn": "SM2235_Map", + "file": "driver/drv_sm2235.c", + "requires": "", + "examples": "" + }, + { + "name": "SM2235_Current", + "args": "[Value]", + "descr": "Sets the maximum current for LED driver.", + "fn": "SM2235_Current", + "file": "driver/drv_sm2235.c", + "requires": "", + "examples": "" + }, + { + "name": "obkDeviceList", + "args": "", + "descr": "Generate the SSDP list of OpenBeken devices found on the network.", + "fn": "Cmd_obkDeviceList", + "file": "driver/drv_ssdp.c", + "requires": "", + "examples": "" + }, + { + "name": "DGR_SendPower", + "args": "[GroupName][ChannelValues][ChannelsCount]", + "descr": "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.", + "fn": "CMD_DGR_SendPower", + "file": "driver/drv_tasmotaDeviceGroups.c", + "requires": "", + "examples": "" + }, + { + "name": "DGR_SendBrightness", + "args": "[GroupName][Brightness]", + "descr": "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.", + "fn": "CMD_DGR_SendBrightness", + "file": "driver/drv_tasmotaDeviceGroups.c", + "requires": "", + "examples": "" + }, + { + "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.", + "fn": "CMD_DGR_SendRGBCW", + "file": "driver/drv_tasmotaDeviceGroups.c", + "requires": "", + "examples": "" + }, + { + "name": "DGR_SendFixedColor", + "args": "[GroupName][TasColorIndex]", + "descr": "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.", + "fn": "CMD_DGR_SendFixedColor", + "file": "driver/drv_tasmotaDeviceGroups.c", + "requires": "", + "examples": "" + }, + { + "name": "SetupTestPower", + "args": "", + "descr": "NULL", + "fn": "TestPower_Setup", + "file": "driver/drv_test_drivers.c", + "requires": "", + "examples": "" + }, + { + "name": "TM1637_Clear", + "args": "CMD_TM1637_Clear", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_tm1637.c", + "requires": "", + "examples": "" + }, + { + "name": "TM1637_Print", + "args": "CMD_TM1637_Print", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_tm1637.c", + "requires": "", + "examples": "" + }, + { + "name": "TM1637_Test", + "args": "CMD_TM1637_Test", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_tm1637.c", + "requires": "", + "examples": "" + }, + { + "name": "TM1637_Brightness", + "args": "CMD_TM1637_Brightness", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_tm1637.c", + "requires": "", + "examples": "" + }, + { + "name": "TM1637_Map", + "args": "CMD_TM1637_Map", + "descr": "", + "fn": "NULL);", + "file": "driver/drv_tm1637.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_testSendTime", + "args": "", + "descr": "Sends a example date by TuyaMCU to clock/callendar MCU", + "fn": "TuyaMCU_Send_SetTime_Example", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendCurTime", + "args": "", + "descr": "Sends a current date by TuyaMCU to clock/callendar MCU. Time is taken from NTP driver, so NTP also should be already running.", + "fn": "TuyaMCU_Send_SetTime_Current", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "linkTuyaMCUOutputToChannel", + "args": "[dpId][varType][channelID]", + "descr": "Used to map between TuyaMCU dpIDs and our internal channels. Mapping works both ways. DpIDs are per-device, you can get them by sniffing UART communication. Vartypes can also be sniffed from Tuya. VarTypes can be following: 0-raw, 1-bool, 2-value, 3-string, 4-enum, 5-bitmap", + "fn": "TuyaMCU_LinkTuyaMCUOutputToChannel", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_setDimmerRange", + "args": "[Min][Max]", + "descr": "Set dimmer range used by TuyaMCU", + "fn": "TuyaMCU_SetDimmerRange", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendHeartbeat", + "args": "", + "descr": "Send heartbeat to TuyaMCU", + "fn": "TuyaMCU_SendHeartbeat", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendQueryState", + "args": "", + "descr": "Send query state command", + "fn": "TuyaMCU_SendQueryState", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendProductInformation", + "args": "", + "descr": "Send qqq", + "fn": "TuyaMCU_SendQueryProductInformation", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendState", + "args": "", + "descr": "Send set state command", + "fn": "TuyaMCU_SendStateCmd", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendMCUConf", + "args": "", + "descr": "Send MCU conf command", + "fn": "TuyaMCU_SendMCUConf", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "fakeTuyaPacket", + "args": "", + "descr": "", + "fn": "TuyaMCU_FakePacket", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_setBaudRate", + "args": "[BaudValue]", + "descr": "Sets the baud rate used by TuyaMCU UART communication. Default value is 9600.", + "fn": "TuyaMCU_SetBaudRate", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_sendRSSI", + "args": "", + "descr": "Command sends the specific RSSI value to TuyaMCU (it will send current RSSI if no argument is set)", + "fn": "Cmd_TuyaMCU_Send_RSSI", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "tuyaMcu_defWiFiState", + "args": "", + "descr": "Command sets the default WiFi state for TuyaMCU when device is not online.", + "fn": "Cmd_TuyaMCU_Send_RSSI", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "uartSendHex", + "args": "[HexString]", + "descr": "Sends raw data by UART, can be used to send TuyaMCU data, but you must write whole packet with checksum yourself", + "fn": "CMD_UART_Send_Hex", + "file": "driver/drv_tuyaMCU.c", + "requires": "", + "examples": "" + }, + { + "name": "uartSendASCII", + "args": "[AsciiString]", + "descr": "Sends given string by UART.", + "fn": "CMD_UART_Send_ASCII", + "file": "driver/drv_uart.c", + "requires": "", + "examples": "" + }, + { + "name": "uartFakeHex", + "args": "[HexString]", + "descr": "Spoofs a fake hex packet so it looks like TuyaMCU send that to us. Used for testing.", + "fn": "CMD_UART_FakeHex", + "file": "driver/drv_uart.c", + "requires": "", + "examples": "" + }, + { + "name": "UCS1912_Test", + "args": "", + "descr": "", + "fn": "UCS1912_Test", + "file": "driver/drv_ucs1912.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_clearAndGoto", + "args": "", + "descr": "Clears LCD and go to pos", + "fn": "DRV_I2C_LCD_PCF8574_ClearAndGoTo", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_goto", + "args": "", + "descr": "Go to position on LCD", + "fn": "DRV_I2C_LCD_PCF8574_GoTo", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_print", + "args": "", + "descr": "Prints a string on the LCD", + "fn": "DRV_I2C_LCD_PCF8574_Print", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_printFloat", + "args": "", + "descr": "Prints a float on the LCD", + "fn": "DRV_I2C_LCD_PCF8574_PrintFloat", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_printInt", + "args": "", + "descr": "Prints an omt on the LCD", + "fn": "DRV_I2C_LCD_PCF8574_PrintInt", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "lcd_clear", + "args": "", + "descr": "Clears the LCD", + "fn": "DRV_I2C_LCD_PCF8574_Clear", + "file": "i2c/drv_i2c_lcd_pcf8574t.c", + "requires": "", + "examples": "" + }, + { + "name": "addI2CDevice_TC74", + "args": "", + "descr": "Adds a new I2C device - TC74", + "fn": "DRV_I2C_AddDevice_TC74", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "addI2CDevice_MCP23017", + "args": "", + "descr": "Adds a new I2C device - MCP23017", + "fn": "DRV_I2C_AddDevice_MCP23017", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "addI2CDevice_LCM1602", + "args": "", + "descr": "Adds a new I2C device - LCM1602", + "fn": "DRV_I2C_AddDevice_LCM1602", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "addI2CDevice_LCD_PCF8574", + "args": "", + "descr": "Adds a new I2C device - PCF8574", + "fn": "DRV_I2C_AddDevice_PCF8574", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "MCP23017_MapPinToChannel", + "args": "", + "descr": "Maps port expander bit to OBK channel", + "fn": "DRV_I2C_MCP23017_MapPinToChannel", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "scanI2C", + "args": "", + "descr": "", + "fn": "DRV_I2C_MCP23017_MapPinToChannel", + "file": "i2c/drv_i2c_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_size", + "args": "[MaxSize]", + "descr": "Log or Set LFS size - will apply and re-format next boot, usage setlfssize 0x10000", + "fn": "CMD_LFS_Size", + "file": "littlefs/our_lfs.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_unmount", + "args": "", + "descr": "Un-mount LFS", + "fn": "CMD_LFS_Unmount", + "file": "littlefs/our_lfs.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_mount", + "args": "", + "descr": "Mount LFS", + "fn": "CMD_LFS_Mount", + "file": "littlefs/our_lfs.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_format", + "args": "", + "descr": "Unmount and format LFS. Optionally add new size as argument", + "fn": "CMD_LFS_Format", + "file": "littlefs/our_lfs.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_append", + "args": "[FileName][String]", + "descr": "Appends a string to LFS file", + "fn": "CMD_LFS_Append", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_appendFloat", + "args": "[FileName][Float]", + "descr": "Appends a float to LFS file", + "fn": "CMD_LFS_AppendFloat", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_appendInt", + "args": "[FileName][Int]", + "descr": "Appends a Int to LFS file", + "fn": "CMD_LFS_AppendInt", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_appendLine", + "args": "[FileName][String]", + "descr": "Appends a string to LFS file with a next line marker", + "fn": "CMD_LFS_AppendLine", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_remove", + "args": "[FileName]", + "descr": "Deletes a LittleFS file", + "fn": "CMD_LFS_Remove", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_write", + "args": "[FileName][String]", + "descr": "Resets a LFS file and writes a new string to it", + "fn": "CMD_LFS_Write", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "lfs_writeLine", + "args": "[FileName][String]", + "descr": "Resets a LFS file and writes a new string to it with newline", + "fn": "CMD_LFS_WriteLine", + "file": "cmnds/cmd_main.c", + "requires": "", + "examples": "" + }, + { + "name": "loglevel", + "args": "[Value]", + "descr": "Correct values are 0 to 7. Default is 3. Higher value includes more logs. Log levels are: ERROR = 1, WARN = 2, INFO = 3, DEBUG = 4, EXTRADEBUG = 5. WARNING: you also must separately select logging level filter on web panel in order for more logs to show up there", + "fn": "log_command", + "file": "logging/logging.c", + "requires": "", + "examples": "" + }, + { + "name": "logfeature", + "args": "[Index][1or0]", + "descr": "set log feature filter, as an index and a 1 or 0", + "fn": "log_command", + "file": "logging/logging.c", + "requires": "", + "examples": "" + }, + { + "name": "logtype", + "args": "[TypeStr]", + "descr": "logtype direct|thread|none - type of serial logging - thread (in a thread; default), direct (logged directly to serial), none (no UART logging)", + "fn": "log_command", + "file": "logging/logging.c", + "requires": "", + "examples": "" + }, + { + "name": "logdelay", + "args": "[Value]", + "descr": "Value is a number of ms. This will add an artificial delay in each log call. Useful for debugging. This way you can see step by step what happens.", + "fn": "log_command", + "file": "logging/logging.c", + "requires": "", + "examples": "" + }, + { + "name": "publish", + "args": "[Topic][Value]", + "descr": "Publishes data by MQTT. The final topic will be obk0696FB33/[Topic]/get. You can use argument expansion here, so $CH11 will change to value of the channel 11", + "fn": "MQTT_PublishCommand", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "publishInt", + "args": "[Topic][Value]", + "descr": "Publishes data by MQTT. The final topic will be obk0696FB33/[Topic]/get. You can use argument expansion here, so $CH11 will change to value of the channel 11. This version of command publishes an integer, so you can also use math expressions like $CH10*10, etc.", + "fn": "MQTT_PublishCommand", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "publishFloat", + "args": "[Topic][Value]", + "descr": "Publishes data by MQTT. The final topic will be obk0696FB33/[Topic]/get. You can use argument expansion here, so $CH11 will change to value of the channel 11. This version of command publishes an float, so you can also use math expressions like $CH10*0.0, etc.", + "fn": "MQTT_PublishCommand", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "publishAll", + "args": "", + "descr": "Starts the step by step publish of all available values", + "fn": "MQTT_PublishAll", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "publishChannels", + "args": "", + "descr": "Starts the step by step publish of all channel values", + "fn": "MQTT_PublishChannels", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "publishBenchmark", + "args": "", + "descr": "", + "fn": "MQTT_StartMQTTTestThread", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "mqtt_broadcastInterval", + "args": "[ValueSeconds]", + "descr": "If broadcast self state every 60 seconds/minute is enabled in flags, this value allows you to change the delay, change this 60 seconds to any other value in seconds. This value is not saved, you must use autoexec.bat or short startup command to execute it on every reboot.", + "fn": "MQTT_SetBroadcastInterval", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "mqtt_broadcastItemsPerSec", + "args": "[PublishCountPerSecond]", + "descr": "If broadcast self state (this option in flags) is started, then gradually device info is published, with a speed of N publishes per second. Do not set too high value, it may overload LWIP MQTT library. This value is not saved, you must use autoexec.bat or short startup command to execute it on every reboot.", + "fn": "MQTT_SetMaxBroadcastItemsPublishedPerSecond", + "file": "mqtt/new_mqtt.c", + "requires": "", + "examples": "" + }, + { + "name": "showgpi", + "args": "NULL", + "descr": "log stat of all GPIs", + "fn": "showgpi", + "file": "new_pins.c", + "requires": "", + "examples": "" + }, + { + "name": "setChannelType", + "args": "[ChannelIndex][TypeString]", + "descr": "Sets a custom type for channel. Types are mostly used to determine how to display channel value on GUI", + "fn": "CMD_SetChannelType", + "file": "new_pins.c", + "requires": "", + "examples": "" + }, + { + "name": "showChannelValues", + "args": "", + "descr": "log channel values", + "fn": "CMD_ShowChannelValues", + "file": "new_pins.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonTimes", + "args": "[ValLongPress][ValShortPress][ValRepeat]", + "descr": "Each value is times 100ms, so: SetButtonTimes 2 1 1 means 200ms long press, 100ms short and 100ms repeat", + "fn": "CMD_SetButtonTimes", + "file": "new_pins.c", + "requires": "", + "examples": "" + }, + { + "name": "setButtonHoldRepeat", + "args": "[Value]", + "descr": "Sets just the hold button repeat time, given value is times 100ms, so write 1 for 100ms, 2 for 200ms, etc", + "fn": "CMD_setButtonHoldRepeat", + "file": "new_pins.c", + "requires": "", + "examples": "" + } +] \ No newline at end of file diff --git a/docs/json/constants.json b/docs/json/constants.json new file mode 100644 index 000000000..e4c7f6cb4 --- /dev/null +++ b/docs/json/constants.json @@ -0,0 +1,110 @@ +[ + { + "name": "MQTTOn", + "title": "MQTTOn", + "descr": "Legacy variable, without $ prefix. Returns 1 if MQTT is connected, otherwise 0.", + "requires": "" + }, + { + "name": "$MQTTOn", + "title": "$MQTTOn", + "descr": "Returns 1 if MQTT is connected, otherwise 0.", + "requires": "" + }, + { + "name": "$CH***", + "title": "$CH***", + "descr": "Provides channel access, so you can do math expressions on channel values. $CH1 is channel 1, $CH20 is channel 20, $CH140 is channel 140, etc", + "requires": "" + }, + { + "name": "$CH**", + "title": "$CH**", + "descr": "Provides channel access, as above.", + "requires": "" + }, + { + "name": "$CH*", + "title": "$CH*", + "descr": "Provides channel access, as above.", + "requires": "" + }, + { + "name": "$led_dimmer", + "title": "$led_dimmer", + "descr": "Current value of LED dimmer, 0-100 range", + "requires": "" + }, + { + "name": "$led_enableAll", + "title": "$led_enableAll", + "descr": "Returns 1 if LED is enabled, otherwise 0.", + "requires": "" + }, + { + "name": "$led_hue", + "title": "$led_hue", + "descr": "Current LED Hue value", + "requires": "" + }, + { + "name": "$led_red", + "title": "$led_red", + "descr": "Current LED red value", + "requires": "" + }, + { + "name": "$led_green", + "title": "$led_green", + "descr": "Current LED green value", + "requires": "" + }, + { + "name": "$led_blue", + "title": "$led_blue", + "descr": "Current LED blue value", + "requires": "" + }, + { + "name": "$led_saturation", + "title": "$led_saturation", + "descr": "Current LED saturation value", + "requires": "" + }, + { + "name": "$led_temperature", + "title": "$led_temperature", + "descr": "Current LED temperature value", + "requires": "" + }, + { + "name": "$activeRepeatingEvents", + "title": "$activeRepeatingEvents", + "descr": "Current number of active repeating events", + "requires": "" + }, + { + "name": "$voltage", + "title": "$voltage", + "descr": "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.", + "requires": "" + }, + { + "name": "$current", + "title": "$current", + "descr": "Current value of current from energy metering chip", + "requires": "" + }, + { + "name": "$power", + "title": "$power", + "descr": "Current value of power from energy metering chip", + "requires": "" + }, + { + "name": "$uptime", + "title": "$uptime", + "descr": "Time since reboot in seconds", + "requires": "" + } +] \ No newline at end of file diff --git a/docs/json/drivers.json b/docs/json/drivers.json new file mode 100644 index 000000000..ce72356ac --- /dev/null +++ b/docs/json/drivers.json @@ -0,0 +1,170 @@ +[ + { + "name": "TuyaMCU", + "title": "TODO", + "descr": "TuyaMCU is a protocol used for communication between WiFI module and external MCU. This protocol is using usually RX1/TX1 port of BK chips.", + "requires": "" + }, + { + "name": "tmSensor", + "title": "TODO", + "descr": "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. Read more [https://www.elektroda.com/rtvforum/topic3914412.html](here).", + "requires": "" + }, + { + "name": "NTP", + "title": "TODO", + "descr": "NTP driver is required to get current time and date from web. Without it, there is no correct datetime.", + "requires": "" + }, + { + "name": "TESTPOWER", + "title": "TODO", + "descr": "This is a fake POWER measuring socket driver, only for testing", + "requires": "" + }, + { + "name": "TESTLED", + "title": "TODO", + "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", + "descr": "Generic I2C, not used for LED drivers, but may be useful for displays or port expanders. Supports both hardware and software I2C.", + "requires": "" + }, + { + "name": "BL0942", + "title": "TODO", + "descr": "BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK", + "requires": "" + }, + { + "name": "BL0937", + "title": "TODO", + "descr": "BL0937 is a power-metering chip which uses custom protocol to report data. It requires setting 3 pins in pin config: CF, CF1 and SEL", + "requires": "" + }, + { + "name": "CSE7766", + "title": "TODO", + "descr": "BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK", + "requires": "" + }, + { + "name": "SM16703P", + "title": "TODO", + "descr": "WIP driver", + "requires": "" + }, + { + "name": "IR", + "title": "TODO", + "descr": "IRLibrary wrapper, so you can receive remote signals and send them.", + "requires": "" + }, + { + "name": "DDP", + "title": "TODO", + "descr": "DDP is a LED control protocol that is using UDP. You can use xLights or any other app to control OBK LEDs that way.", + "requires": "" + }, + { + "name": "SSDP", + "title": "TODO", + "descr": "SSDP is a discovery protocol, so BK devices can show up in, for example, Windows network section", + "requires": "" + }, + { + "name": "Wemo", + "title": "TODO", + "descr": "Wemo emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery.", + "requires": "" + }, + { + "name": "DGR", + "title": "TODO", + "descr": "Tasmota Device groups driver.", + "requires": "" + }, + { + "name": "PWMToggler", + "title": "TODO", + "descr": "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.", + "requires": "" + }, + { + "name": "DoorSensor", + "title": "TODO", + "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.", + "requires": "" + }, + { + "name": "SM2135", + "title": "TODO", + "descr": "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", + "requires": "" + }, + { + "name": "BP5758D", + "title": "TODO", + "descr": "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", + "requires": "" + }, + { + "name": "BP1658CJ", + "title": "TODO", + "descr": "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", + "requires": "" + }, + { + "name": "SM2235", + "title": "TODO", + "descr": "SM2335 andd SM2235 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2235 pin roles. This may need you to remap the RGBCW indexes with SM2235_Map command", + "requires": "" + }, + { + "name": "CHT8305", + "title": "TODO", + "descr": "TODO", + "requires": "" + }, + { + "name": "MAX72XX", + "title": "TODO", + "descr": "TODO", + "requires": "" + }, + { + "name": "TM1637", + "title": "TODO", + "descr": "Driver for 7-segment LED display with DIO/CLK interface", + "requires": "" + }, + { + "name": "SHT3X", + "title": "TODO", + "descr": "TODO", + "requires": "" + }, + { + "name": "Battery", + "title": "TODO", + "descr": "TODO", + "requires": "" + }, + { + "name": "Bridge", + "title": "TODO", + "descr": "TODO", + "requires": "" + } +] \ No newline at end of file diff --git a/docs/json/flags.json b/docs/json/flags.json new file mode 100644 index 000000000..66858680e --- /dev/null +++ b/docs/json/flags.json @@ -0,0 +1,268 @@ +[ + { + "index": "0", + "enum": "OBK_FLAG_MQTT_BROADCASTLEDPARAMSTOGETHER", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Broadcast led params together (send dimmer and color when dimmer or color changes, topic name: YourDevName/led_basecolor_rgb/get, YourDevName/led_dimmer/get)\"," + }, + { + "index": "1", + "enum": "OBK_FLAG_MQTT_BROADCASTLEDFINALCOLOR", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Broadcast led final color (topic name: YourDevName/led_finalcolor_rgb/get)\"," + }, + { + "index": "2", + "enum": "OBK_FLAG_MQTT_BROADCASTSELFSTATEPERMINUTE", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Broadcast self state every N (def: 60) seconds (delay configurable by 'mqtt_broadcastInterval' and 'mqtt_broadcastItemsPerSec' commands)\"," + }, + { + "index": "3", + "enum": "OBK_FLAG_LED_RAWCHANNELSMODE", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED][Debug] Show raw PWM controller on WWW index instead of new LED RGB/CW/etc picker\"," + }, + { + "index": "4", + "enum": "OBK_FLAG_LED_FORCESHOWRGBCWCONTROLLER", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Force show RGBCW controller (for example, for SM2135 LEDs, or for DGR sender)\"," + }, + { + "index": "5", + "enum": "OBK_FLAG_CMD_ENABLETCPRAWPUTTYSERVER", + "title": "todo", + "file": "new_pins.h", + "descr": "[CMD] Enable TCP console command server (for Putty, etc)\"," + }, + { + "index": "6", + "enum": "OBK_FLAG_BTN_INSTANTTOUCH", + "title": "todo", + "file": "new_pins.h", + "descr": "[BTN] Instant touch reaction instead of waiting for release (aka SetOption 13)\"," + }, + { + "index": "7", + "enum": "OBK_FLAG_MQTT_ALWAYSSETRETAIN", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] [Debug] Always set Retain flag to all published values\"," + }, + { + "index": "8", + "enum": "OBK_FLAG_LED_ALTERNATE_CW_MODE", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)\"," + }, + { + "index": "9", + "enum": "OBK_FLAG_SM2135_SEPARATE_MODES", + "title": "todo", + "file": "new_pins.h", + "descr": "[SM2135] Use separate RGB/CW modes instead of writing all 5 values as RGB\"," + }, + { + "index": "10", + "enum": "OBK_FLAG_MQTT_BROADCASTSELFSTATEONCONNECT", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Broadcast self state on MQTT connect\"," + }, + { + "index": "11", + "enum": "OBK_FLAG_SLOW_PWM", + "title": "todo", + "file": "new_pins.h", + "descr": "[PWM] BK7231 use 600hz instead of 1khz default\"," + }, + { + "index": "12", + "enum": "OBK_FLAG_LED_REMEMBERLASTSTATE", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Remember LED driver state (RGBCW, enable, brightness, temperature) after reboot\"," + }, + { + "index": "13", + "enum": "OBK_FLAG_HTTP_PINMONITOR", + "title": "todo", + "file": "new_pins.h", + "descr": "[HTTP] Show actual PIN logic level for unconfigured pins\"," + }, + { + "index": "14", + "enum": "OBK_FLAG_IR_PUBLISH_RECEIVED", + "title": "todo", + "file": "new_pins.h", + "descr": "[IR] Do MQTT publish (RAW STRING) for incoming IR data\"," + }, + { + "index": "15", + "enum": "OBK_FLAG_IR_ALLOW_UNKNOWN", + "title": "todo", + "file": "new_pins.h", + "descr": "[IR] Allow 'unknown' protocol\"," + }, + { + "index": "16", + "enum": "OBK_FLAG_LED_BROADCAST_FULL_RGBCW", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Broadcast led final color RGBCW (topic name: YourDevName/led_finalcolor_rgbcw/get)\"," + }, + { + "index": "17", + "enum": "OBK_FLAG_LED_AUTOENABLE_ON_WWW_ACTION", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Automatically enable Light when changing brightness, color or temperature on WWW panel\"," + }, + { + "index": "18", + "enum": "OBK_FLAG_LED_SMOOTH_TRANSITIONS", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Smooth transitions for LED (EXPERIMENTAL)\"," + }, + { + "index": "19", + "enum": "OBK_FLAG_TUYAMCU_ALWAYSPUBLISHCHANNELS", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Always publish channels used by TuyaMCU\"," + }, + { + "index": "20", + "enum": "OBK_FLAG_LED_FORCE_MODE_RGB", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Force RGB mode (3 PWMs for LEDs) and ignore futher PWMs if they are set\"," + }, + { + "index": "21", + "enum": "OBK_FLAG_MQTT_RETAIN_POWER_CHANNELS", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Retain power channels (Relay channels, etc)\"," + }, + { + "index": "22", + "enum": "OBK_FLAG_IR_PUBLISH_RECEIVED_IN_JSON", + "title": "todo", + "file": "new_pins.h", + "descr": "[IR] Do MQTT publish (Tasmota JSON format) for incoming IR data\"," + }, + { + "index": "23", + "enum": "OBK_FLAG_LED_AUTOENABLE_ON_ANY_ACTION", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Automatically enable Light on any change of brightness, color or temperature\"," + }, + { + "index": "24", + "enum": "OBK_FLAG_LED_EMULATE_COOL_WITH_RGB", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Emulate Cool White with RGB in device with four PWMS - Red is 0, Green 1, Blue 2, and Warm is 4\"," + }, + { + "index": "25", + "enum": "OBK_FLAG_POWER_ALLOW_NEGATIVE", + "title": "todo", + "file": "new_pins.h", + "descr": "[POWER] Allow negative current/power for power measurement (all chips, BL0937, BL0942, etc)\"," + }, + { + "index": "26", + "enum": "OBK_FLAG_USE_SECONDARY_UART", + "title": "todo", + "file": "new_pins.h", + "descr": "[UART] Use alternate UART for BL0942, CSE, TuyaMCU, etc\"," + }, + { + "index": "27", + "enum": "OBK_FLAG_AUTOMAIC_HASS_DISCOVERY", + "title": "todo", + "file": "new_pins.h", + "descr": "[HASS] Invoke HomeAssistant discovery on change to ip address, configuration\"," + }, + { + "index": "28", + "enum": "OBK_FLAG_LED_SETTING_WHITE_RGB_ENABLES_CW", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Setting RGB white (FFFFFF) enables temperature mode\"," + }, + { + "index": "29", + "enum": "OBK_FLAG_USE_SHORT_DEVICE_NAME_AS_HOSTNAME", + "title": "todo", + "file": "new_pins.h", + "descr": "[NETIF] Use short device name as a hostname instead of a long name\"," + }, + { + "index": "30", + "enum": "OBK_FLAG_DO_TASMOTA_TELE_PUBLISHES", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Enable Tasmota TELE etc publishes (for ioBroker etc)\"," + }, + { + "index": "31", + "enum": "OBK_FLAG_CMD_ACCEPT_UART_COMMANDS", + "title": "todo", + "file": "new_pins.h", + "descr": "[UART] Enable UART command line\"," + }, + { + "index": "32", + "enum": "OBK_FLAG_LED_USE_OLD_LINEAR_MODE", + "title": "todo", + "file": "new_pins.h", + "descr": "[LED] Use old linear brightness mode, ignore gamma ramp\"," + }, + { + "index": "33", + "enum": "OBK_FLAG_PUBLISH_MULTIPLIED_VALUES", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] Apply channel type multiplier on (if any) on channel value before publishing it\"," + }, + { + "index": "34", + "enum": "OBK_FLAG_MQTT_HASS_ADD_RELAYS_AS_LIGHTS", + "title": "todo", + "file": "new_pins.h", + "descr": "[MQTT] In HA discovery, add relays as lights\"," + }, + { + "index": "35", + "enum": "OBK_FLAG_NOT_PUBLISH_AVAILABILITY_SENSOR", + "title": "todo", + "file": "new_pins.h", + "descr": "[HASS] Deactivate avty_t flag for sensor when publishing to HASS (permit to keep value)\"," + }, + { + "index": "36", + "enum": "OBK_FLAG_DRV_DISABLE_AUTOSTART", + "title": "todo", + "file": "new_pins.h", + "descr": "[DRV] Deactivate Autostart of all drivers\"," + }, + { + "index": "37", + "enum": "OBK_FLAG_WIFI_FAST_CONNECT", + "title": "todo", + "file": "new_pins.h", + "descr": "[WiFi] Quick connect to WiFi on reboot (TODO: check if it works for you and report on github)\"," + } +] \ No newline at end of file diff --git a/docs/json/ioRoles.json b/docs/json/ioRoles.json new file mode 100644 index 000000000..6bcad0f30 --- /dev/null +++ b/docs/json/ioRoles.json @@ -0,0 +1,522 @@ +[ + { + "name": "None", + "title": "TODO", + "descr": "Default pin role; this pin does nothing.", + "enum": "IOR_None", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Relay", + "title": "TODO", + "descr": "an active-high relay. This relay is closed when a logical 1 value is on linked channel", + "enum": "IOR_Relay", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Relay_n", + "title": "TODO", + "descr": "(as Relay but pin logical value is inversed)", + "enum": "IOR_Relay_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button", + "title": "TODO", + "descr": "a typical button of Tuya device with active-low state (a button that connects IO pin to ground when pressed and also has a 10k or so pull up resistor)", + "enum": "IOR_Button", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_n", + "title": "TODO", + "descr": "as Button but pin logical value is inversed", + "enum": "IOR_Button_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LED", + "title": "TODO", + "descr": "an active-high LED. The internals of 'LED' are the same as of 'Relay'. Names are just separate to make it easier for users.", + "enum": "IOR_LED", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LED_n", + "title": "TODO", + "descr": "(as Led but pin logical value is inversed)", + "enum": "IOR_LED_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "PWM", + "title": "TODO", + "descr": "Pulse width modulation output for LED dimmers (with MQTT dimming support from Home Assistant). Remember to set related channel to correct color index, in the RGBCW order. For CW only lights, set only CW indices.", + "enum": "IOR_PWM", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LED_WIFI", + "title": "TODO", + "descr": "special LED to indicate WLan connection state. LED states are following: LED on = client mode successfully connected to your Router. Half a second blink - connecting to your router, please wait (or connection problem). Fast blink (200ms) - open access point mode. In safe mode (after failed boots), LED might not work.", + "enum": "IOR_LED_WIFI", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "LED_WIFI_n", + "title": "TODO", + "descr": "As LED_WIFI, but with inversed logic.", + "enum": "IOR_LED_WIFI_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_ToggleAll", + "title": "TODO", + "descr": "this button toggles all channels at once", + "enum": "IOR_Button_ToggleAll", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_ToggleAll_n", + "title": "TODO", + "descr": "Button_ToggleAll as, but inversed logic of button", + "enum": "IOR_Button_ToggleAll_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DigitalInput", + "title": "TODO", + "descr": "this is a simple digital input pin, it sets the linked channel to current logical value on it, just like digitalRead( ) from Arduino. This input has a internal pull up resistor.", + "enum": "IOR_DigitalInput", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DigitalInput_n", + "title": "TODO", + "descr": "As DigitalInput as above, but inverted", + "enum": "IOR_DigitalInput_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "ToggleChannelOnToggle", + "title": "TODO", + "descr": "this pin will toggle target channel when a value on this pin changes (with debouncing). you can connect simple two position switch here and swapping the switch will toggle target channel relay on or off", + "enum": "IOR_ToggleChannelOnToggle", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DigitalInput_NoPup", + "title": "TODO", + "descr": "As DigitalInput, but without internal programmable pullup resistor. This is used for, for example, XR809 water sensor and door sensor.", + "enum": "IOR_DigitalInput_NoPup", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DigitalInput_NoPup_n", + "title": "TODO", + "descr": "As DigitalInput_n, but without internal programmable pullup resistor", + "enum": "IOR_DigitalInput_NoPup_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BL0937_SEL", + "title": "TODO", + "descr": "SEL pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.", + "enum": "IOR_BL0937_SEL", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BL0937_CF", + "title": "TODO", + "descr": "CF pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.", + "enum": "IOR_BL0937_CF", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BL0937_CF1", + "title": "TODO", + "descr": "CF1 pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.", + "enum": "IOR_BL0937_CF1", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "ADC", + "title": "TODO", + "descr": "Analog to Digital converter converts voltage to channel value which is later published by MQTT and also can be used to trigger scriptable events", + "enum": "IOR_ADC", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SM2135_DAT", + "title": "TODO", + "descr": "SM2135 DAT pin for SM2135 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2135 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_SM2135_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SM2135_CLK", + "title": "TODO", + "descr": "SM2135 CLK pin for SM2135 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2135 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_SM2135_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BP5758D_DAT", + "title": "TODO", + "descr": "BP5758D DAT pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP5758D pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_BP5758D_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BP5758D_CLK", + "title": "TODO", + "descr": "BP5758D CLK pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP5758D pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_BP5758D_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BP1658CJ_DAT", + "title": "TODO", + "descr": "BP1658CJ DAT pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP1658CJ pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_BP1658CJ_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BP1658CJ_CLK", + "title": "TODO", + "descr": "BP1658CJ CLK pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP1658CJ pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_BP1658CJ_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "PWM_n", + "title": "TODO", + "descr": "as above, but percentage of duty is inversed. This might be useful for some special LED drivers that are using single PWM to choose between Cool white and Warm white (it also needs setting a special flag in General options)", + "enum": "IOR_PWM_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "IRRecv", + "title": "TODO", + "descr": "IR receiver for our IRLibrary port", + "enum": "IOR_IRRecv", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "IRSend", + "title": "TODO", + "descr": "IR sender for our IRLibrary port", + "enum": "IOR_IRSend", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextColor", + "title": "TODO", + "descr": "for RGB strip with buttons; sets next predefined color. For a LED strip that has separate POWER and COLOR buttons.", + "enum": "IOR_Button_NextColor", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextColor_n", + "title": "TODO", + "descr": "As NextColor, but inversed button logic", + "enum": "IOR_Button_NextColor_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextDimmer", + "title": "TODO", + "descr": "for RGB strip with buttons; when hold, adjusts the brightness", + "enum": "IOR_Button_NextDimmer", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextDimmer_n", + "title": "TODO", + "descr": "As NextDimmer, but inversed button logic", + "enum": "IOR_Button_NextDimmer_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "AlwaysHigh", + "title": "TODO", + "descr": "always outputs 1", + "enum": "IOR_AlwaysHigh", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "AlwaysLow", + "title": "TODO", + "descr": "always outputs 0", + "enum": "IOR_AlwaysLow", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "UCS1912_DIN", + "title": "TODO", + "descr": "WIP driver, write a post on Elektroda if you need it working", + "enum": "IOR_UCS1912_DIN", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SM16703P_DIN", + "title": "TODO", + "descr": "WIP driver, write a post on Elektroda if you need it working", + "enum": "IOR_SM16703P_DIN", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextTemperature", + "title": "TODO", + "descr": "Button that automatically allows you to control temperature of your LED device", + "enum": "IOR_Button_NextTemperature", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_NextTemperature_n", + "title": "TODO", + "descr": "Like Button_NextTemperature, but inversed button logic", + "enum": "IOR_Button_NextTemperature_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_ScriptOnly", + "title": "TODO", + "descr": "This button does nothing automatically, even the linked channel is not changed. Useful for scripts, but you can still also use any buttons for scripting.", + "enum": "IOR_Button_ScriptOnly", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Button_ScriptOnly_n", + "title": "TODO", + "descr": "Like Button_ScriptOnly, but inversed logic", + "enum": "IOR_Button_ScriptOnly_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DHT11", + "title": "TODO", + "descr": "DHT11 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)", + "enum": "IOR_DHT11", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DHT12", + "title": "TODO", + "descr": "DHT12 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)", + "enum": "IOR_DHT12", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DHT21", + "title": "TODO", + "descr": "DHT21 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)", + "enum": "IOR_DHT21", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DHT22", + "title": "TODO", + "descr": "DHT22 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)", + "enum": "IOR_DHT22", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "CHT8305_DAT", + "title": "TODO", + "descr": "TODO", + "enum": "IOR_CHT8305_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "CHT8305_CLK", + "title": "TODO", + "descr": "TODO", + "enum": "IOR_CHT8305_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SHT3X_DAT", + "title": "TODO", + "descr": "TODO", + "enum": "IOR_SHT3X_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SHT3X_CLK", + "title": "TODO", + "descr": "TODO", + "enum": "IOR_SHT3X_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SOFT_SDA", + "title": "TODO", + "descr": "Generic software SDA pin for our more advanced, scriptable I2C driver. This allows you to even connect a I2C display to OBK.", + "enum": "IOR_SOFT_SDA", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SOFT_SCL", + "title": "TODO", + "descr": "Generic software SCL pin for our more advanced, scriptable I2C driver.", + "enum": "IOR_SOFT_SCL", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SM2235_DAT", + "title": "TODO", + "descr": "It works for both SM2235 and SM2335. SM2235 DAT pin for SM2235 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2235 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_SM2235_DAT", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SM2235_CLK", + "title": "TODO", + "descr": "It works for both SM2235 and SM2335. SM2235 CLK pin for SM2235 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2235 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.", + "enum": "IOR_SM2235_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BridgeForward", + "title": "TODO", + "descr": "Motor/Relay bridge driver control signal. FORWARD direction.", + "enum": "IOR_BridgeForward", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BridgeReverse", + "title": "TODO", + "descr": "Motor/Relay bridge driver control signal. REVERSE direction.", + "enum": "IOR_BridgeReverse", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SmartButtonForLEDs", + "title": "TODO", + "descr": "A single button that does all control for LED. Click it toggle power, hold to adjust brightness, double click for next color, triple click for next temperature", + "enum": "IOR_SmartButtonForLEDs", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "SmartButtonForLEDs_n", + "title": "TODO", + "descr": "As SmartButtonForLEDs, but inverted", + "enum": "IOR_SmartButtonForLEDs_n", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DoorSensorWithDeepSleep", + "title": "TODO", + "descr": "Setting this role will make DoorSensor driver autostart. DoorSensor will work like digital input, sending only its value on change. When there are no changes for some times, device will go into deep sleep to save battery. When a change occurs, device will wake up and report change.", + "enum": "IOR_DoorSensorWithDeepSleep", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "DoorSensorWithDeepSleep_NoPup", + "title": "TODO", + "descr": "As DoorSensorWithDeepSleep, but no pullup resistor", + "enum": "IOR_DoorSensorWithDeepSleep_NoPup", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BAT_ADC", + "title": "TODO", + "descr": "Like ADC, but for a Battery driver that does Battery measurement.", + "enum": "IOR_BAT_ADC", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "BAT_Relay", + "title": "TODO", + "descr": "Like Relay, but for a Battery driver that does Battery measurement.", + "enum": "IOR_BAT_Relay", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "TM1637_DIO", + "title": "TODO", + "descr": "TM1637 LED display driver DIO pin. Setting all required TM1637 pins will autostart related driver", + "enum": "IOR_TM1637_DIO", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "TM1637_CLK", + "title": "TODO", + "descr": "TM1637 LED display driver CLK pin. Setting all required TM1637 pins will autostart related driver", + "enum": "IOR_TM1637_CLK", + "file": "new_pins.h", + "driver": "" + }, + { + "name": "Total_Options", + "title": "TODO", + "descr": "Current total number of available IOR roles", + "enum": "IOR_Total_Options", + "file": "new_pins.h", + "driver": "" + } +] \ No newline at end of file diff --git a/scripts/getcommands.js b/scripts/getcommands.js index e4818d638..e2f75ac8a 100644 --- a/scripts/getcommands.js +++ b/scripts/getcommands.js @@ -860,6 +860,8 @@ fs.writeFileSync('docs/flags.md', flagsmdshort); console.log('wrote flags.md'); fs.writeFileSync('docs/constants.md', constantsmdshort); console.log('wrote constants.md'); +fs.writeFileSync('docs/drivers.md', driversmdshort); +console.log('wrote drivers.md'); fs.writeFileSync('docs/commands-extended.md', mdlong); console.log('wrote commands-extended.md');