mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 14:35:41 +00:00
Merge pull request #18 from talltechdude/feat/mqtt-availability
feat: add MQTT will and availability topic
This commit is contained in:
@ -835,6 +835,8 @@ int HTTP_ProcessPacket(http_request_t *request) {
|
||||
poststr(request," payload_on: 0\n");
|
||||
poststr(request," payload_off: 1\n");
|
||||
poststr(request," retain: true\n");
|
||||
sprintf(tmpA," availability_topic: \"%s/connected\"\n",baseName);
|
||||
poststr(request,tmpA);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -858,6 +860,8 @@ int HTTP_ProcessPacket(http_request_t *request) {
|
||||
poststr(request," payload_off: 0\n");
|
||||
poststr(request," retain: true\n");
|
||||
poststr(request," optimistic: true\n");
|
||||
sprintf(tmpA," availability_topic: \"%s/connected\"\n",baseName);
|
||||
poststr(request,tmpA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user