Fixes writing, removes broken functions, adds services

This commit is contained in:
Patrick McDonagh
2017-05-11 17:26:42 -05:00
parent 435ad05ff5
commit fb3e708a74
7 changed files with 99 additions and 34 deletions

View File

@@ -211,7 +211,7 @@ def main():
now = time.time()
if (now - handshake_list[h]['last_store_time']) > handshake_list[h]['guarantee_sec']:
try:
write_to_plc(handshake_list[h]['ip_address'], handshake_list[h]['tag'], 1)
write_to_plc(str(handshake_list[h]['ip_address']), str(handshake_list[h]['tag']), 1)
handshake_list[h]['last_store_time'] = now
print("Handshake with {} - {} at {}".format(handshake_list[h]['ip_address'],
handshake_list[h]['tag'], now))