diff --git a/Backend/README.md b/Backend/README.md index b5bcfb8..a18af6b 100644 --- a/Backend/README.md +++ b/Backend/README.md @@ -1,8 +1,9 @@ ### Backend for "atbrask's Sensor Nodes v1.0" -Copyright (c) 2014-2017 A.T.Brask (Except included libs) +Copyright (c) 2014-2018 A.T.Brask (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`. diff --git a/Backend/RPIWeather/InfluxDBSender.py b/Backend/RPIWeather/InfluxDBSender.py index 0426aa8..2bc7469 100644 --- a/Backend/RPIWeather/InfluxDBSender.py +++ b/Backend/RPIWeather/InfluxDBSender.py @@ -1,5 +1,5 @@ # RPIWeather Data Gateway -# Copyright (c) 2014-2017 A.T.Brask +# Copyright (c) 2014-2018 A.T.Brask # # 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 diff --git a/Backend/rpiweather.py b/Backend/rpiweather.py index bef0fa2..b69588c 100644 --- a/Backend/rpiweather.py +++ b/Backend/rpiweather.py @@ -1,7 +1,7 @@ #!/usr/bin/python # RPIWeather Data Gateway -# Copyright (c) 2014-2017 A.T.Brask +# Copyright (c) 2014-2018 A.T.Brask # # 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!") diff --git a/Backend/setup.py b/Backend/setup.py index 7a34cb8..9460549 100644 --- a/Backend/setup.py +++ b/Backend/setup.py @@ -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 = 'atbrask@gmail.com', description = 'Weather station based on nRF24L01, DHT22, ATtiny84, and a Raspberry Pi',