parent
7892ec7ead
commit
7afb5b55b3
@ -1,2 +1,2 @@ |
||||
config.json |
||||
config.py |
||||
lib/__pycache__/ |
||||
|
Binary file not shown.
@ -1,4 +0,0 @@ |
||||
{ |
||||
"username": "YOUR USERNAME HERE", |
||||
"address": "IP ADDRESS FOR THE HUE BRIDGE" |
||||
} |
@ -0,0 +1,2 @@ |
||||
address = "" |
||||
username = "" |
@ -0,0 +1,15 @@ |
||||
import requests as req # Used for HTTP requests for the Hue API |
||||
import json # API uses JSON |
||||
import config # Configuration for the controller |
||||
|
||||
def genUrl(params: str): |
||||
return "https://" + config.address + "/api/" + config.username + params |
||||
|
||||
def API_Request(ReqType: str, params: str): |
||||
apiReq = req.Request( ReqType, genUrl(params) ) |
||||
|
||||
apiReqPrep = apiReq.prepare() |
||||
apiSession = req.Session() |
||||
apiSession.send(apiReqPrep) |
||||
|
||||
|
@ -1,8 +1,9 @@ |
||||
#!/usr/bin/env python |
||||
|
||||
import requests as req # Used for HTTP requests for the Hue API |
||||
|
||||
from lib.input import * # Commandline parser |
||||
|
||||
import hue_controller # Actual controller |
||||
|
||||
def init(): |
||||
|
||||
|
||||
init() |
Loading…
Reference in new issue