with some html js css help from superchupu (THANKS!!!)
WELCOME TO THE API FOR CONTROLLIUBG MY LIFE
How does it wor?????k
Ok so basically it works like this
the token is not what you think it is
Endpoints
GET /lights
gets all lights lik uhh gets the lights all of them
example output:
[
{
"id": "ceilingLights",
"active": false
},
{
"id": "shelfLight",
"active": false
}
]
GET /lights/:id
gets any light you want simply specify id like this: /lights/ceilingLights /lights/shelfLight
those are th only ones 😢...for now 😈😈😈
uhh example output:
{
"id": "ceilingLights",
"active": false
}
PATCH /lights/:id
sets any light you want simply specif the id like this.::: /lights/ceilingLights AND THEN....and also since this is patch requets you must supply a jason ---example: { "active": false }
so uhh you might be wondering what it returns ??like wtf does bro return
well bro i got an answer! example output:
{
"id": "ceilingLights",
"active": false
}
yeh...bro just returns the light object just like GET /lights/:id kinda unoriginal
GET /ac
gets ac info about m room 😂😂😂😂😂😂
example output:
{
"roomTemp": 24.38,
"setTemp": 23,
"fanSpeed": 0,
"active": false
}
fanSpeed can be 0, 1, 2, or 3 (auto, slow, mid, high)!!!!!
roomtemp is probably not inaccurate (MAYBE), i typically have just a vest on during the summe
/r so 25-24 degrees is pretty comfortable
Do you like it?
PATCH /ac
this one is pretty minted im very proud of it
ok so uhh..you gotta supplu a jason that can contain ANY of the following !!! depends on what you want to change::
"setTemp" (INTEGE R BETWEEN 20 AND 25)!!!
"fanSpeed" (INTEG ER THATS 0 1 2 OR 3 FOR AUTO SLOW MID HIGH......)
"active" (BOOLEAN ####)
DONT EVEN THINK ABOUT USING ANYTHINBG ELSE for the FAN SPEED LIKE 4 OR 5 OR SOMETHING...IT WILL FAIL XDD
HERE IS ARE SOME EXAMPL!!! JSONS REQUESTS YOU CAN MAKE { "setTemp": 23, "active": true } <--- THIS GUY SETS THE TEMP TO 23 AND TURNS THE AC ON { "setTemp": 24, "fanSpeed": 1 } <--- THIS GUY SETS THE TEMP TO 24 AND FAN SPEED TO SLOW, DOESN'T TURN AC ON OR OFF { "fanSpeed": 0 } <--- THIS GUY SETS THE FAN SPEED TO AUTO, DOESN'T DO ANYTHIG ELSE { } <--- THIS GUY DOES FUCKALL OH ALSO uhhhh,,,;;;İÜİ; the server is kinda silly like the interra system if i send all the requests at once
so i spaced out the request each json key makes
by 300ms...basically this patch request will take longer if you change more (BUT IT IS OK IT'S NOT THAT LONG)
as for what the server returns......................
{
"roomTemp": 23.66,
"setTemp": 24,
"fanSpeed": 0,
"active": false
}
yeah bro just returns an ac object just like GET /ac
GET /restart
this guy restarts the tcp connection so if the api breaks request this in your browser or something
also let me know so i can go check the logs
Thanks for watching!
dont share this with anyone unless i let you..PLEASE!!! (not that they would be able to use it.....
unless you give them the token in which case kill youself 😂😂😂😂😂)