mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
core - group channel toggle, set_with_on fix, mdns
This commit is contained in:
@@ -802,7 +802,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
|
||||
if (chActive) cmd.Cmd(CMD_OFF);
|
||||
else
|
||||
{
|
||||
cmd.loadItemDef(this);
|
||||
// cmd.loadItemDef(this); ///
|
||||
cmd.Cmd(CMD_ON);
|
||||
}
|
||||
status2Send |=SEND_COMMAND | SEND_IMMEDIATE;
|
||||
@@ -1029,7 +1029,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
|
||||
debugSerial<<F("ON:Already Active\n");
|
||||
return -3;
|
||||
}
|
||||
cmd.loadItemDef(this);
|
||||
if (!cmd.isValue()) cmd.loadItemDef(this); // if no_suffix - both, command ON and value provided
|
||||
status2Send |= SEND_COMMAND | SEND_PARAMETERS | SEND_IMMEDIATE;
|
||||
toExecute=true;
|
||||
break;
|
||||
|
||||
@@ -242,7 +242,7 @@ uint16_t httpHandler(Client& client, String request, uint8_t method, long conten
|
||||
client.println(
|
||||
#ifdef CORS
|
||||
//Redirect to cloud PWA application
|
||||
String(F("Location: "))+(CORS)+String(F("/pwa"))
|
||||
String(F("Location: " CORS "/pwa"))
|
||||
#else
|
||||
String(F("Location: /index.html"))
|
||||
#endif
|
||||
@@ -250,7 +250,7 @@ uint16_t httpHandler(Client& client, String request, uint8_t method, long conten
|
||||
+String(F("?mac="))+sysConf.getMACString()
|
||||
+String(F("&ip="))+ toString( Ethernet.localIP())
|
||||
+String(F("&port="))+ OTA_PORT
|
||||
+ String(F("&name="))+deviceName
|
||||
+String(F("&name="))+deviceName
|
||||
);
|
||||
|
||||
//response+=(F("&ip="));
|
||||
@@ -982,7 +982,7 @@ if (WiFi.status() == WL_CONNECTED) {
|
||||
|
||||
mdns.begin(Ethernet.localIP(), "lighthub");
|
||||
|
||||
char txtRecord[32] = "\x7mac=";
|
||||
char txtRecord[32] = "\x10mac=";
|
||||
SetBytes(sysConf.mac,6,txtRecord+5);
|
||||
char mdnsName[32] = "LightHub";
|
||||
SetBytes(sysConf.mac+4,2,mdnsName+8);
|
||||
|
||||
Reference in New Issue
Block a user