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. Controllers
  3. Domoticz
  4. Missing sensor nodes in domoticz

Missing sensor nodes in domoticz

Scheduled Pinned Locked Moved Domoticz
20 Posts 5 Posters 8.6k Views 4 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.
  • lorimoL lorimo

    @mfalkvidd thank you, I added a delay before every present(), but that didn't change anything.

    @sundberg84 your example is mostly the same as mine. I think I used this or a copy of it as basis for mine.
    What I do not understand is, that I can't define a MySensor variable (" MySensor gw; "). Maybe it is not needed within a gateway. So I can not use the begin() command.

    GertSandersG Offline
    GertSandersG Offline
    GertSanders
    Hardware Contributor
    wrote on last edited by
    #5

    @lorimo I have had to add 500ms between each sensor presentation.

    I now put this in my code:

    #define MESSAGEWAIT 500

    and after sending something to Domoticz I do either wait(MESSAGEWAIT); for AC based nodes, or sleep(MESSAGEWAIT); for battery based nodes (I'm using the DEV version of the library, you may need to do gw.wait(MESSAGEWAIT)). Seems to resolve my problems.

    I'm hoping the gateway software for Raspberry will include the use of the interrupt capability of the NRF24L01+ at some point, then these intervals are no longer needed.

    1 Reply Last reply
    0
    • lorimoL Offline
      lorimoL Offline
      lorimo
      wrote on last edited by
      #6

      @GertSanders Thanks, I tested with 500ms and now also added a wait(500) before each send() but without success.
      I found an additional interesting point: On the hardware setup page for the nodes the "last seen" time stamp for the childs changes with each send (blinking LED on Arduino) but on the dashboard the "last seen" stays at the time when I plugged the Arduino in. And the sensor value does also not change within domoticz.

      1 Reply Last reply
      0
      • sundberg84S Offline
        sundberg84S Offline
        sundberg84
        Hardware Contributor
        wrote on last edited by sundberg84
        #7

        Aaaaaah!? I dont think Domoticz updates the value if its the same as before - could it be?
        Have a look at your gateway log - there you will see if thats the issue. You will recieve the baro value there.

        Controller: Proxmox VM - Home Assistant
        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

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

          Well spotted! Yes, "last seen" in Domoticz has nothing to do with when the sensor was last seen, unfortunately. Sometimes the logic behind Domoticz isn't very logical.

          1 Reply Last reply
          0
          • lorimoL Offline
            lorimoL Offline
            lorimo
            wrote on last edited by
            #9

            @sundberg84 that's right, domoticz updates only after changes, because only then the mysensor node sends data. AFAIK domoticz does not compress the incoming data. In the gateway log there are value changes every few seconds, so there should something happen.

            @mfalkvidd I experimented with the DHT sensor directly connected to the raspberri Pi running domoticz. Then the "last seen" changed with every updated value. So I expected this to happen with the MySensor node also.

            After waiting some more time the values of temperature and humidity are still unchanged but that can not be correct.

            1 Reply Last reply
            0
            • sundberg84S Offline
              sundberg84S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #10

              Ok, but the logic here must then be that if you see the traffic in your gateway log, but nothing in domoticz - there must be something wrong with your connection gateway - domoticz - no?

              Controller: Proxmox VM - Home Assistant
              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

              1 Reply Last reply
              0
              • lorimoL Offline
                lorimoL Offline
                lorimo
                wrote on last edited by
                #11

                @sundberg84 the connection is a regular USB cable which works fine on other devices too.
                But I am one step ahead: I changed the sketch for only using the humidity sensor and it worked as expected. The values come in and I see them in the domoticz log, also the "last seen" in the dashboard updates.
                Then I did the same for the pressure sensor and it didn't work. For this the solution was really easy: a type mismatch. I defined "pressure" as "long" and "lastBaro" as "float". After changing both to "float" the single sensor gateway woks fine. I see the pressure sensor in the devices list and the values are collected.

                But when I connect both sensors, still nothing works.

                1 Reply Last reply
                0
                • sundberg84S Offline
                  sundberg84S Offline
                  sundberg84
                  Hardware Contributor
                  wrote on last edited by
                  #12

                  Really strange... as i said it works great with my sketch and it looks similar.

                  Controller: Proxmox VM - Home Assistant
                  MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                  MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                  RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                  1 Reply Last reply
                  0
                  • lorimoL Offline
                    lorimoL Offline
                    lorimo
                    wrote on last edited by
                    #13

                    @sundberg84 still searching for a solution.
                    I tried to rewrite the sketch, starting from the working single sensor gateway with the humidity sensor. In the domoticz log I can see the messages from the sensor come in and the value is updated. Then I added line by line the necessary code for the pressure sensor.
                    The "present(ID, S_BARO);" did not have any results, but the humidity still updates. After adding the "send(msgBaro.set(pressure, 0));" the data delivery stopped (does it make any difference here to have a "0" instead of "1" for the ack? It's the only difference to your script I found.)
                    It's the same the other way around: starting from the gateway only with the pressure sensor. As soon as I add the send command the function stops.

                    This led me to the idea, that there must be something wrong with the present() or the library. I searched for another library for the BMP180 sensor and fond https://github.com/sparkfun/BMP180_Breakout. And it worked directly. The only problem is, that now the values are incorrect. I get 867hPa instead of 1018hPa.

                    Thanks for your help!

                    1 Reply Last reply
                    0
                    • lorimoL Offline
                      lorimoL Offline
                      lorimo
                      wrote on last edited by
                      #14

                      @sundberg84 So I found the error while using the SFE_BMP180 library: there is a need for a short delay before the getPressure(). So now it works.

                      But why not with the Adafruit_BMP085 library I do not understand.

                      Thanks a lot.

                      1 Reply Last reply
                      0
                      • alexsh1A Offline
                        alexsh1A Offline
                        alexsh1
                        wrote on last edited by
                        #15

                        @lorimo Good you worked it out - sometimes it can be a combination of several libraries. I have been really struggling to combine DS18B20, DHT22, water and gas sensor though separately all sketches were working just fine.

                        In your case, the simple solution would be having BME280 instead of both DHT22 and BMP180

                        1 Reply Last reply
                        0
                        • lorimoL Offline
                          lorimoL Offline
                          lorimo
                          wrote on last edited by
                          #16

                          @alexsh1 yes, that's what I found out after buying those two devices. But for some early tests and freshen up my rusty programming skills it is good. Maybe I change the hardware for the final installation.
                          But it is still curious, that those two libraries won't work together. I tried to understand the code, but up to now did not find a clue, what could be the reason.

                          1 Reply Last reply
                          0
                          • alexsh1A Offline
                            alexsh1A Offline
                            alexsh1
                            wrote on last edited by
                            #17

                            @lorimo it is a low level programming you have to look at. Also from my experience having one sensor is always better than having two. You may park your sensors and go for BME280. It is more expensive, but very small and handy.

                            1 Reply Last reply
                            0
                            • lorimoL Offline
                              lorimoL Offline
                              lorimo
                              wrote on last edited by
                              #18

                              Do you love curiosity?
                              After nearly a week of running, my gateway stopped working out of the blue.
                              I found out, that I am where I began. The same effects as described in the original post, but with the SFE library.

                              So I tried it again with the original Adafruit_BMP library and --- it worked !

                              Maybe there is something with my hardware. I'll go and get me another Arduino Board from a different manufacturer and try it again.

                              alexsh1A 1 Reply Last reply
                              0
                              • lorimoL lorimo

                                Do you love curiosity?
                                After nearly a week of running, my gateway stopped working out of the blue.
                                I found out, that I am where I began. The same effects as described in the original post, but with the SFE library.

                                So I tried it again with the original Adafruit_BMP library and --- it worked !

                                Maybe there is something with my hardware. I'll go and get me another Arduino Board from a different manufacturer and try it again.

                                alexsh1A Offline
                                alexsh1A Offline
                                alexsh1
                                wrote on last edited by
                                #19

                                @lorimo said:

                                Do you love curiosity?
                                After nearly a week of running, my gateway stopped working out of the blue.

                                Are you sure this is not a node and 100% the gateway stopped working?

                                lorimoL 1 Reply Last reply
                                0
                                • alexsh1A alexsh1

                                  @lorimo said:

                                  Do you love curiosity?
                                  After nearly a week of running, my gateway stopped working out of the blue.

                                  Are you sure this is not a node and 100% the gateway stopped working?

                                  lorimoL Offline
                                  lorimoL Offline
                                  lorimo
                                  wrote on last edited by
                                  #20

                                  @alexsh1 yes, I'm sure. Up to now it is only a serial gateway with direct connected sensors.

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


                                  23

                                  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