We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cefe01a commit 1b3aeebCopy full SHA for 1b3aeeb
src/cli_components/ifconfig.py
@@ -2,7 +2,6 @@
2
from rich import print as rprint
3
import socket
4
import streamlit as st
5
-from pathlib import Path
6
from threading import Lock
7
8
@@ -78,12 +77,8 @@ def find_pi_address():
78
77
"""Try use direct IP connection to find the Raspberry Pi's address"""
79
try:
80
rprint("[yellow]Trying direct IP connection...[/yellow]")
81
- # Read IP from file instead of hardcoding
82
- ip_file = Path("/var/tmp/wx/last_ip.txt")
83
- if ip_file.exists():
84
- address = ip_file.read_text().strip()
85
- else:
86
- return None
+ # Get IP from Streamlit secrets instead of file
+ address = st.secrets["weatherstation"]["ip"]
87
88
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
89
sock.settimeout(2)
0 commit comments