Setup default ULR for influxdb

This commit is contained in:
Maxim Strinzha 2023-03-21 22:58:35 +03:00
parent c59931dfc1
commit 15b275b22e

View file

@ -224,18 +224,10 @@ class ConfigUpdate(CBPiExtension):
if influxdbaddr is None: if influxdbaddr is None:
logger.info("INIT Influxdbaddr") logger.info("INIT Influxdbaddr")
try: try:
await self.cbpi.config.add("INFLUXDBADDR", "localhost", ConfigType.STRING, "IP Address of your influxdb server (If INFLUXDBCLOUD set to Yes use URL Address of your influxdb cloud server)") await self.cbpi.config.add("INFLUXDBADDR", "http://localhost:8086", ConfigType.STRING, "URL Address of your influxdb server (If INFLUXDBCLOUD set to Yes use URL Address of your influxdb cloud server)")
except: except:
logger.warning('Unable to update config') logger.warning('Unable to update config')
## Check if influxdbport is in config
#if influxdbport is None:
# logger.info("INIT Influxdbport")
# try:
# await self.cbpi.config.add("INFLUXDBPORT", "8086", ConfigType.STRING, "Port of your influxdb server")
# except:
# logger.warning('Unable to update config')
## Check if influxdbname is in config ## Check if influxdbname is in config
if influxdbname is None: if influxdbname is None:
logger.info("INIT Influxdbname") logger.info("INIT Influxdbname")