python: Add 17 second delay and set 64 second delay to 24 seconds

This commit is contained in:
Daniel 2019-10-03 22:02:27 +03:00
parent c2efa20af7
commit 6c01c81e20
2 changed files with 4 additions and 2 deletions

View File

@ -14,13 +14,15 @@ coffee_machine_ip = '10.10.42.42'
password = '1234'
password_prompt = 'Password: '
time.sleep(17)
con = telnetlib.Telnet(coffee_machine_ip)
con.read_until(password_prompt)
con.write(password + "\n")
# Make some coffee!
con.write("sys brew\n")
time.sleep(64)
time.sleep(24)
# love the smell!
con.write("sys pour\n")

View File

@ -24,7 +24,7 @@ def main():
conn.write(COFFEE_MACHINE_PASS)
conn.write('sys brew')
time.sleep(64)
time.sleep(24)
conn.write('sys pour')
conn.close()