Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. DHT22 and DS18b20 on same node: DS shows up with Humidity now.

DHT22 and DS18b20 on same node: DS shows up with Humidity now.

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 8 Posters 9.3k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    torfinn
    wrote on last edited by
    #4

    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??

    1 Reply Last reply
    0
    • T Offline
      T Offline
      torfinn
      wrote on last edited by
      #5

      Hi ! You can get a partly workaround using V_DUST_LEVEL or something instead of V_HUM.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zampedro
        wrote on last edited by
        #6

        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.

        miljumeM 1 Reply Last reply
        0
        • Z zampedro

          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.

          miljumeM Offline
          miljumeM Offline
          miljume
          wrote on last edited by
          #7

          @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

          AWIA 1 Reply Last reply
          0
          • miljumeM miljume

            @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

            AWIA Offline
            AWIA Offline
            AWI
            Hero Member
            wrote on last edited by
            #8

            @miljume Domoticz developers consider this a feature... not a bug ;-)

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #9

              I get a similar problem on my plant monitoring. The graph always says "Temperature" even though the sensors only report humidity. I need to explain it every time I show the graphs to anyone.

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                zampedro
                wrote on last edited by
                #10

                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 // DS18B20

                Regards

                palande.vaibhavP 1 Reply Last reply
                0
                • miljumeM Offline
                  miljumeM Offline
                  miljume
                  wrote on last edited by miljume
                  #11

                  @zampedro Sounds perfect, is there any chance this change can be merged into the source of Domoticz?

                  1 Reply Last reply
                  0
                  • Z zampedro

                    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 // DS18B20

                    Regards

                    palande.vaibhavP Offline
                    palande.vaibhavP Offline
                    palande.vaibhav
                    wrote on last edited by
                    #12

                    @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 // DS18B20

                    Regards

                    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?

                    Z 1 Reply Last reply
                    0
                    • palande.vaibhavP palande.vaibhav

                      @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 // DS18B20

                      Regards

                      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?

                      Z Offline
                      Z Offline
                      zampedro
                      wrote on last edited by
                      #13

                      @palande.vaibhav You have to compile domoticz from source, highly recommended if
                      you run it on raspberry, orangepi etc...

                      AWIA 1 Reply Last reply
                      0
                      • Z zampedro

                        @palande.vaibhav You have to compile domoticz from source, highly recommended if
                        you run it on raspberry, orangepi etc...

                        AWIA Offline
                        AWIA Offline
                        AWI
                        Hero Member
                        wrote on last edited by
                        #14

                        @zampedro Please have a look at this thread. The "combination issue" is discussed and solved. There is no reason to compile Domoticz yourself when running on Raspberry. I discourage compiling yourself (unless you like the excercise). The precompiled image works out of the box.

                        Z 1 Reply Last reply
                        3
                        • AWIA AWI

                          @zampedro Please have a look at this thread. The "combination issue" is discussed and solved. There is no reason to compile Domoticz yourself when running on Raspberry. I discourage compiling yourself (unless you like the excercise). The precompiled image works out of the box.

                          Z Offline
                          Z Offline
                          zampedro
                          wrote on last edited by
                          #15

                          @AWI Thanks for the hint.
                          I thought this wasn't a "issue" but just a "really annoying thing".
                          However i run domoticz on a Orange PI PC with WiringOP support and i can't find precompiled images.

                          1 Reply Last reply
                          1
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          19

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.1k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular