10
10
*/
11
11
/*
12
12
* @title Espalexa library
13
- * @version 2.4.6
13
+ * @version 2.4.7
14
14
* @author Christian Schwinne
15
15
* @license MIT
16
16
* @contributors d-999
49
49
#include < WiFiUdp.h>
50
50
51
51
#ifdef ESPALEXA_DEBUG
52
- #pragma message "Espalexa 2.4.6 debug mode"
52
+ #pragma message "Espalexa 2.4.7 debug mode"
53
53
#define EA_DEBUG (x ) Serial.print (x)
54
54
#define EA_DEBUGLN (x ) Serial.println (x)
55
55
#else
@@ -157,7 +157,7 @@ class Espalexa {
157
157
158
158
sprintf_P (buf, PSTR (" {\" state\" :{\" on\" :%s,\" bri\" :%u%s%s,\" alert\" :\" none%s\" ,\" mode\" :\" homeautomation\" ,\" reachable\" :true},"
159
159
" \" type\" :\" %s\" ,\" name\" :\" %s\" ,\" modelid\" :\" %s\" ,\" manufacturername\" :\" Philips\" ,\" productname\" :\" E%u"
160
- " \" ,\" uniqueid\" :\" %u\" ,\" swversion\" :\" espalexa-2.4.6 \" }" )
160
+ " \" ,\" uniqueid\" :\" %u\" ,\" swversion\" :\" espalexa-2.4.7 \" }" )
161
161
162
162
, (dev->getValue ())?" true" :" false" , dev->getLastValue ()-1 , buf_col, buf_ct, buf_cm, typeString (dev->getType ()),
163
163
dev->getName ().c_str (), modelidString (dev->getType ()), static_cast <uint8_t >(dev->getType ()), encodeLightId (deviceId+1 ));
@@ -182,7 +182,7 @@ class Espalexa {
182
182
}
183
183
res += " \r\n Free Heap: " + (String)ESP.getFreeHeap ();
184
184
res += " \r\n Uptime: " + (String)millis ();
185
- res += " \r\n\r\n Espalexa library v2.4.6 by Christian Schwinne 2020" ;
185
+ res += " \r\n\r\n Espalexa library v2.4.7 by Christian Schwinne 2020" ;
186
186
server->send (200 , " text/plain" , res);
187
187
}
188
188
#endif
@@ -299,7 +299,7 @@ class Espalexa {
299
299
300
300
espalexaUdp.beginPacket (espalexaUdp.remoteIP (), espalexaUdp.remotePort ());
301
301
#ifdef ARDUINO_ARCH_ESP32
302
- espalexaUdp.write ((uint8_t *)buf, response. length ( ));
302
+ espalexaUdp.write ((uint8_t *)buf, strlen (buf ));
303
303
#else
304
304
espalexaUdp.write (buf);
305
305
#endif
0 commit comments