Command to show the current temperature @ hive13
pvince opened this issue · comments
DoorSwitch code was updated to push the current Hive13 temperature to the same database as the doorEvents. Sample SQL Query:
SELECT * FROM tempEvents ORDER BY dtEventDate DESC LIMIT 1;
+----------------+---------------------+--------+------------+
| pk_TempEventID | dtEventDate | dcTemp | vcLocation |
+----------------+---------------------+--------+------------+
| 542 | 2012-05-27 13:45:02 | 77.00 | DoorSwitch |
+----------------+---------------------+--------+------------+
The bot could do a couple of things, a simple command, "!H13Temp" could display the last temperature, we could also possibly do something interesting like show the average temperature for the last X amount of time (maybe hour or so?), maybe show trend? (Find the trend of the last X data points to say if the temperature is rising or falling.
We could add an alert (Bot watches the temperature, if it goes over X degrees it yells at the channel that the hive is getting hot).
Implemented as of 6/25/2012:
10:56 @Paul_Hive13 !temp
10:57 @Hive13Bot Hackerspace: 71.0 -- Outdoors: 82.2