Skip to content
Snippets Groups Projects
Commit 929a345a authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Fix some errors with websocket endpoints, hardcode IPs

parent f73c5a5e
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@ logger.setLevel(logging.INFO)
# Connect to projctl and ahm via network, other connections are GPIO, see README
system = mediactl.System(
projector_address="http://projctl.mediahell.hfbk.net",
ahm_address="ahm16-m.mediahell.hfbk.net",
projector_address="http://172.20.2.60", # "http://projctl.mediahell.hfbk.net",
ahm_address="172.20.2.61", # "ahm16-m.mediahell.hfbk.net",
logger=logger,
)
......@@ -256,7 +256,7 @@ async def handle_incoming_messages(data):
f"Received switch-video command with missing field: {e}"
)
return (None, False)
return (system.switch_media_source(number), False)
return (await system.switch_media_source(number), False)
# PROJECTOR
case "projector-power-off":
return (await system.projector.power_off(), False)
......@@ -270,14 +270,14 @@ async def handle_incoming_messages(data):
result = await system.projector.testpattern_show()
logger.info(repr(result))
return (
{"command": "projector-testpattern-on", "ok": result["result"]},
{"command": "projector-testpattern-on", "ok": result.is_ok()},
True,
)
case "projector-testpattern-off":
result = await system.projector.testpattern_off()
logger.info(repr(result))
return (
{"command": "projector-testpattern-off", "ok": result["result"]},
{"command": "projector-testpattern-off", "ok": result.is_ok()},
True,
)
# Screen commands
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment