Update system.py

This commit is contained in:
SpudGunMan
2025-10-20 09:22:45 -07:00
parent d57826613c
commit 5f5aeeadac
+3 -2
View File
@@ -410,8 +410,10 @@ for i in range(1, 10):
# add channel hash to channel_list
for device in channel_list:
interface_id = device["interface_id"]
interface = globals().get(f'interface{interface_id}')
for channel_name, channel_number in device["channels"].items():
psk_base64 = base64.b64encode(channel.settings.psk).decode('utf-8')
psk_base64 = "AQ==" # default PSK
print( f"Channel Name: {channel_name}, Channel Number: {channel_number}, PSK: {psk_base64}")
channel_hash = generate_hash(channel_name, psk_base64)
# add hash to the channel entry in channel_list under key 'hash'
for entry in channel_list:
@@ -510,7 +512,6 @@ def get_name_from_number(number, type='long', nodeInt=1):
name = str(decimal_to_hex(number)) # If name not found, use the ID as string
return name
def get_num_from_short_name(short_name, nodeInt=1):
interface = globals()[f'interface{nodeInt}']
# Get the node number from the short name, converting all to lowercase for comparison (good practice?)