diff --git a/bot/main.py b/bot/main.py index 9d7de26..3370b2c 100644 --- a/bot/main.py +++ b/bot/main.py @@ -2,6 +2,7 @@ import datetime from bot.api import telegram, google, weather, reddit import requests +import socket import numpy as np import time import json @@ -65,12 +66,13 @@ class ChatBot(FW.BotFramework): ip = requests.get('https://api.ipify.org').text except: ip = "not fetchable" + local_ips = [i[4][0] for i in socket.getaddrinfo(socket.gethostname(), None)] message += "<pre>Status: Running :green_circle:\n" message += "Uptime: " + delta[:delta.rfind(".")] + "\n" message += "Reboots: " + str(self.persistence["global"]["reboots"]) + "\n" - message += "IP-Adress: " + ip + "\n" - + message += "IP-Adress (public): " + ip + "\n" + message += "IP-Adress (private): " + str(local_ips) + "\n" tot_r = np.array(self.persistence["bot"]["receive_activity"]["count"]).sum() message += "Total messages read: " + str(tot_r) + "\n" diff --git a/dashboard/main.py b/dashboard/main.py index eee3ffa..f381c27 100644 --- a/dashboard/main.py +++ b/dashboard/main.py @@ -99,9 +99,11 @@ class DashBoard(): ye = self.persistence["bot"]["execute_activity"]["count"] fig = go.Figure() - fig.add_trace(go.Scatter(x=xs, y=ys, fill="tozeroy", mode="lines", text="Gesendet")) fig.add_trace(go.Scatter(x=xr, y=yr, fill="tozeroy", mode="lines", text="Gelesen")) + fig.add_trace(go.Scatter(x=xs, y=ys, fill="tozeroy", mode="lines", text="Gesendet")) fig.add_trace(go.Scatter(x=xe, y=ye, fill="tozeroy", mode="lines", text="Ausgeführt")) + + fig.layout.update(showlegend=False,margin=dict(l=0, r=0, t=0, b=0),) card = dbc.Card( diff --git a/dashboard/static/header.jpg b/dashboard/static/header.jpg index 4ab56cd..d51cc5a 100644 Binary files a/dashboard/static/header.jpg and b/dashboard/static/header.jpg differ diff --git a/launcher.py b/launcher.py index 6459af0..93e51a9 100644 --- a/launcher.py +++ b/launcher.py @@ -20,7 +20,7 @@ class Launcher(): self.persistence["global"]["reboots"] += 1 self.clock_module = clock.main.ClockFace(prst=self.persistence) - self.bot_module = bot.main.ChatBot(name="ChatterBot", version="2.1", prst=self.persistence, hw_commands=self.clock_module.commands) + self.bot_module = bot.main.ChatBot(name="ChatterBot", version="2.2", prst=self.persistence, hw_commands=self.clock_module.commands) self.dashboard_module = dashboard.main.DashBoard(host_ip="0.0.0.0", prst=self.persistence) self.threads = []