diff --git a/terrariumEngine.py b/terrariumEngine.py index 6e06564c0..52dda3dc2 100644 --- a/terrariumEngine.py +++ b/terrariumEngine.py @@ -94,7 +94,7 @@ def __init__(self, version): self.update_available = False self.weather = None # Dirty hack... :( - self.device = re.search(r"Model\s+:\s+(?P.*)", Path("/proc/cpuinfo").read_text()).group("device") + self.device = Path("/proc/device-tree/model").read_text().rstrip('\x00') init_db(self.version) # Send message that startup is ready..... else the startup will wait until done.... can take more then 1 minute @@ -282,9 +282,7 @@ def load_settings(self): # Load device information try: - settings["device"] = re.search(r"Model\s+:\s+(?P.*)", Path("/proc/cpuinfo").read_text()).group( - "device" - ) + settings["device"] = Path("/proc/device-tree/model").read_text().rstrip('\x00') except Exception as ex: logger.debug(f"Error getting Pi info: {ex}") settings["device"] = "Unknown"