Fixes multiple flowmeter devices error, adds sleep log to sidebar, increments version to 5
This commit is contained in:
1
Sidebar.html
Normal file
1
Sidebar.html
Normal 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>
|
||||||
@@ -14,7 +14,7 @@ class start(threading.Thread, deviceBase):
|
|||||||
mqtt=mqtt, Nodes=Nodes)
|
mqtt=mqtt, Nodes=Nodes)
|
||||||
|
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.version = "4"
|
self.version = "5"
|
||||||
self.finished = threading.Event()
|
self.finished = threading.Event()
|
||||||
threading.Thread.start(self)
|
threading.Thread.start(self)
|
||||||
self.sleep_minutes = 20
|
self.sleep_minutes = 20
|
||||||
@@ -26,9 +26,9 @@ class start(threading.Thread, deviceBase):
|
|||||||
self.channels["status"]["last_value"] = ""
|
self.channels["status"]["last_value"] = ""
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.sendtodb('sleeplog', "I'm awake!", 0)
|
self.sendtodbDev("01", 'sleeplog', "I'm awake!", 0, "abbflow")
|
||||||
while (True):
|
while (True):
|
||||||
t = datetime.now()
|
t = datetime.now()
|
||||||
if (t.minute == 10 or t.minute == 40):
|
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)
|
self.mcu.sleep(self.sleep_minutes * 60)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"driverFileName":"abbflow.py",
|
"driverFileName":"abbflow.py",
|
||||||
"deviceName":"abbflow",
|
"deviceName":"abbflow",
|
||||||
"driverId":"0110",
|
"driverId":"0110",
|
||||||
"releaseVersion":"4",
|
"releaseVersion":"5",
|
||||||
"files": {
|
"files": {
|
||||||
"file1":"abbflow.py",
|
"file1":"abbflow.py",
|
||||||
"file2":"modbusMap.p" }
|
"file2":"modbusMap.p" }
|
||||||
|
|||||||
Reference in New Issue
Block a user