-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes
More file actions
63 lines (45 loc) · 2.67 KB
/
Notes
File metadata and controls
63 lines (45 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Main:
Sets up the GPIO for an emergency button to turn the lights on when your phone is dead
Defines the worker and picontrol function that are used in the threads.
config:
Set up all your lights and rooms in this file. Format example is in the file(sort of)
--------------------------------------------------------------------------------------------------
Classes:
LED.py:
GenericLed:
all functions that every ledstrip/light should and can accept.
Arduino:
all functions to write to and read from arduino.
Input is name and device location(ttyUSB0)
APA102:
handler for apa102 light strips.
input is name and amount of pixels
Alarm.py:
Alarm:
This class handles an alarm and will start a sunrise sequence standard 15 min before
setupAlarm:
Function used to set up the alarm, is called from the WebHandle.
data.py:
Room:
Class to hold data. A room has the capability to store all values from it's sensors and to create plots from this data.
Outdated! Plots are stored automatically in the ./Website/static folder with the name of the room.(Plots are now set up in the api endpoint and created in javascript with plotly.
Database.py:
DataBase:
Simple wrapper for the sqlite3 library. Also supports writing to the same DB from multiple threads(believed to be safe in combination with thread.lock)
Error.py:
Custom database wrapper to store all errors that happend when running the program. Hopefully not used that much.
Alarm.py:
Class to handle all the alarms that could be set. For now it's defaulting to the livingroom, but that is to be changed when neccesary.
RitRegistration.py:
Class that handles the registration of the mileage of my car. This also gives all the data back to the api.
--------------------------------------------------------------------------------------------------
Website:
Uses this for colorpicker on the website: http://jscolor.com/examples/
Requires all inputs to be in the form of JSON via a POST request to the correct url.
/rooms/graphData: returns a list with dicts for the graphs that should come on the website. The graph will be rendered in JavaScript with plotly.
--------------------------------------------------------------------------------------------------
Function Sets:
RF433MHZ/RF433MHZ.py:
Functions to hopefully send data to arduino via 433mhz modules.
sendToArduino(Address, Color_RGB, Attempts):
Handles the sending of the color to the given address, retries 'Attempts' times