fixed get mac

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-12 22:50:54 +01:00
parent 7a54a45a1f
commit b9efbe233a
3 changed files with 5 additions and 4 deletions

View File

@ -90,6 +90,7 @@ pip3 install Requests
pip3 install stupidArtnet pip3 install stupidArtnet
pip3 install wifi pip3 install wifi
pip3 install paho-mqtt pip3 install paho-mqtt
pip3 install get-mac
``` ```
### Setup the wifi access point: ### Setup the wifi access point:

View File

@ -7,14 +7,14 @@ import json
import time import time
from threading import Thread from threading import Thread
import paho.mqtt.client as mqtt 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 # 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_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 SERVER_PORT = 5000 # Change to the port your Flask app is running on
# Dynamically obtain the MAC address of the WLAN interface # 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 # Replace with the GPIO pin connected to the data input of the WS2812B LED strip
LED_STRIP_PIN = 18 LED_STRIP_PIN = 18

View File

@ -5,11 +5,11 @@ import paho.mqtt.client as mqtt
import threading import threading
from stupidArtnet import StupidArtnet from stupidArtnet import StupidArtnet
import os import os
from uuid import getnode as get_mac from getmac import get_mac_address
app = Flask(__name__) app = Flask(__name__)
wlan_mac_address = get_mac(interface="wlan0") wlan_mac_address = get_mac_address(interface="wlan0")
# Read configuration from config.json # Read configuration from config.json
try: try: