updated tankalarms
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
{
|
||||
|
||||
"driverFileName":"mainMeshify.py",
|
||||
"deviceName":"mainMeshify",
|
||||
"driverId":"0000",
|
||||
"releaseVersion":"16",
|
||||
"files": {
|
||||
"file1":"mainMeshify.py",
|
||||
"file2":"main.py",
|
||||
"file3":"device_base.py",
|
||||
"file4":"meshifyData.py"
|
||||
"driverFileName": "mainMeshify.py",
|
||||
"deviceName": "mainMeshify",
|
||||
"driverId": "0000",
|
||||
"releaseVersion": "17",
|
||||
"files": {
|
||||
"file1": "mainMeshify.py",
|
||||
"file2": "main.py",
|
||||
"file3": "device_base.py",
|
||||
"file4": "meshifyData.py"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -143,6 +143,11 @@ class deviceBase():
|
||||
topic = 'v1/devices/me/telemetry'
|
||||
print(topic, payload)
|
||||
self.q.put([topic, payload, 0])
|
||||
|
||||
def sendToTBAttributes(self, payload):
|
||||
topic = 'v1/devices/me/attributes'
|
||||
print(topic, payload)
|
||||
self.q.put([topic, payload, 0])
|
||||
|
||||
def sendtodbCH(self, ch, channel, value, timestamp):
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class main():
|
||||
self.dst = ""
|
||||
# queue for sets to the mesh network will handeled through a queue in this main driver
|
||||
self.meshQ = Queue.Queue()
|
||||
version = "16" # 6 - mistification # 5 - updated for SAT data and generic sets. 4 - devices changed to drivers for dia
|
||||
version = "17" # 6 - mistification # 5 - updated for SAT data and generic sets. 4 - devices changed to drivers for dia
|
||||
|
||||
# self.sendtodb("version", version, 0)
|
||||
thread.start_new_thread(self.registerThread, ())
|
||||
@@ -1171,10 +1171,11 @@ class meshifyMain():
|
||||
print("error understanding the mqtt message")
|
||||
|
||||
def on_message(self, mosq, obj, msg):
|
||||
print("!!!!!!! ON MESSAGE !!!!!!!")
|
||||
print(msg.topic)
|
||||
print(msg.payload)
|
||||
|
||||
try:
|
||||
print("!!!!!!! ON MESSAGE !!!!!!!")
|
||||
print(msg.topic)
|
||||
print(msg.payload)
|
||||
if "rpc" in msg.topic:
|
||||
payload = {}
|
||||
payload["msgId"] = msg.topic.split("/")[-1]
|
||||
|
||||
@@ -27,7 +27,7 @@ class start(threading.Thread):
|
||||
print self.deviceName
|
||||
mac2 = mac.replace(":", "")
|
||||
self.mac = mac2.upper()
|
||||
self.version = "16" #mistification #added Nodes in v5
|
||||
self.version = "17" #mistification #added Nodes in v5
|
||||
self.finished = threading.Event()
|
||||
|
||||
threading.Thread.start(self)
|
||||
|
||||
Reference in New Issue
Block a user