Skip to content

Commit 86e50fd

Browse files
committed
readme + licence update
[ci skip]
1 parent 3151c89 commit 86e50fd

File tree

4 files changed

+266
-7
lines changed

4 files changed

+266
-7
lines changed

LICENSE

+105-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Pavel Slama
3+
Copyright (c) 2019 Pavel Slama
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,107 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+
23+
24+
Open Source Hardware Definition 1.0
25+
26+
Introduction
27+
Open Source Hardware (OSHW) is a term for tangible artifacts --
28+
machines, devices, or other physical things -- whose design has been released
29+
to the public in such a way that anyone can make, modify, distribute, and use
30+
those things. This definition is intended to help provide guidelines for the
31+
development and evaluation of licenses for Open Source Hardware. Hardware is
32+
different from software in that physical resources must always be committed
33+
for the creation of physical goods. Accordingly, persons or companies
34+
producing items ("products") under an OSHW license have an obligation to make
35+
it clear that such products are not manufactured, sold, warrantied, or
36+
otherwise sanctioned by the original designer and also not to make use of any
37+
trademarks owned by the original designer. The distribution terms of Open
38+
Source Hardware must comply with the following criteria:
39+
40+
1. Documentation
41+
The hardware must be released with documentation including design files, and
42+
must allow modification and distribution of the design files. Where
43+
documentation is not furnished with the physical product, there must be a
44+
well-publicized means of obtaining this documentation for no more than a
45+
reasonable reproduction cost, preferably downloading via the Internet without
46+
charge. The documentation must include design files in the preferred format
47+
for making changes, for example the native file format of a CAD program.
48+
Deliberately obfuscated design files are not allowed. Intermediate forms
49+
analogous to compiled computer code -- such as printer-ready copper artwork
50+
from a CAD program -- are not allowed as substitutes. The license may require
51+
that the design files are provided in fully-documented, open format(s).
52+
53+
2. Scope
54+
The documentation for the hardware must clearly specify what portion of the
55+
design, if not all, is being released under the license.
56+
57+
3. Necessary Software
58+
If the licensed design requires software, embedded or otherwise, to operate
59+
properly and fulfill its essential functions, then the license may require
60+
that one of the following conditions are met: a) The interfaces are
61+
sufficiently documented such that it could reasonably be considered
62+
straightforward to write open source software that allows the device to
63+
operate properly and fulfill its essential functions. For example, this may
64+
include the use of detailed signal timing diagrams or pseudocode to clearly
65+
illustrate the interface in operation. b) The necessary software is released
66+
under an OSI-approved open source license.
67+
68+
4. Derived Works
69+
The license shall allow modifications and derived works, and shall allow them
70+
to be distributed under the same terms as the license of the original work.
71+
The license shall allow for the manufacture, sale, distribution, and use of
72+
products created from the design files, the design files themselves, and
73+
derivatives therof.
74+
75+
5. Free redistribution
76+
The license shall not restrict any party from selling or giving away the
77+
project documentation. The license shall not require a royalty or other fee
78+
for such sale. The license shall not require any royalty or fee related to the
79+
sale of derived works.
80+
81+
6. Attribution
82+
The license may require derived documents, and copyright notices associated
83+
with devices, to provide attribution to the licensors when distributing design
84+
files, manufactured products, and/or derivatives thereof. The license may
85+
require that this information be accessible to the end-user using the device
86+
normally, but shall not specify a specific format of display. The license may
87+
require derived works to carry a different name or version number from the
88+
original design.
89+
90+
7. No Discrimination Against Persons or Groups
91+
The license must not discriminate against any person or group of persons.
92+
93+
8. No Discrimination Against Fields of Endeavor
94+
The license must not restrict anyone from making use of the work (including
95+
manufactured hardware) in a specific field of endeavor. For example, it must
96+
not restrict the hardware from being used in a business, or from being used in
97+
nuclear research.
98+
99+
9. Distribution of License
100+
The rights granted by the license must apply to all to whom the work is
101+
redistributed without the need for execution of an additional license by those
102+
parties.
103+
104+
10. License Must Not Be Specific to a Product
105+
The rights granted by the license must not depend on the licensed work being
106+
part of a particular product. If a portion is extracted from a work and used
107+
or distributed within the terms of the license, all parties to whom that work
108+
is redistributed should have the same rights as those that are granted for the
109+
original work.
110+
111+
11. License Must Not Restrict Other Hardware or Software
112+
The license must not place restrictions on other items that are aggregated
113+
with the licensed work but not derivative of it. For example, the license must
114+
not insist that all other hardware sold with the licensed item be open source,
115+
nor that only open source software be used external to the device.
116+
117+
12. License Must Be Technology-Neutral
118+
No provision of the license may be predicated on any individual technology,
119+
specific part or component, material, or style of interface or use thereof.
120+
121+
Afterword
122+
The signatories of this Open Source Hardware definition recognize
123+
that the open source movement represents only one way of sharing information.
124+
We encourage and support all forms of openness and collaboration, whether or
125+
not they fit this definition.

README.md

+139-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,148 @@
11
# WeMos weather station
22
[![Build Status](https://travis-ci.org/pilotak/WemosWeatherStation.svg?branch=master)](https://travis-ci.org/pilotak/WemosWeatherStation)
33

4+
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 [release page](./releases).
5+
6+
Data are sent over MQTT where [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) is waiting to push data to [InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/) and [Grafana](https://grafana.com/) tool to render charts.
7+
8+
**Main futures:**
9+
- Easy configuration via [WiFiManager](https://github.com/tzapu/WiFiManager)
10+
- WeMos based shield
11+
- WH1080 mechanical components for rain, wind measurements and radiation shield
12+
- MCP9808: high precision temperature sensor
13+
- HTU21D: humidity sensor
14+
- BMP280: pressure sensor
15+
- Output data is via MQTT
16+
- supports HTTP OTA
17+
418
## Wemos-meteo shield
5-
![Wemos meteo 1](./Images/WeMos-meteo_1.jpg)
6-
![Wemos meteo 2](./Images/WeMos-meteo_2.jpg)
19+
Based on my libraries:
20+
- [WeatherMeters](https://github.com/pilotak/WeatherMeters)
21+
- [MeteoFunctions](https://github.com/pilotak/MeteoFunctions)
22+
23+
### MQTT topics:
24+
#### `name/status`
25+
If online:
26+
`sensors` key: binary map of sensors state (OK=1, failure=0)
27+
```json
28+
{
29+
"status": 1,
30+
"ip": "192.168.1.7",
31+
"rssi": -10,
32+
"sensors": 7
33+
}
34+
```
35+
36+
otherwise:
37+
```json
38+
{
39+
"status": 0
40+
}
41+
```
42+
43+
#### `name/sensors`
44+
If any of the value can't be calculated, it sends `NaN`
45+
```json
46+
{
47+
"humidity": 79.84,
48+
"pressure_rel": 1021.85,
49+
"pressure_abs": 967,
50+
"dew": 2.1,
51+
"humidex": 3.69,
52+
"heat": 3.97,
53+
"cloud": 390.13,
54+
"temp": [
55+
5.3, // MCP9808
56+
5.36, // BMP280
57+
5.43 // HTU21D
58+
]
59+
}
60+
```
61+
62+
#### `name/upgrade`
63+
As a data send link to `*.bin` upgrade package and it will reply in topic `name/upgrade/status`
64+
65+
#### `name/height`
66+
As a data send new height and it will confirm in topic `name/height/new`
67+
68+
![Wemos meteo 1](./Images/WeMos-meteo_1.jpg) ![Wemos meteo 2](./Images/WeMos-meteo_2.jpg)
769
![Wemos meteo 3](./Images/WeMos-meteo_3.jpg)
870

971
## Weather board
10-
![Weather board 1](./Images/WeatherBoard_1.jpg)
11-
![Weather board 2](./Images/WeatherBoard_2.jpg)
72+
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.
73+
74+
![Weather board 1](./Images/WeatherBoard_1.jpg) ![Weather board 2](./Images/WeatherBoard_2.jpg)
1275
![Weather board 3](./Images/WeatherBoard_3.jpg)
1376

77+
## Server configuration
78+
Below you can find a `docker-compose.yaml` file for fast integration onto your server.
79+
```yaml
80+
version: "3.6"
81+
82+
services:
83+
mosquitto:
84+
container_name: mosquitto
85+
restart: always
86+
image: eclipse-mosquitto
87+
ports:
88+
- 1883:1883
89+
volumes:
90+
- ${DOCKER_PATH}/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
91+
- ${DOCKER_PATH}/mosquitto/pwfile:/mosquitto/config/pwfile
92+
- ${DOCKER_PATH}/mosquitto/data:/mosquitto/data
93+
94+
influxdb:
95+
container_name: influxdb
96+
restart: always
97+
image: influxdb:alpine
98+
environment:
99+
- INFLUXDB_REPORTING_DISABLED=true
100+
- INFLUXDB_DB=${INFLUX_DB}
101+
- INFLUXDB_ADMIN_USER=${INFLUX_ADMIN_USER}
102+
- INFLUXDB_ADMIN_PASSWORD=${INFLUX_ADMIN_PASSWORD}
103+
- INFLUXDB_USER=${INFLUX_USER}
104+
- INFLUXDB_USER_PASSWORD=${INFLUX_PASSWORD}
105+
- INFLUXDB_READ_USER=${INFLUX_READ_USER}
106+
- INFLUXDB_READ_USER_PASSWORD=${INFLUX_READ_PASSWORD}
107+
- INFLUXDB_WRITE_USER=${INFLUX_WRITE_USER}
108+
- INFLUXDB_WRITE_USER_PASSWORD=${INFLUX_WRITE_PASSWORD}
109+
- INFLUXDB_HTTP_AUTH_ENABLED=true
110+
volumes:
111+
- ${DOCKER_PATH}/influxdb:/var/lib/influxdb
112+
ports:
113+
- 8086:8086
114+
115+
grafana:
116+
container_name: grafana
117+
restart: always
118+
image: grafana/grafana
119+
depends_on:
120+
- influxdb
121+
environment:
122+
- GF_ANALYTICS_REPORTING_ENABLED=false
123+
- GF_ANALYTICS_CHECK_FOR_UPDATES=false
124+
- GF_SECURITY_DISABLE_GRAVATAR=true
125+
- GF_SNAPSHOTS_EXTERNAL_ENABLED=false
126+
- GF_AUTH_ANONYMOUS_ENABLED=true
127+
- GF_AUTH_ANONYMOUS_ORG_NAME=${INFLUX_DB}
128+
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
129+
- GF_AUTH_DISABLE_SIGNOUT_MENU=true
130+
- GF_AUTH_BASIC_ENABLED=false
131+
- GF_SERVER_ROOT_URL=https://meteo.${MY_DOMAIN}
132+
volumes:
133+
- ${DOCKER_PATH}/grafana:/var/lib/grafana
134+
ports:
135+
- 3000:3000
136+
137+
telegraf_meteo:
138+
container_name: telegraf_meteo
139+
restart: always
140+
image: telegraf:alpine
141+
depends_on:
142+
- influxdb
143+
- mosquitto
144+
volumes:
145+
- ${DOCKER_PATH}/telegraf/meteo.conf:/etc/telegraf/telegraf.conf:ro
146+
147+
```
148+

WemosWeatherStation/WemosWeatherStation.ino

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
MIT License
3+
Copyright (c) 2019 Pavel Slama
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
SOFTWARE.
19+
*/
20+
121
#include "const.h"
222
#include "wifi.h"
323
#include "mqtt.h"

WemosWeatherStation/const.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define CONFIG_AP_SSID DEVICE_NAME "_config"
66
#define CONFIG_AP_PASSWORD "StrongPasswordHere"
77

8-
#define DEFAULT_MQTT_PORT "1883" // important to be a string
8+
#define DEFAULT_MQTT_PORT "1883" // important to be a string; can be changed in WifiManager
99
#define MQTT_QOS 1
1010
#define MQTT_RETAIN true
1111
#define MQTT_CHECK_INTERVAL 5000
@@ -29,7 +29,7 @@
2929
#define READ_SAMPLES 16 // READ_INTERVAL*SAMPLES=sending time in ms
3030
#define METERS_INTERVAL 60 // how ofter send data from meters in sec
3131
#define METERS_DIR_FILTERING 16 // filter last 16 samples of wind vane
32-
#define DEFAULT_HEIGHT_ABOVE_SEA "415" // m; important to be a string
32+
#define DEFAULT_HEIGHT_ABOVE_SEA "415" // m; important to be a string; can be changed in WifiManager or via MQTT
3333

3434
#define BMP280_ADDR BME280I2C::I2CAddr_0x76 // or BME280I2C::I2CAddr_0x77
3535
#define MCP9808_ADDR 0x18

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy