Jump to content

Gina

Beyond the Event Horizon
  • Posts

    45,326
  • Joined

  • Last visited

  • Days Won

    120

Everything posted by Gina

  1. At last I've discovered how to move the widgets around on the Dashboard. There's a Layout tab for the Dashboard with dropdowns for the widgets. Grab and move them into the required order.
  2. Seems to be working correctly now having corrected that silly mistake! I'll let it run for a while and then post a screenshot.
  3. I am now getting the status first and then checking it but I think I may have found the problem void setup() { Serial.begin(115200); // default settings // (you can also pass in a Wire library object like &Wire2) //status = bme.begin(); bool status1 = bme.begin(0x76); bool status2 = bme.begin(0x77); if (!status1 and !status2) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } I think this should be void setup() { Serial.begin(115200); // default settings // (you can also pass in a Wire library object like &Wire2) //status = bme.begin(); bool status1 = bme.begin(0x76); bool status2 = bme2.begin(0x77); // THIS LINE WAS WRONG!!!! if (!status1 and !status2) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); }
  4. I'm using the Adafruit library which works fine with one BME280 but do I need the Wire library as well if I want to use two with different addresses?
  5. I think I'll try splitting the if and the begin operations bool status1 = bme.begin(0x76); bool status2 = bme.begin(0x77); if (!status1 and !status2) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); }
  6. The second BME280 set to address 0x77 does not seem to be working. Wondering if using one on I2C bus and other on SPI bus would be better that both on I2C with different addresses. Or maybe I'm doing it wrong. I'm setting the two sensors as Adafruit_BME280 bme; // I2C (0x76) Adafruit_BME280 bme2; // I2C (0x77) Setting them going with :- void setup() { Serial.begin(115200); // default settings // (you can also pass in a Wire library object like &Wire2) //status = bme.begin(); if (!bme.begin(0x76) and (!bme2.begin(0x77))) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } Then reading by :- temperature = bme.readTemperature(); obsT = bme2.readTemperature(); What I'm unsure of is whether if (!bme.begin(0x76) and (!bme2.begin(0x77))) { Really does begin both.
  7. Yes, that makes sense and that's what I'm doing. Now trying to get a sensible layout in the Dashboard. There must be some way to position the widgets but I haven't found it yet! Still working on the sizes.
  8. Changed the display. I think this is better. I don't think the Observatory inside sensor is working properly though. The Observatory Roof controls are just "place holders" ATM as I haven't got an ESP32 connected for controlling the ROR yet.
  9. I've put the obsy sensor unit back out in the obsy, plugged the outside BME280 in and powered up. The outside pressure isn't working and I'm not sure about the inside (obsy) readings. The Living Room unit is working fine. There are no spikes showing (without Forced Mode). I'm not too worried about the outside pressure as I have the indoor pressure and that's sufficient. Think I'll now do some tidying up of the display as a lot of it was just for testing.
  10. The spikes in the temperature history are bad! OTOH I'm not sure I need the history for inside the obsy - a single current reading should be sufficient.
  11. What size timbers are you using for the roof?
  12. Looks like it's back to the dumping of out-of-range values!
  13. Reading the github library advanced section for weather... bme.setSampling(Adafruit_BME280::MODE_FORCED, Adafruit_BME280::SAMPLING_X1, // temperature Adafruit_BME280::SAMPLING_X1, // pressure Adafruit_BME280::SAMPLING_X1, // humidity Adafruit_BME280::FILTER_OFF ); This is what I'm using except for the pressure, which I'm not reading anyway.
  14. Added that and now getting readings again but also still getting spikes!!
  15. Looked at the Adafruit BME280 library in github and found this :-
  16. Now to the spikes problem. Adding this code to the Setup section. bme2.setSampling(Adafruit_BME280::MODE_FORCED, Adafruit_BME280::SAMPLING_X1, // temperature Adafruit_BME280::SAMPLING_X16, // pressure Adafruit_BME280::SAMPLING_X1, // humidity Adafruit_BME280::FILTER_OFF ); Result is that the readings are not changing at all so not the entire solution!!
  17. Found my problem - yep - coding wrong. Had the humidity reading temperature 🤣 When I looked at MQTT Explorer and saw that the humidity and temperature were exactly the same, I twigged!
  18. Have the obsy sensor unit on the table running from bench PSU. The second BME280 is working but doesn't look right. I can't see it being right that the humidity one side of the room is 67% and the other side just 20%. Temperature seems sensible though - the table is near the big picture window and expected to be a bit cooler. The reason there's no readings for Outside is that the outside BME280 is not plugged in.
  19. Next is to change the code in the obsClient sketch to use the second BME280 instead of the DHT22. Then I can make a link and set the present BME280 to address 77 and then take the unit out to the obsy and plug the other BME280 in (the one in the Stevenson screen). Maybe not tonight as it's raining again!!
  20. New reconnect code. Changed to if (client.connect("indoorClient")) { void reconnect() { // Loop until we're reconnected while (!client.connected()) { Serial.print("Attempting MQTT connection..."); // Attempt to connect if (client.connect("indoorClient")) { Serial.println("connected"); // Subscribe client.subscribe("esp32/output"); client.subscribe("esp32/roof"); } else { Serial.print("failed, rc="); Serial.print(client.state()); Serial.println(" try again in 5 seconds"); // Wait 5 seconds before retrying delay(5000); } } } And it works!! Finally, problem SOLVED
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.