From b9efbe233a0ad003eb65dc9a8f4e2dbd5d212bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Mon, 12 Feb 2024 22:50:54 +0100 Subject: [PATCH] fixed get mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- README.md | 1 + client/main.py | 4 ++-- server/app.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77b0d0e..5e9b4e5 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ pip3 install Requests pip3 install stupidArtnet pip3 install wifi pip3 install paho-mqtt +pip3 install get-mac ``` ### Setup the wifi access point: diff --git a/client/main.py b/client/main.py index 3c9489b..a7e4bb1 100644 --- a/client/main.py +++ b/client/main.py @@ -7,14 +7,14 @@ import json import time from threading import Thread import paho.mqtt.client as mqtt -from uuid import getnode as get_mac +from getmac import get_mac_address # Replace with your server's IP address and port SERVER_IP = '192.168.0.1' # Change to the actual IP of the PiXelTube Master SERVER_PORT = 5000 # Change to the port your Flask app is running on # Dynamically obtain the MAC address of the WLAN interface -wlan_mac_address = get_mac(interface="wlan0") +wlan_mac_address = get_mac_address(interface="wlan0") # Replace with the GPIO pin connected to the data input of the WS2812B LED strip LED_STRIP_PIN = 18 diff --git a/server/app.py b/server/app.py index 00c01ec..b37da53 100644 --- a/server/app.py +++ b/server/app.py @@ -5,11 +5,11 @@ import paho.mqtt.client as mqtt import threading from stupidArtnet import StupidArtnet import os -from uuid import getnode as get_mac +from getmac import get_mac_address app = Flask(__name__) -wlan_mac_address = get_mac(interface="wlan0") +wlan_mac_address = get_mac_address(interface="wlan0") # Read configuration from config.json try: