mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-12 17:35:29 +00:00
Tuyamcu raw access (#1048)
* working/? * winnermicro fix * ENABLE_DRIVER_TUYAMCU fx * some fixes, some unfiished * extra check
This commit is contained in:
@ -744,6 +744,9 @@ static int http_tasmota_json_status_generic(void* request, jsonCb_t printer) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
// drv_tuyaMCU.c
|
||||
int http_obk_json_dps(int id, void* request, jsonCb_t printer);
|
||||
|
||||
int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, jsonCb_t printer, int flags) {
|
||||
int i;
|
||||
|
||||
@ -1027,6 +1030,20 @@ int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, js
|
||||
else if (!wal_strnicmp(cmd, "Ch", 2)) {
|
||||
http_obk_json_channels(request, printer);
|
||||
}
|
||||
#ifndef OBK_DISABLE_ALL_DRIVERS
|
||||
#if ENABLE_DRIVER_TUYAMCU
|
||||
else if (!wal_strnicmp(cmd, "Dp", 2)) {
|
||||
int id = -1;
|
||||
if (isdigit(cmd[2])) {
|
||||
sscanf(cmd + 2, "%i", &id);
|
||||
}
|
||||
http_obk_json_dps(id,request, printer);
|
||||
if (flags == COMMAND_FLAG_SOURCE_MQTT) {
|
||||
MQTT_PublishPrinterContentsToStat((struct obk_mqtt_publishReplyPrinter_s*)request, "DP");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else {
|
||||
printer(request, "{");
|
||||
printer(request, "}");
|
||||
|
||||
Reference in New Issue
Block a user