Add doorduino messages
This commit is contained in:
parent
cc7184e453
commit
a1a197c7ee
1 changed files with 7 additions and 0 deletions
|
@ -89,6 +89,9 @@ async def np(ctx):
|
||||||
async def run_events(mqtt_host):
|
async def run_events(mqtt_host):
|
||||||
retained = {
|
retained = {
|
||||||
"bitlair/alarm",
|
"bitlair/alarm",
|
||||||
|
"bitlair/doorduino/doorbell",
|
||||||
|
"bitlair/doorduino/dooropen", # Unused. Payload is 0|1 like the doorbell.
|
||||||
|
"bitlair/doorduino/lockstate",
|
||||||
"bitlair/photos",
|
"bitlair/photos",
|
||||||
"bitlair/state",
|
"bitlair/state",
|
||||||
"bitlair/state/djo",
|
"bitlair/state/djo",
|
||||||
|
@ -110,6 +113,10 @@ async def run_events(mqtt_host):
|
||||||
yield f"Bitlair is now {payload.upper()}"
|
yield f"Bitlair is now {payload.upper()}"
|
||||||
elif msg.topic.matches("bitlair/state/djo"):
|
elif msg.topic.matches("bitlair/state/djo"):
|
||||||
yield f"DJO is now {payload.upper()}"
|
yield f"DJO is now {payload.upper()}"
|
||||||
|
elif msg.topic.matches("bitlair/doorduino/lockstate"):
|
||||||
|
yield f"Doorduino: lockstate {payload.upper()}"
|
||||||
|
elif msg.topic.matches("bitlair/doorduino/doorbell") and payload == "1":
|
||||||
|
yield "DEURBEL! Open de deur beneden!"
|
||||||
elif msg.topic.matches("bitlair/photos"):
|
elif msg.topic.matches("bitlair/photos"):
|
||||||
embed = DiscordEmbed(title="WIP Cam", color="fc5d1d")
|
embed = DiscordEmbed(title="WIP Cam", color="fc5d1d")
|
||||||
embed.set_url(f"https://bitlair.nl/fotos/view/{payload}")
|
embed.set_url(f"https://bitlair.nl/fotos/view/{payload}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue