-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
### Backend for "atbrask's Sensor Nodes v1.0" | ||
Copyright (c) 2014-2017 A.T.Brask <[email protected]> (Except included libs) | ||
Copyright (c) 2014-2018 A.T.Brask <[email protected]> (Except included libs) | ||
All rights reserved | ||
|
||
Version history: | ||
* v1.5 (2018-11-21) Upgraded to piCore 9.0.3 and enabled HTTPS support. | ||
* v1.4 (2017-01-16) Upgraded to piCore 8.0 and InfluxDB >=1.0 | ||
* v1.3 (2016-01-22) Added support for 433MHz sensors. Lots of refactoring. | ||
* v1.2 (2015-11-11) Fixed compatibility issues | ||
|
@@ -39,7 +40,7 @@ called piCore. | |
* Optional: A 433MHz receiver and a bunch of compatible sensors (see below) | ||
* A bunch of "atbrask's Sensor Nodes" | ||
* A running [InfluxDB](http://influxdb.com) server | ||
* A [disk image of piCore 8.0](http://tinycorelinux.net/8.x/armv6/releases/RPi/piCore-8.0.zip) (+ basic knowledge about how to use it) | ||
* A [disk image of piCore 9.0.3](http://tinycorelinux.net/9.x/armv6/releases/RPi/piCore-9.0.3.zip) (+ basic knowledge about how to use it) | ||
* Knowledge of the python programming language | ||
* An internet connection :-) | ||
|
||
|
@@ -88,7 +89,7 @@ PiCore exposes on these pins. When this is done, the receiver streams data | |
to /dev/ttyAMA0 whenever it receives some. | ||
|
||
#### Installation | ||
* Install piCore 8.0 onto an SD card using `dd` or similar tool. | ||
* Install piCore 9.0.3 onto an SD card using `dd` or similar tool. | ||
* Plug in the SD card and boot the Pi. | ||
* Log in to the system using SSH (username `tc` and password `piCore`). | ||
* Change the password to something else using `passwd`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# RPIWeather Data Gateway | ||
# Copyright (c) 2014-2017 A.T.Brask <[email protected]> | ||
# Copyright (c) 2014-2018 A.T.Brask <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify it under | ||
# the terms of the GNU General Public License as published by the Free Software | ||
|
@@ -21,8 +21,8 @@ | |
from influxdb import InfluxDBClient | ||
|
||
class InfluxDBSender: | ||
def __init__(self, host, port, username, password, database, table, namemap, dataqueue, logger): | ||
self.db = InfluxDBClient(host, port, username, password, database) | ||
def __init__(self, host, port, ssl, verify_ssl, username, password, database, table, namemap, dataqueue, logger): | ||
self.db = InfluxDBClient(host, port, username, password, database, ssl, verify_ssl) | ||
self.table = table | ||
self.namemap = namemap # id -> name | ||
self.dataqueue = dataqueue | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/python | ||
|
||
# RPIWeather Data Gateway | ||
# Copyright (c) 2014-2017 A.T.Brask <[email protected]> | ||
# Copyright (c) 2014-2018 A.T.Brask <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify it under | ||
# the terms of the GNU General Public License as published by the Free Software | ||
|
@@ -43,12 +43,14 @@ | |
magicnumber = 0x20130928 | ||
|
||
# Database settings | ||
host = "192.168.1.251" | ||
port = 8086 | ||
username = "gateway" | ||
password = "thomas" | ||
database = "RPIWeather" | ||
table = "sensordata" | ||
host = "192.168.1.251" | ||
port = 8086 | ||
ssl = False | ||
verify_ssl = False | ||
username = "gateway" | ||
password = "thomas" | ||
database = "RPIWeather" | ||
table = "sensordata" | ||
|
||
# 433 MHz receiver settings | ||
serialPort = '/dev/ttyAMA0' | ||
|
@@ -96,7 +98,7 @@ | |
handler.setFormatter(formatter) | ||
logger.addHandler(handler) | ||
|
||
logger.info("RPIWeather Data Gateway (c) 2014-2017 atbrask") | ||
logger.info("RPIWeather Data Gateway (c) 2014-2018 atbrask") | ||
|
||
# Start data queue | ||
dataqueue = Queue.Queue() | ||
|
@@ -107,7 +109,7 @@ | |
BMPSampler.BMPSampler(bmpSampleInterval, heightAboveSeaLevel, dataqueue, logger).start() | ||
|
||
# Start data sender | ||
InfluxDBSender.InfluxDBSender(host, port, username, password, database, table, namemap, dataqueue, logger).start() | ||
InfluxDBSender.InfluxDBSender(host, port, ssl, verify_ssl, username, password, database, table, namemap, dataqueue, logger).start() | ||
|
||
# Wait forever | ||
logger.info("RPIWeather Data Gateway start-up completed!") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup(name = 'RPIWeather', | ||
version = '1.4.0', | ||
version = '1.5.0', | ||
author = 'A.T.Brask', | ||
author_email = '[email protected]', | ||
description = 'Weather station based on nRF24L01, DHT22, ATtiny84, and a Raspberry Pi', | ||
|