mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 16:38:36 +01:00
updated requirements in setup.py
This commit is contained in:
parent
195705d79e
commit
033165d619
4 changed files with 9 additions and 15 deletions
|
@ -1 +1 @@
|
||||||
__version__ = "4.0.1.12"
|
__version__ = "4.0.1.13"
|
||||||
|
|
|
@ -26,15 +26,6 @@ class LogController:
|
||||||
self.configuration = False
|
self.configuration = False
|
||||||
self.datalogger = {}
|
self.datalogger = {}
|
||||||
|
|
||||||
# self.cbpi.config.get does not seem to work here...
|
|
||||||
# self.influxdbaddr="192.168.163.105"
|
|
||||||
# self.influxdbport="8086"
|
|
||||||
# self.influxdbname="cbpi4"
|
|
||||||
# self.influxdburl='http://' + self.influxdbaddr + ':' + str(self.influxdbport) + '/write?db=' + self.influxdbname
|
|
||||||
# self.influxdbuser=""
|
|
||||||
# self.influxdbpwd=""
|
|
||||||
# self.base64string = base64.b64encode(('%s:%s' % (self.influxdbuser,self.influxdbpwd)).encode())
|
|
||||||
|
|
||||||
def log_data(self, name: str, value: str) -> None:
|
def log_data(self, name: str, value: str) -> None:
|
||||||
self.logfiles = self.cbpi.config.get("CSVLOGFILES", "Yes")
|
self.logfiles = self.cbpi.config.get("CSVLOGFILES", "Yes")
|
||||||
self.influxdb = self.cbpi.config.get("INFLUXDB", "No")
|
self.influxdb = self.cbpi.config.get("INFLUXDB", "No")
|
||||||
|
@ -52,7 +43,6 @@ class LogController:
|
||||||
|
|
||||||
formatted_time = strftime("%Y-%m-%d %H:%M:%S", localtime())
|
formatted_time = strftime("%Y-%m-%d %H:%M:%S", localtime())
|
||||||
self.datalogger[name].info("%s,%s" % (formatted_time, value))
|
self.datalogger[name].info("%s,%s" % (formatted_time, value))
|
||||||
|
|
||||||
if self.influxdb == "Yes":
|
if self.influxdb == "Yes":
|
||||||
self.influxdbcloud = self.cbpi.config.get("INFLUXDBCLOUD", "No")
|
self.influxdbcloud = self.cbpi.config.get("INFLUXDBCLOUD", "No")
|
||||||
self.influxdbaddr = self.cbpi.config.get("INFLUXDBADDR", None)
|
self.influxdbaddr = self.cbpi.config.get("INFLUXDBADDR", None)
|
||||||
|
@ -83,10 +73,8 @@ class LogController:
|
||||||
logging.error("InfluxDB cloud write Error: {}".format(e))
|
logging.error("InfluxDB cloud write Error: {}".format(e))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.influxdb = self.cbpi.config.get("INFLUXDB", "No")
|
|
||||||
self.base64string = base64.b64encode(('%s:%s' % (self.influxdbuser,self.influxdbpwd)).encode())
|
self.base64string = base64.b64encode(('%s:%s' % (self.influxdbuser,self.influxdbpwd)).encode())
|
||||||
self.influxdburl='http://' + self.influxdbaddr + ':' + str(self.influxdbport) + '/write?db=' + self.influxdbname
|
self.influxdburl='http://' + self.influxdbaddr + ':' + str(self.influxdbport) + '/write?db=' + self.influxdbname
|
||||||
|
|
||||||
try:
|
try:
|
||||||
header = {'User-Agent': name, 'Content-Type': 'application/x-www-form-urlencoded','Authorization': 'Basic %s' % self.base64string.decode('utf-8')}
|
header = {'User-Agent': name, 'Content-Type': 'application/x-www-form-urlencoded','Authorization': 'Basic %s' % self.base64string.decode('utf-8')}
|
||||||
http = urllib3.PoolManager()
|
http = urllib3.PoolManager()
|
||||||
|
|
|
@ -285,6 +285,12 @@ class CraftBeerPi:
|
||||||
|
|
||||||
self._swagger_setup()
|
self._swagger_setup()
|
||||||
|
|
||||||
|
level = logging.INFO
|
||||||
|
logger = logging.getLogger()
|
||||||
|
logger.setLevel(level)
|
||||||
|
for handler in logger.handlers:
|
||||||
|
handler.setLevel(level)
|
||||||
|
|
||||||
return self.app
|
return self.app
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -30,13 +30,13 @@ setup(name='cbpi',
|
||||||
"requests==2.25.1",
|
"requests==2.25.1",
|
||||||
"voluptuous==0.12.1",
|
"voluptuous==0.12.1",
|
||||||
"pyfiglet==0.8.post1",
|
"pyfiglet==0.8.post1",
|
||||||
'pandas==1.1.5',
|
'pandas==1.4.0',
|
||||||
'click==7.1.2',
|
'click==7.1.2',
|
||||||
'shortuuid==1.0.1',
|
'shortuuid==1.0.1',
|
||||||
'tabulate==0.8.7',
|
'tabulate==0.8.7',
|
||||||
'asyncio-mqtt',
|
'asyncio-mqtt',
|
||||||
'psutil==5.8.0',
|
'psutil==5.8.0',
|
||||||
'numpy==1.20.3',
|
'numpy==1.22.0',
|
||||||
'cbpi4ui',
|
'cbpi4ui',
|
||||||
'importlib_metadata'] + (
|
'importlib_metadata'] + (
|
||||||
['RPi.GPIO==0.7.1a4'] if platform.uname()[1] == "raspberrypi" else [] ),
|
['RPi.GPIO==0.7.1a4'] if platform.uname()[1] == "raspberrypi" else [] ),
|
||||||
|
|
Loading…
Reference in a new issue