mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Add manufacturer
This commit is contained in:
parent
2fdf8d4e47
commit
5e4316cd3e
@ -919,7 +919,7 @@ void dispatch_output_statusupdate(const char*, const char*)
|
||||
{
|
||||
#if HASP_USE_MQTT > 0
|
||||
|
||||
char data[400];
|
||||
char data[512];
|
||||
char topic[16];
|
||||
{
|
||||
char buffer[128];
|
||||
@ -927,7 +927,8 @@ void dispatch_output_statusupdate(const char*, const char*)
|
||||
haspGetVersion(buffer, sizeof(buffer));
|
||||
dispatch_get_idle_state(hasp_sleep_state, topic);
|
||||
snprintf_P(data, sizeof(data),
|
||||
PSTR("{\"node\":\"%s\",\"model\":\"%s\",\"idle\":\"%s\",\"version\":\"%s\",\"uptime\":%lu,"),
|
||||
PSTR("{\"node\":\"%s\",\"manufacturer\":\"" D_MANUFACTURER
|
||||
"\",\"model\":\"%s\",\"idle\":\"%s\",\"version\":\"%s\",\"uptime\":%lu,"),
|
||||
haspDevice.get_hostname(), haspDevice.get_model(), topic, buffer,
|
||||
(unsigned long)(millis() / 1000)); // \"status\":\"available\",
|
||||
|
||||
@ -961,13 +962,6 @@ void dispatch_output_statusupdate(const char*, const char*)
|
||||
dispatch_state_subtopic(topic, data);
|
||||
dispatchLastMillis = millis();
|
||||
|
||||
/* if(updateEspAvailable) {
|
||||
mqttStatusPayload += F("\"updateEspAvailable\":true,");
|
||||
} else {
|
||||
mqttStatusPayload += F("\"updateEspAvailable\":false,");
|
||||
}
|
||||
*/
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ const char HTTP_SCRIPT[] PROGMEM = "<script>function "
|
||||
const char HTTP_HEADER_END[] PROGMEM =
|
||||
"</head><body><div style='text-align:left;display:inline-block;color:" D_HTTP_COLOR_TEXT ";min-width:260px;'>";
|
||||
const char HTTP_END[] PROGMEM = "<div style='text-align:right;font-size:11px;'><hr/><a href='/about' "
|
||||
"style='color:" D_HTTP_COLOR_TEXT ";'>HASP ";
|
||||
"style='color:" D_HTTP_COLOR_TEXT ";'>" D_MANUFACTURER " ";
|
||||
const char HTTP_FOOTER[] PROGMEM = " by Francis Van Roie</div></body></html>";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -528,11 +528,11 @@ void webHandleInfo()
|
||||
httpMessage += haspDevice.get_hostname();
|
||||
httpMessage += F("</h1><hr>");
|
||||
|
||||
httpMessage += F("<b>HASP Model: </b>");
|
||||
httpMessage += F("<b>Model: </b>");
|
||||
httpMessage += haspDevice.get_model();
|
||||
|
||||
/* HASP Stats */
|
||||
httpMessage += F("<b>HASP Version: </b>");
|
||||
httpMessage += F("<br/><b>Version: </b>");
|
||||
{
|
||||
char version[32];
|
||||
haspGetVersion(version, sizeof(version));
|
||||
|
Loading…
x
Reference in New Issue
Block a user