diff --git a/ZgatewayIR.ino b/ZgatewayIR.ino index 6fa77d4..26c37f3 100644 --- a/ZgatewayIR.ino +++ b/ZgatewayIR.ino @@ -158,7 +158,6 @@ void MQTTtoIR(char * topicOri, char * datacallback) { //We look into the subject to see if a special Bits number is defined String topic = topicOri; - int valueRPT = 0; unsigned int valueBITS = 0; int pos = topic.lastIndexOf(IRbitsKey); if (pos != -1){ @@ -168,6 +167,7 @@ void MQTTtoIR(char * topicOri, char * datacallback) { trc(String(valueBITS)); } //We look into the subject to see if a special repeat number is defined + int valueRPT = 0; int pos2 = topic.lastIndexOf(IRRptKey); if (pos2 != -1) { pos2 = pos2 + strlen(IRRptKey); diff --git a/ZsensorBH1750.ino b/ZsensorBH1750.ino index f598430..9b71a71 100644 --- a/ZsensorBH1750.ino +++ b/ZsensorBH1750.ino @@ -1,4 +1,4 @@ -/* + /* OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker @@ -110,7 +110,7 @@ void MeasureLightIntensity() // Generate Lux if(Lux != persistedll || bh1750_always){ char lux[7]; - sprintf(lux,"%d",Lux); + sprintf(lux,"%u",Lux); trc(F("Sending Lux to MQTT")); trc(String(lux)); client.publish(LUX,lux); diff --git a/ZsensorBME280.ino b/ZsensorBME280.ino index 6e47bb6..e69a029 100644 --- a/ZsensorBME280.ino +++ b/ZsensorBME280.ino @@ -124,7 +124,6 @@ void MeasureTempHumAndPressure() if (millis() > (timebme280 + TimeBetweenReadingbme280)) { timebme280 = millis(); - unsigned int i=0; static float persisted_bme_tempc; static float persisted_bme_tempf; static float persisted_bme_hum;