Fixes multiple flowmeter devices error, adds sleep log to sidebar, increments version to 5

This commit is contained in:
Patrick McDonagh
2017-02-22 15:29:23 -06:00
parent 42afcda071
commit 6ca7d16132
3 changed files with 5 additions and 4 deletions

1
Sidebar.html Normal file
View File

@@ -0,0 +1 @@
<a href="#" data-channelId="<%= channels['abbflow.sleeplog'].channelId %>" class="data-table" title="Sleep Log"><i style='margin-left: 0.5em; cursor: pointer' class="fa fa-th-list icon-theme"></i> Sleep Log</a>

View File

@@ -14,7 +14,7 @@ class start(threading.Thread, deviceBase):
mqtt=mqtt, Nodes=Nodes)
self.daemon = True
self.version = "4"
self.version = "5"
self.finished = threading.Event()
threading.Thread.start(self)
self.sleep_minutes = 20
@@ -26,9 +26,9 @@ class start(threading.Thread, deviceBase):
self.channels["status"]["last_value"] = ""
def run(self):
self.sendtodb('sleeplog', "I'm awake!", 0)
self.sendtodbDev("01", 'sleeplog', "I'm awake!", 0, "abbflow")
while (True):
t = datetime.now()
if (t.minute == 10 or t.minute == 40):
self.sendtodb('sleeplog', "Going to sleep...", 0)
self.sendtodbDev("01", 'sleeplog', "Going to sleep...", 0, "abbflow")
self.mcu.sleep(self.sleep_minutes * 60)

View File

@@ -3,7 +3,7 @@
"driverFileName":"abbflow.py",
"deviceName":"abbflow",
"driverId":"0110",
"releaseVersion":"4",
"releaseVersion":"5",
"files": {
"file1":"abbflow.py",
"file2":"modbusMap.p" }