Giter Site home page Giter Site logo

wemosweatherstation's Introduction

Wemos weather station

build Framework Badge Arduino

An all-in-one ESP8266 based weather station. Hardware configuration is split into two parts due to easier maintenance in case of ESP8266 failure and fuse replacement (the board outside is protected against lighting). FW can easily be compiled by PlatformIO or Arduino IDE if necessary, otherwise can be downloaded in Releases.

Data are sent over MQTT where Telegraf is waiting to push data to InfluxDB and Grafana tool to render charts.

Main futures:

  • Easy configuration via WiFiManager
  • WeMos based shield
  • WH1080 mechanical components for rain, wind measurements and radiation shield
  • MCP9808: high precision temperature sensor
  • HTU21D or SHT31D: humidity sensor
  • BMP280 or LPS35HW: pressure sensor
  • Output data is via MQTT
  • supports Arduino OTA, HTTP OTA and NoFuss OTA

Note: on the board there can be only one humidity sensor, one pressure sensor and one temperature sensor in any combination, please see platformio.ini

Wemos-meteo shield

Based on my libraries:

MQTT topics:

name/status

If online: sensors key: binary map of sensors state (OK=1, failure=0)

{
  "status": 1,
  "ip": "192.168.1.7",
  "rssi": -10,
  "sensors": 7,
  "fw_ver": "1.0.0"
}

otherwise:

{
  "status": 0
}

name/sensors

If any of the value can't be calculated, it sends NaN

{
  "humidity_rel": 79.84,
  "humidity_abs": 14.93,
  "pressure_rel": 1021.85,
  "pressure_abs": 967.55,
  "dew": 2.13,
  "humidex": 3.69,
  "heat": 3.97,
  "cloud": 390.13,
  "temp": [
    5.32,
    5.36,
    5.43
  ]
}

name/upgrade

As a data send link to *.bin upgrade package and it will reply in topic name/upgrade/status (HTTP support only) ie.: http://somewebsite.com/upload/package.bin

name/height

As a data send new height and it will confirm in topic name/height/new

Wemos meteo 1 Wemos meteo 2

Wemos meteo 3

Weather board

Fits directly into radiation shield, just connect wind sensors, rain gauge bucket and you ready to measure. For future i have included extention connector for measuring sun light and UV index.

Update, I have created a sencond version of WeatherBoard with water-proof sensors SHT31D and LPS35HW but be carefull they are difficult to solder due to its size.

WeatherBoard 1 WeatherBoard 2 WeatherBoard 3
WeatherBoard V2

Server configuration

Below you can find a docker-compose.yaml file for fast integration onto your server.

version: "3.6"

services:
  mosquitto:
    container_name: mosquitto
    restart: always
    image: eclipse-mosquitto
    ports:
      - 1883:1883
    volumes:
      - ${DOCKER_PATH}/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
      - ${DOCKER_PATH}/mosquitto/pwfile:/mosquitto/config/pwfile
      - ${DOCKER_PATH}/mosquitto/data:/mosquitto/data

  influxdb:
    container_name: influxdb
    restart: always
    image: influxdb:alpine
    environment:
      - INFLUXDB_REPORTING_DISABLED=true
      - INFLUXDB_DB=${INFLUX_DB}
      - INFLUXDB_ADMIN_USER=${INFLUX_ADMIN_USER}
      - INFLUXDB_ADMIN_PASSWORD=${INFLUX_ADMIN_PASSWORD}
      - INFLUXDB_USER=${INFLUX_USER}
      - INFLUXDB_USER_PASSWORD=${INFLUX_PASSWORD}
      - INFLUXDB_READ_USER=${INFLUX_READ_USER}
      - INFLUXDB_READ_USER_PASSWORD=${INFLUX_READ_PASSWORD}
      - INFLUXDB_WRITE_USER=${INFLUX_WRITE_USER}
      - INFLUXDB_WRITE_USER_PASSWORD=${INFLUX_WRITE_PASSWORD}
      - INFLUXDB_HTTP_AUTH_ENABLED=true
    volumes:
      - ${DOCKER_PATH}/influxdb:/var/lib/influxdb
    ports:
      - 8086:8086

  grafana:
    container_name: grafana
    restart: always
    image: grafana/grafana
    depends_on:
      - influxdb
    environment:
      - GF_ANALYTICS_REPORTING_ENABLED=false
      - GF_ANALYTICS_CHECK_FOR_UPDATES=false
      - GF_SECURITY_DISABLE_GRAVATAR=true
      - GF_SNAPSHOTS_EXTERNAL_ENABLED=false
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_ANONYMOUS_ORG_NAME=${INFLUX_DB}
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
      - GF_AUTH_DISABLE_SIGNOUT_MENU=true
      - GF_AUTH_BASIC_ENABLED=false
      - GF_SERVER_ROOT_URL=https://meteo.${MY_DOMAIN}
    volumes:
      - ${DOCKER_PATH}/grafana:/var/lib/grafana
    ports:
      - 3000:3000

  telegraf_meteo:
    container_name: telegraf_meteo
    restart: always
    image: telegraf:alpine
    depends_on:
      - influxdb
      - mosquitto
    volumes:
      - ${DOCKER_PATH}/telegraf/meteo.conf:/etc/telegraf/telegraf.conf:ro

wemosweatherstation's People

Contributors

pilotak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dungdt2016 rg22em

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.