Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6929,6 +6929,33 @@ void tmod_directModeOutput(uint32_t pin);
free(payload);
}
}
if (sel == 8) {
// generic send to url and port
char url[SCRIPT_MAX_SBSIZE];
lp = GetStringArgument(lp, OPER_EQU, url, 0);
TS_FLOAT port;
lp = GetNumericArgument(lp, OPER_EQU, &port, gv);

// send to recive port up to 3 text buffers
char payload[SCRIPT_MAX_SBSIZE * 3];
char part1[SCRIPT_MAX_SBSIZE];
lp = GetStringArgument(lp, OPER_EQU, part1, 0);
SCRIPT_SKIP_SPACES
strcpy(payload, part1);
if (*lp != ')') {
// get next part
lp = GetStringArgument(lp, OPER_EQU, part1, 0);
SCRIPT_SKIP_SPACES
strcat(payload, part1);
if (*lp != ')') {
// get next part
lp = GetStringArgument(lp, OPER_EQU, part1, 0);
SCRIPT_SKIP_SPACES
strcat(payload, part1);
}
}
fvar = udp_call(url, port, (uint8_t*)payload, strlen(payload));
}
goto nfuncexit;
}
#endif
Expand Down
Loading