DHT22 and DS18b20 on same node: DS shows up with Humidity now.
-
Seems to be related to the domoticz gateway. Also tried to downgrade to the first version that supported Arduino as serial controller but same problem. Strange thing is that if you restart controller and only present temp in the sketch its working until you present the humidity??
-
This is a really annoying thing.
I finally decided to modify the Domoticz sources, and now
temperature shows up with humidity only if they have
consecutive ID, otherwise they are shown separated. -
@zampedro I have exactly the same problem
Could you please tell me more of how you modified Domoticz source?
This bug is really annoying!
Regards,
Mikael -
I modified MySensorBase.cpp
void MySensorsBase::SendSensor2Domoticz
case V_TEMP:at lines 595 and 603 (numbers from last git code) for Temperature
// SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");// SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");case V_HUM:at lines 678 and 686 for Humidity
// SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");// SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");In this way hum+temp of DHT11 are shown together ( CHILD_ID_HUM +1 == CHILD_ID_TEMP ) and
temperatures from ds18b20 are alone in separate widgets.#define CHILD_ID_HUM 9 // DHT11
#define CHILD_ID_TEMP 10 // DHT11
#define DS18B20_STARTID 15 // DS18B20Regards
-
I modified MySensorBase.cpp
void MySensorsBase::SendSensor2Domoticz
case V_TEMP:at lines 595 and 603 (numbers from last git code) for Temperature
// SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");// SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");case V_HUM:at lines 678 and 686 for Humidity
// SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");// SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");In this way hum+temp of DHT11 are shown together ( CHILD_ID_HUM +1 == CHILD_ID_TEMP ) and
temperatures from ds18b20 are alone in separate widgets.#define CHILD_ID_HUM 9 // DHT11
#define CHILD_ID_TEMP 10 // DHT11
#define DS18B20_STARTID 15 // DS18B20Regards
@zampedro said:
I modified MySensorBase.cpp
void MySensorsBase::SendSensor2Domoticz
case V_TEMP:at lines 595 and 603 (numbers from last git code) for Temperature
// SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");// SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");case V_HUM:
at lines 678 and 686 for Humidity
// SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");// SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");In this way hum+temp of DHT11 are shown together ( CHILD_ID_HUM +1 == CHILD_ID_TEMP ) and
temperatures from ds18b20 are alone in separate widgets.#define CHILD_ID_HUM 9 // DHT11
#define CHILD_ID_TEMP 10 // DHT11
#define DS18B20_STARTID 15 // DS18B20Regards
Where can I find the MySensorsBase.cpp? I am running domoticz on windows and in the installation folder I can't find the file. I can see the file on GitHub but how do I install domoticz from GitHub?
-
@zampedro said:
I modified MySensorBase.cpp
void MySensorsBase::SendSensor2Domoticz
case V_TEMP:at lines 595 and 603 (numbers from last git code) for Temperature
// SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumBaroSensorFloat(cNode, pChild->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");// SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChildHum->childID+1)== pChild->childID)
SendTempHumSensor(cNode, pChild->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendTempSensor(cNode, pChild->batValue, Temp, (!pChild->childName.empty()) ? pChild->childName : "Temp");case V_HUM:
at lines 678 and 686 for Humidity
// SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumBaroSensorFloat(cNode, pChildTemp->batValue, Temp, Humidity, Baro, nforecast, (!pChild->childName.empty()) ? pChild->childName : "TempHumBaro");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");// SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
if ( (pChild->childID+1)== pChildTemp->childID)
SendTempHumSensor(cNode, pChildTemp->batValue, Temp, Humidity, (!pChild->childName.empty()) ? pChild->childName : "TempHum");
else
SendHumiditySensor(cNode, pChild->batValue, Humidity, (!pChild->childName.empty()) ? pChild->childName : "Hum");In this way hum+temp of DHT11 are shown together ( CHILD_ID_HUM +1 == CHILD_ID_TEMP ) and
temperatures from ds18b20 are alone in separate widgets.#define CHILD_ID_HUM 9 // DHT11
#define CHILD_ID_TEMP 10 // DHT11
#define DS18B20_STARTID 15 // DS18B20Regards
Where can I find the MySensorsBase.cpp? I am running domoticz on windows and in the installation folder I can't find the file. I can see the file on GitHub but how do I install domoticz from GitHub?
@palande.vaibhav You have to compile domoticz from source, highly recommended if
you run it on raspberry, orangepi etc... -
@palande.vaibhav You have to compile domoticz from source, highly recommended if
you run it on raspberry, orangepi etc... -