Add printer to mqtt
This commit is contained in:
parent
1dd5117e1f
commit
3d14ba3dd6
|
@ -17,6 +17,7 @@ def on_connect(client, userdata, flags, rc):
|
||||||
|
|
||||||
# The callback for when a PUBLISH message is received from the server.
|
# The callback for when a PUBLISH message is received from the server.
|
||||||
def on_message(client, userdata, msg):
|
def on_message(client, userdata, msg):
|
||||||
|
print("Print")
|
||||||
with open("printer/locations.txt") as locations:
|
with open("printer/locations.txt") as locations:
|
||||||
lines = locations.read().splitlines()
|
lines = locations.read().splitlines()
|
||||||
location = random.choice(lines)
|
location = random.choice(lines)
|
||||||
|
|
Loading…
Reference in New Issue