Missing sensor nodes in domoticz
-
@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.
-
Really strange... as i said it works great with my sketch and it looks similar.
-
@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!
-
@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.
-
@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
-
@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. -
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.
-
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.
-
@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?