diff --git a/lighthub/homiedef.h b/lighthub/homiedef.h index 855e123..288bfe5 100644 --- a/lighthub/homiedef.h +++ b/lighthub/homiedef.h @@ -7,7 +7,7 @@ const char homie_P[] PROGMEM = "$homie"; const char homiever_P[] PROGMEM = "2.1.0"; const char name_P[] PROGMEM = "$name"; -const char nameval_P[] PROGMEM = "LightHub"; +const char nameval_P[] PROGMEM = "LightHub "; const char nodes_P[] PROGMEM = "$nodes"; const char color_P[] PROGMEM = "color"; diff --git a/lighthub/main.cpp b/lighthub/main.cpp index b3a6f38..972c2df 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -117,6 +117,7 @@ lan_status lanStatus = INITIAL_STATE; const char configserver[] PROGMEM = CONFIG_SERVER; +const char verval_P[] PROGMEM = QUOTE(PIO_SRC_REV); unsigned int UniqueID[5] = {0,0,0,0,0}; @@ -140,10 +141,10 @@ aJsonObject *dmxArr = NULL; aJsonObject *udpSyslogArr = NULL; #endif -unsigned long nextPollingCheck = 0; -unsigned long nextInputCheck = 0; -unsigned long nextLanCheckTime = 0; -unsigned long nextThermostatCheck = 0; +uint32_t nextPollingCheck = 0; +uint32_t nextInputCheck = 0; +uint32_t nextLanCheckTime = 0; +uint32_t nextThermostatCheck = 0; aJsonObject *pollingItem = NULL; @@ -385,6 +386,7 @@ void onMQTTConnect(){ setTopic(topic,sizeof(topic),T_DEV); strncat_P(topic, name_P, sizeof(topic)); strncpy_P(buf, nameval_P, sizeof(buf)); + strncat_P(buf,(verval_P),sizeof(buf)); mqttClient.publish(topic,buf,true); //strncpy_P(topic, outprefix, sizeof(topic)); @@ -1396,7 +1398,7 @@ void publishStat(){ long fr = freeRam(); char topic[64]; char intbuf[16]; - long ut = millis()/1000; + uint32_t ut = millis()/1000; // debugSerial<