Skip to content

Commit

Permalink
better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Aug 16, 2023
1 parent e130cfd commit a1d04dd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions docs/commands-extended.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| cancelRepeatingEvent | [UserIDInteger] | Stops a given repeating event with a specified ID | File: cmnds/cmd_repeatingEvents.c<br/>Function: RepeatingEvents_Cmd_CancelRepeatingEvent |
| Ch | [InputValue] | An alternate command to access channels. It returns all used channels in JSON format. The syntax is ChINDEX value, there is no space between Ch and channel index. It can be sent without value to poll channel values. | File: cmnds/cmd_channels.c<br/>Function: CMD_Ch |
| chSetupLimit | [limitChannelIndex] [maxAllowedLimitChannelDelta] [timeoutOr-1] [commandToRun] | After executing this command, chargingLimit driver will watch channel for changes and count down timer. When a timer runs our or channel change (from the initial state) is larger than given margin, given command is run | File: driver/drv_chargingLimit.c<br/>Function: ChargingLimit_SetupCommand); |
| CHT_Calibrate | | Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 | File: driver/drv_cht8305.c<br/>Function: CHT_Calibrate |
| CHT_Cycle | [int] | This is the interval between measurements in seconds, by default 1. Max is 255.<br/>e.g.:CHT_Cycle 60 | File: drv/drv_cht8305.c<br/>Function: CHT_cycle |
| CHT_Calibrate | [DeltaTemp][DeltaHumidity] | Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 | File: driver/drv_cht8305.c<br/>Function: CHT_Calibrate |
| CHT_Cycle | [IntervalSeconds] | This is the interval between measurements in seconds, by default 1. Max is 255.<br/>e.g.:CHT_Cycle 60 | File: drv/drv_cht8305.c<br/>Function: CHT_cycle |
| ClampChannel | [ChannelIndex][Min][Max] | Clamps given channel value to a range. | File: cmnds/cmd_channels.c<br/>Function: CMD_ClampChannel |
| clearAll | | Clears config and all remaining features, like runtime scripts, events, etc | File: cmnds/cmd_main.c<br/>Function: CMD_ClearAll |
| clearAllHandlers | | This clears all added event handlers | File: cmnds/cmd_eventHandlers.c<br/>Function: CMD_ClearAllHandlers |
Expand Down Expand Up @@ -139,8 +139,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| MCP9808_Adr | MCP9808_Adr | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_AlertMin | MCP9808_AlertMin | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_AlertRange | MCP9808_AlertRange | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_Calibrate | MCP9808_Calibrate | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_Cycle | MCP9808_cycle | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_Calibrate | [DeltaTemperature] | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MCP9808_Cycle | [DelayInSeconds] | | File: driver/drv_mcp9808.c<br/>Function: NULL); |
| MqttClient | [ValueString] | Sets the MQTT client. Command keeps Tasmota syntax | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_MqttClient |
| MqttHost | [ValueString] | Sets the MQTT host. Command keeps Tasmota syntax | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_MqttHost |
| MqttPassword | [ValueString] | Sets the MQTT pass. Command keeps Tasmota syntax | File: cmnds/cmd_tasmota.c<br/>Function: cmnd_MqttPassword |
Expand Down
8 changes: 4 additions & 4 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| cancelRepeatingEvent | [UserIDInteger] | Stops a given repeating event with a specified ID |
| Ch | [InputValue] | An alternate command to access channels. It returns all used channels in JSON format. The syntax is ChINDEX value, there is no space between Ch and channel index. It can be sent without value to poll channel values. |
| chSetupLimit | [limitChannelIndex] [maxAllowedLimitChannelDelta] [timeoutOr-1] [commandToRun] | After executing this command, chargingLimit driver will watch channel for changes and count down timer. When a timer runs our or channel change (from the initial state) is larger than given margin, given command is run |
| CHT_Calibrate | | Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 |
| CHT_Cycle | [int] | This is the interval between measurements in seconds, by default 1. Max is 255.<br/>e.g.:CHT_Cycle 60 |
| CHT_Calibrate | [DeltaTemp][DeltaHumidity] | Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.<br/>e.g.:SHT_Calibrate -4 10 |
| CHT_Cycle | [IntervalSeconds] | This is the interval between measurements in seconds, by default 1. Max is 255.<br/>e.g.:CHT_Cycle 60 |
| ClampChannel | [ChannelIndex][Min][Max] | Clamps given channel value to a range. |
| clearAll | | Clears config and all remaining features, like runtime scripts, events, etc |
| clearAllHandlers | | This clears all added event handlers |
Expand Down Expand Up @@ -142,8 +142,8 @@ Do not add anything here, as it will overwritten with next rebuild.
| MCP9808_Adr | MCP9808_Adr | |
| MCP9808_AlertMin | MCP9808_AlertMin | |
| MCP9808_AlertRange | MCP9808_AlertRange | |
| MCP9808_Calibrate | MCP9808_Calibrate | |
| MCP9808_Cycle | MCP9808_cycle | |
| MCP9808_Calibrate | [DeltaTemperature] | |
| MCP9808_Cycle | [DelayInSeconds] | |
| MqttClient | [ValueString] | Sets the MQTT client. Command keeps Tasmota syntax |
| MqttHost | [ValueString] | Sets the MQTT host. Command keeps Tasmota syntax |
| MqttPassword | [ValueString] | Sets the MQTT pass. Command keeps Tasmota syntax |
Expand Down
8 changes: 4 additions & 4 deletions docs/json/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
},
{
"name": "CHT_Calibrate",
"args": "",
"args": "[DeltaTemp][DeltaHumidity]",
"descr": "Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.",
"fn": "CHT_Calibrate",
"file": "driver/drv_cht8305.c",
Expand All @@ -262,7 +262,7 @@
},
{
"name": "CHT_Cycle",
"args": "[int]",
"args": "[IntervalSeconds]",
"descr": "This is the interval between measurements in seconds, by default 1. Max is 255.",
"fn": "CHT_cycle",
"file": "drv/drv_cht8305.c",
Expand Down Expand Up @@ -1207,7 +1207,7 @@
},
{
"name": "MCP9808_Calibrate",
"args": "MCP9808_Calibrate",
"args": "[DeltaTemperature]",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_mcp9808.c",
Expand All @@ -1216,7 +1216,7 @@
},
{
"name": "MCP9808_Cycle",
"args": "MCP9808_cycle",
"args": "[DelayInSeconds]",
"descr": "",
"fn": "NULL);",
"file": "driver/drv_mcp9808.c",
Expand Down
4 changes: 2 additions & 2 deletions src/driver/drv_cht8305.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ void CHT8305_Init() {

addLogAdv(LOG_INFO, LOG_FEATURE_SENSOR, "DRV_CHT8304_init: ID: %02X %02X", buff[0], buff[1]);

//cmddetail:{"name":"CHT_Calibrate","args":"",
//cmddetail:{"name":"CHT_Calibrate","args":"[DeltaTemp][DeltaHumidity]",
//cmddetail:"descr":"Calibrate the CHT Sensor as Tolerance is +/-2 degrees C.",
//cmddetail:"fn":"CHT_Calibrate","file":"driver/drv_cht8305.c","requires":"",
//cmddetail:"examples":"SHT_Calibrate -4 10"}
CMD_RegisterCommand("CHT_Calibrate", CHT_Calibrate, NULL);
//cmddetail:{"name":"CHT_Cycle","args":"[int]",
//cmddetail:{"name":"CHT_Cycle","args":"[IntervalSeconds]",
//cmddetail:"descr":"This is the interval between measurements in seconds, by default 1. Max is 255.",
//cmddetail:"fn":"CHT_cycle","file":"drv/drv_cht8305.c","requires":"",
//cmddetail:"examples":"CHT_Cycle 60"}
Expand Down
4 changes: 2 additions & 2 deletions src/driver/drv_mcp9808.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ void MCP9808_Init() {
CMD_RegisterCommand("MCP9808_AlertMin", MCP9808_AlertMin, NULL);


//cmddetail:{"name":"MCP9808_Calibrate","args":"MCP9808_Calibrate",
//cmddetail:{"name":"MCP9808_Calibrate","args":"[DeltaTemperature]",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_mcp9808.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("MCP9808_Calibrate", MCP9808_Calibrate, NULL);
//cmddetail:{"name":"MCP9808_Cycle","args":"MCP9808_cycle",
//cmddetail:{"name":"MCP9808_Cycle","args":"[DelayInSeconds]",
//cmddetail:"descr":"",
//cmddetail:"fn":"NULL);","file":"driver/drv_mcp9808.c","requires":"",
//cmddetail:"examples":""}
Expand Down
2 changes: 2 additions & 0 deletions src/driver/drv_tuyaMCU.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ void TuyaMCU_SendColor(int dpID, float fR, float fG, float fB, int tuyaRGB) {
// tuyaMCU_sendColor dpID red01 green01 blue01 tuyaRGB
// tuyaMCU_sendColor 24 1 0 0 1
// tuyaMCU_sendColor 24 1 0 0 1
// green:
// tuyaMCU_sendColor 24 0 1 0 1
commandResult_t Cmd_TuyaMCU_SendColor(const void* context, const char* cmd, const char* args, int cmdFlags) {
int toSend;
float fR, fG, fB;
Expand Down

0 comments on commit a1d04dd

Please sign in to comment.