19 lines
599 B
Python
19 lines
599 B
Python
import json
|
|
from getpass import getpass
|
|
|
|
print("Siwat Light Control Protocol Configuration Generator")
|
|
server = input("MQTT Server Hostname / IP Address : ")
|
|
username = ""
|
|
password = ""
|
|
while True:
|
|
use_auth = input("Does this server require username and password to login (yes/no) : ")
|
|
if use_auth.lower() == "yes":
|
|
username = input("Username : ")
|
|
password = getpass("Password : ")
|
|
break
|
|
elif use_auth.lower() == "no":
|
|
break
|
|
print("Please answer yes / no")
|
|
base_topic = input("MQTT Base Topic : ")
|
|
frame_time = input("Frame Time (1/refresh rate) : ")
|