Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/use/ble.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Note that the gateway return one or two measurement value each time. The differe

The infos will appear like this on your MQTT broker:

`home/OpenMQTTGateway/BTtoMQTT/4C33A6603C79 {"hum":"52.6","tem":"19.2"}`
`home/OpenMQTTGateway/BTtoMQTT/4C33A6603C79 {"hum":"52.6","tempc":"19.2","tempf":"66.56"}`

More info are available on [my blog](https://1technophile.blogspot.fr/2017/11/mi-flora-integration-to-openmqttgateway.html) (especially about how it was implemented with HM10)

Expand Down
4 changes: 0 additions & 4 deletions main/ZgatewayBT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,6 @@ JsonObject& process_sensors(int offset, JsonObject& BLEdata) {
BLEdata.set("for", (double)value / 100);
break;
case '4':
BLEdata.set("tem", (double)value / 10); // remove for 0.9.6 release
BLEdata.set("tempc", (double)value / 10);
BLEdata.set("tempf", (double)convertTemp_CtoF(value / 10));
break;
Expand All @@ -1252,7 +1251,6 @@ JsonObject& process_sensors(int offset, JsonObject& BLEdata) {
case 'd':
// temperature
value = (double)value_from_hex_data(servicedata, 28 + offset, 4, true);
BLEdata.set("tem", (double)value / 10); // remove for 0.9.6 release
BLEdata.set("tempc", (double)value / 10);
BLEdata.set("tempf", (double)convertTemp_CtoF(value / 10));
// humidity
Expand Down Expand Up @@ -1308,7 +1306,6 @@ JsonObject& process_inkbird(JsonObject& BLEdata) {
double battery = (double)value_from_hex_data(manufacturerdata, 14, 2, true);

//Set Json values
BLEdata.set("tem", (double)temperature); // remove for 0.9.6 release
BLEdata.set("tempc", (double)temperature);
BLEdata.set("tempf", (double)convertTemp_CtoF(temperature));
BLEdata.set("hum", (double)humidity);
Expand Down Expand Up @@ -1346,7 +1343,6 @@ JsonObject& process_cleargrass(JsonObject& BLEdata, boolean air) {
double value = 9999;
// temperature
value = (double)value_from_hex_data(servicedata, 20, 4, true);
BLEdata.set("tem", (double)value / 10); // remove for 0.9.6 release
BLEdata.set("tempc", (double)value / 10);
BLEdata.set("tempf", (double)convertTemp_CtoF(value / 10));
// humidity
Expand Down
1 change: 0 additions & 1 deletion main/ZgatewayWeatherStation.ino
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ void sendTemperatureData(byte id, float temperature, int humidity, byte battery_
StaticJsonBuffer<JSON_MSG_CALC_BUFFER> jsonBuffer;
JsonObject& RFdata = jsonBuffer.createObject();
RFdata.set("sensor", id);
RFdata.set("temperature", temperature); // remove for 0.9.6 release
RFdata.set("tempc", temperature);
RFdata.set("tempf", wsdr.convertCtoF(temperature));
RFdata.set("humidity", humidity);
Expand Down
1 change: 0 additions & 1 deletion main/ZsensorDHT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ void MeasureTempAndHum() {
Log.trace(F("Same hum don't send it" CR));
}
if (t != persistedt || dht_always) {
DHTdata.set("temp", (float)t); // remove for 0.9.6 release
DHTdata.set("tempc", (float)t);
DHTdata.set("tempf", dht.convertCtoF(t));
} else {
Expand Down
18 changes: 0 additions & 18 deletions main/ZsensorDS1820.ino
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,6 @@ void MeasureDS1820Temp() {
if (current_temp[i] == -127) {
Log.error(F("DS1820: Device %s currently disconnected!" CR), (char*)ds1820_addr[i].c_str());
} else if (DS1820_ALWAYS || current_temp[i] != persisted_temp[i]) {
// remove for 0.9.6 release -- BEGIN (Additional BREAKING CHANGE - Unit will be removed)
if (DS1820_FAHRENHEIT) {
Log.notice(F("DS1820: Temperature %s %d F" CR),
(char*)ds1820_addr[i].c_str(),
DallasTemperature::toFahrenheit(current_temp[i]));
DS1820data.set("temp", (float)DallasTemperature::toFahrenheit(current_temp[i]));
DS1820data.set("unit", "F");
} else {
Log.notice(F("DS1820: Temperature %s %d C" CR),
(char*)ds1820_addr[i].c_str(),
current_temp[i]);
DS1820data.set("temp", (float)DallasTemperature::toFahrenheit(current_temp[i]));
DS1820data.set("unit", "F");
DS1820data.set("temp", (float)current_temp[i]);
DS1820data.set("unit", "C");
}
// remove for 0.9.6 release -- END

DS1820data.set("tempc", (float)DallasTemperature::toFahrenheit(current_temp[i]));
DS1820data.set("tempf", (float)current_temp[i]);

Expand Down
1 change: 0 additions & 1 deletion main/ZsensorSHTC3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void MeasureTempAndHum() {
Log.trace(F("Same hum don't send it" CR));
}
if (t != persistedt || shtc3_always) {
SHTC3data.set("temp", (float)t); // remove for 0.9.6 release
SHTC3data.set("tempc", (float)t);
SHTC3data.set("tempf", mySHTC3.toDegF());
} else {
Expand Down
7 changes: 2 additions & 5 deletions main/config_DS1820.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ extern void pubOneWire_HADiscovery();
#define DS1820_ALWAYS true // if false only published current temperature if has changed from previous reading
#define DS1820_INTERVAL_SEC 60 // time between DS1820 readings (seconds)
#define DS1820_RESOLUTION 10 // conversion times: 9 bit (93.75 ms), 10 bit (187.5 ms), 11 bit (375 ms), 12 bit (750 ms)
#ifndef DS1820_FAHRENHEIT // remove for 0.9.6 release
# define DS1820_FAHRENHEIT false // defaults to Celcius // remove for 0.9.6 release
#endif // remove for 0.9.6 release
#define DS1820_DETAILS true // publish extented info for each sensor (resolution, address, type)
#define DS1820_CONV_TIME 2000 // trigger conversion before requesting temperature readings (ms)
#define DS1820_DETAILS true // publish extented info for each sensor (resolution, address, type)
#define DS1820_CONV_TIME 2000 // trigger conversion before requesting temperature readings (ms)
/*-------------------PIN DEFINITIONS----------------------*/

#ifndef DS1820_OWBUS_GPIO
Expand Down
2 changes: 0 additions & 2 deletions main/config_mqttDiscovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ extern void createDiscovery(char* sensor_type,
# define jsonFor "{{ value_json.for }}"
# define jsonMoi "{{ value_json.moi }}"
# define jsonHum "{{ value_json.hum }}"
# define jsonTemp "{{ value_json.tem }}" // remove for 0.9.6 release
# define jsonStep "{{ value_json.steps }}"
# define jsonWeight "{{ value_json.weight }}"
# define jsonPresence "{{ value_json.presence }}"
Expand Down Expand Up @@ -84,7 +83,6 @@ extern void createDiscovery(char* sensor_type,
# define jsonFor "{{ value_json.for | is_defined }}"
# define jsonMoi "{{ value_json.moi | is_defined }}"
# define jsonHum "{{ value_json.hum | is_defined }}"
# define jsonTemp "{{ value_json.tem | is_defined }}" // remove for 0.9.6 release
# define jsonStep "{{ value_json.steps | is_defined }}"
# define jsonWeight "{{ value_json.weight | is_defined }}"
# define jsonPresence "{{ value_json.presence | is_defined }}"
Expand Down