24 lines
417 B
Python
24 lines
417 B
Python
import ub_devices
|
|
import ub_sched
|
|
from conf_room_layout import render_display
|
|
from time import sleep
|
|
|
|
sleep(2)
|
|
print("Main script!")
|
|
|
|
sleep(1)
|
|
print("Connecting to wifi")
|
|
ub_devices.connect()
|
|
|
|
room = ub_sched.RoomSchedule(ub_sched.ROOM_CAPEN_212A)
|
|
|
|
while True:
|
|
try:
|
|
print("Fetching events")
|
|
events = room.fetch()
|
|
render_display(events)
|
|
sleep(600)
|
|
except Exception as e:
|
|
print(e)
|
|
sleep(30)
|