The firmware for uWeather, an ESP8266-based weather station
 
 
 
 
 
 
Go to file
Kenneth Barbour b9cb94b736 update readme 2024-09-14 11:46:40 -04:00
bin web frontend for configuration and local weather display 2020-01-06 16:22:59 -05:00
frontend ordered arguments wrong 2020-07-29 20:50:33 -04:00
include Initial commit 2019-12-18 13:48:02 -05:00
lib Initial commit 2019-12-18 13:48:02 -05:00
src successful builds 2024-09-14 11:28:06 -04:00
test Initial commit 2019-12-18 13:48:02 -05:00
.gitignore ignore data directory 2020-01-06 21:11:03 -05:00
.travis.yml Initial commit 2019-12-18 13:48:02 -05:00
README.markdown update readme 2024-09-14 11:46:40 -04:00
platformio.ini successful builds 2024-09-14 11:28:06 -04:00

README.markdown

uWeather Firmware

Firmware for a small Arduino/ESP8266 + BME280 Weather Station.

Features

Weather Over HTTP

Access live weather data via a web app running on the weather station. Connect using mDNS (weather.local) or directly to the station's IP address if mDNS is not configured or supported.

MQTT Data (Experimental)

The station can send JSON-encoded weather data to a configured MQTT host. Currently, it supports communication only over the standard port without TLS or authentication.

Build and Install

  1. Building and Uploading via USB/Serial:

    • Connect the ESP8266 to your computer via USB.

    • Use PlatformIO to build and upload the firmware:

      pio run --target upload
      
    • For the first time setup, also upload the filesystem:

      pio run --target uploadfs
      
  2. Uploading Over the Air (OTA):

    • If the station is already connected to WiFi, OTA uploads are preferred:

      pio run --target upload --upload-port <station_ip_address>
      
    • Replace <station_ip_address> with the actual IP address of the station (e.g., 192.168.1.72).

Initial Station Setup

After installing the firmware and booting for the first time:

  1. Connect to the station's WiFi Access Point using a smartphone or laptop.
  2. Open the setup page at http://192.168.1.4/setup.
  3. Enter the WiFi configuration and station settings.
  4. Optionally commit config settings to EEPROM (WiFi settings are automatically saved). To persist other settings after a restart, POST to /config/commit.

Note: There are known issues with the initial WiFi connection process. As a workaround, temporarily set WiFi credentials manually in the code to ensure they are written to EEPROM.

Monitoring via Serial UART

  • Monitor the serial output at 74880 baud to see logs and debug information:

    pio device monitor -b 74880
    

Web Server Usage

  • The web server is accessible via plain HTTP. By default, it responds at weather.local using mDNS. Alternatively, use the station's IP address if mDNS is not available.

Known Issues and Troubleshooting

  • Initial WiFi Connection: There are issues with connecting to WiFi for the first time. Manually setting the WiFi credentials in the code is a recommended workaround to write them to EEPROM.
  • MQTT: The MQTT functionality is still experimental and may have limited support or issues. Currently, it does not support TLS or authentication.

TODO

  • Implement /wifi/scan
  • Shutdown web server
  • Configurable MQTT update interval
  • Deep sleep functionality
  • Remotely disable deep sleep