From d04c18d5da06e8e4dcad5bd9a8d9c7ff1bdcb268 Mon Sep 17 00:00:00 2001 From: Tanner van Teeffelen <37911073+TannerVT@users.noreply.github.com> Date: Tue, 12 May 2026 17:29:08 -0400 Subject: [PATCH] Moved additional variables into .env file, updated README.md. --- README.md | 13 +++++++++++++ deviceCheck.py | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2c5452d..b27c715 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,31 @@ The following environment variables must be defined in your `.env` file: - **API_KEY** Your Cisco Meraki API key used to access and manage Meraki networks. + `Required by every script.` + +- **NETWORK_ID** + The network ID of the network you want to parse. + `Required by deviceCheck.py.` + +- **DEVICE_MAC** + The MAC address of the device you want to monitor. + `Required by deviceCheck.py.` - **SMTP_SERVER** Your outgoing SMTP mail server address. + `Required by deviceCheck.py.` - **SMTP_PORT** Your outgoing SMTP mail server port. + `Required by deviceCheck.py.` - **SMTP_EMAIL** The email address used to send notifications. + `Required by deviceCheck.py.` - **SMTP_PASS** The password for the SMTP email account. + `Required by deviceCheck.py.` --- diff --git a/deviceCheck.py b/deviceCheck.py index 030815d..0b2139d 100644 --- a/deviceCheck.py +++ b/deviceCheck.py @@ -8,8 +8,8 @@ load.dotenv() #Variable declaration. API_KEY = os.getenv("API_KEY") -NETWORK_ID = "N_573646002536361150" -CLIENT_MAC = "e4:f1:4c:7e:eb:7a" +NETWORK_ID = os.getenv("NETWORK_ID") +CLIENT_MAC = os.getenv("CLIENT_MAC") #Passes the API key to the header. HEADERS = { @@ -72,7 +72,7 @@ while True: send_email( subject="Meraki Alert", body="Client " + CLIENT_MAC + " is offline!", - to_email="tanner@acoservices.com" + to_email=os.getenv("SMTP_RECEIVER") ) #Wait a minute before checking again.