Commit 3b17f43c authored by Peter-Bernd Otte's avatar Peter-Bernd Otte

Deleted commented tests lines.

parent eee5eaa2
......@@ -7,7 +7,6 @@ from datetime import datetime
import paho.mqtt.client as paho
import json
from crcTable import *
#import random #for tests sending it twice
broker="localhost"
clientName = "enocean-eg"
......@@ -57,13 +56,6 @@ while (WatchDogCounter > 0):
t = datetime.now()
t = time.mktime(t.timetuple()) + t.microsecond / 1E6
client.publish("homie/"+clientName+"/enocean-messages", json.dumps({"type":pPaketType, "data":list(pData), "optData":list(pOptData), "time":t}), qos=1)
# senderlist = random.sample(['eg','og','ug'], k=round(random.uniform(1,3)) )
# for x in senderlist:
# t = datetime.now()
# t = time.mktime(t.timetuple()) + t.microsecond / 1E6
# client.publish("homie/enocean-"+x+"/enocean-messages", json.dumps({"type":pPaketType, "data":list(pData), "optData":list(pOptData), "time":t}), qos=1)
# time.sleep(random.uniform(0,0.05))
# pOptData[-2] += 5
else:
print("Data CRC NOT ok")
......@@ -76,4 +68,4 @@ while (WatchDogCounter > 0):
ser.close()
client.disconnect()
client.loop_stop()
client.loop_stop()
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment