Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Weather Station Ideas


Gina

Recommended Posts

I was thinking that if you used Wim's webserver idea, it could just produce a page with all the data on.  You could then have software elsewhere (RPi, perhaps?) that would pull the data off that page and do all the hard stuff.

James

  • Thanks 1
Link to comment
Share on other sites

Ordered a BME280 due to arrive tomorrow.  That will go in the Stevenson Screen on the north wall of the obsy.  I'll use a DHT22 for inside the scope room.  Have several of those.  Or the other way round - just that I only need one pressure sensor.  Don't know what the use the altitude sensor is.

Link to comment
Share on other sites

1 hour ago, JamesF said:

I was thinking that if you used Wim's webserver idea, it could just produce a page with all the data on.  You could then have software elsewhere (RPi, perhaps?) that would pull the data off that page and do all the hard stuff.

James

Didn't know you could do that.  Later I would like to know how to pull data off a web page in software.

Edited by Gina
Link to comment
Share on other sites

51 minutes ago, Gina said:

Don't quite understand ESP-NOW.  Says if doesn't use WiFi yet isn't wired so does it use BlueTooth?

It uses the wifi hardware but doesn't connect to a network. In stead it creates a peer to peer connection, similar to bluetooth, but also many-to-many.

You should also check the esp32 youtube videos by Andreas Spiess (the "Swiss guy with the funny accent")

 

  • Thanks 1
Link to comment
Share on other sites

31 minutes ago, Gina said:

Didn't know you could do that.  Later I would like to know how to pull data off a web page in software.

If you stick to Python since you're familiar with it, there are certain to be Python libraries that allow you to grab a web page and pick elements out of it.

James

  • Thanks 1
Link to comment
Share on other sites

8 minutes ago, Gina said:

I used to know Python some years ago - I'm more familiar with C++ now but guess I can revise Python.

Processing text in C or C++ can be a bit of a slog.  I tend to use Perl for that sort of thing because it's so much easier, but these days Python is just as good.  And there'll be libraries that allow you to just call a function to grab the content of a web page from a server, so you'd not need to mess about with all the TCP-layer stuff, sockets and suchlike.

James

  • Thanks 1
Link to comment
Share on other sites

I think I'll use 2 ESP32s, one for the wind sensors and rain gauge and the other in the scope room for BME280 and DHT22 outside in Stevenson screen on the outside connected through the north wall to the ESP32 inside.  These can be linked with ESP-NOW and the ESP32 in the wind unit used as WIFi as it will be higher and a bit nearer to the WiFi AP.  ESP32 in preference to the ESP8266 as it has more free GPIO lines.

Edited by Gina
Link to comment
Share on other sites

The plan seems to be to set up the ESP32 as in Wim's webserver idea exactly with the BME280 and get it working then try adding code for the wind sensors etc.

Link to comment
Share on other sites

1 hour ago, Gina said:

Didn't know you could do that.  Later I would like to know how to pull data off a web page in software.

Esp32 can create web pages in one of two ways, either on the go, whenever the server is accessed, or by creating a file called index.html or default.html. You should probably use the second option.

https://randomnerdtutorials.com/esp32-web-server-arduino-ide/

https://randomnerdtutorials.com/esp32-web-server-spiffs-spi-flash-file-system/

Btw, lots of information on the randomnerdstutorials site

  • Thanks 1
Link to comment
Share on other sites

13 minutes ago, Gina said:

ESP32 in preference to the ESP8266 as it has more free GPIO lines.

Btw, did you know that esp32 devkit boards come in two flavours? Either with 30 pins, or with 36 pins. But the extra pins on the larger board are already used up by the internal flash. So no use buying the 36 pin version.

Edited by wimvb
Link to comment
Share on other sites

34 minutes ago, Gina said:

Can more than one client system access a server at the same time?

In the general case, this is quite possible.  Where the ESP is concerned I imagine they might have to be dealt with in turn, but they ought to be sufficiently quick that you won't really notice.

James

  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, wimvb said:

Btw, did you know that esp32 devkit boards come in two flavours? Either with 30 pins, or with 36 pins. But the extra pins on the larger board are already used up by the internal flash. So no use buying the 36 pin version.

Yes, I did know that - I have the 30 pin version.

Edited by Gina
Link to comment
Share on other sites

I see that the ESP32 can be used as an output device server so I could probably use one to drive my wall dials.  But that's for later - need to walk before I try to run! 😁

Edited by Gina
Link to comment
Share on other sites

17 minutes ago, Gina said:

I see that the ESP32 can be used as an output device server so I could probably use one to drive my wall dials.  But that's for later - need to walk before I try to run! 😁

As in driving servos or stepper motors?

Link to comment
Share on other sites

This is what my mini weather station produces atm (indoors)

1671182132_Skrmklipp2020-07-2702_05_16.thumb.png.4ab7842fea8d948e3b472c831e158e4b.png

By replacing the main.py file on the ESP32, I can go from this to a single, plain text line output in a minute.

And I can confirm that the ESP web server can handle multiple connections. I have it open in Chrome and in IE (same computer).

Logging the data and graphing it would take more power than the ESP32 can handle.

Edited by wimvb
  • Thanks 1
Link to comment
Share on other sites

10 hours ago, jiberjaber said:

My experience with the ESP8266 was the web service and dealing with interrupts for the wind and rain didn't mix.  Might be OK with the '32 but this is why I went for MQTT

I think MQTT is definitely worth considering. All you need is a server/broker (RPi?) which is easy to set up. Then you can send messages (data etc) between clients easily. The ESP32 should have an MQTT library and there will be one for whatever language you go with on the indoor side. There are also free sites on the web that you can use as your broker - see CloudMQTT. I have used it just for testing so you can play with the client ends without needing to build the broker.

So it might look like this:

                     (WiFi)                       (WiFi/Eth)
Weather Station <------------------> Broker <------------------> Client (RPi or PC?)
 (ESP32) |                      (RPi or CloudMQTT)                      |
         |                                                              |
      Sensors                                                         Dials

Some instruction on building a pi based broker: here

I would probably go the MQTT route if I started my WS from scratch. I have an RPi in my WS outside as all my sensors are 1-wire and some were quite expensive (rain gauge & wind vane/gauge). I use oww server to make the 1-wire devices connected to the RPi in the WS appear as local devices on the indoor RPi. Then the rest is coded in Java (backend logging to MySQL db) and a PHP/javascript web front-end also on the indoor Pi.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, tekkydave said:

I think MQTT is definitely worth considering.

+1

I played with mqtt with a rpi (2b?) as broker and esp32 as client. But I was testing it for use with INDI and simultaneous use as standalone server. And just to learn more about mqtt. I believe the mqtt and INDI part was the most difficult one. There is/was no mqtt INDI driver, so you’d need to build one. But MQTT and INDI are quite alike in structure.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.