mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-09 05:11:52 +00:00
Modifying 'LaMetric Time device handler and smart apps'
This commit is contained in:
@@ -753,7 +753,9 @@ def sendNotificationMessageToDevice(dni, data)
|
||||
body: data,
|
||||
headers: [
|
||||
HOST: "${localIp}:8080",
|
||||
Authorization: "Basic ${"${localApiUser}:${apiKey}".bytes.encodeBase64()}"
|
||||
Authorization: "Basic ${"${localApiUser}:${apiKey}".bytes.encodeBase64()}",
|
||||
"Content-type":"application/json",
|
||||
"Accept":"application/json"
|
||||
]]))
|
||||
}
|
||||
}
|
||||
@@ -766,7 +768,7 @@ def getAllInfoFromDevice(localIp, apiKey)
|
||||
sendHubCommand(new physicalgraph.device.HubAction([
|
||||
method: "GET",
|
||||
path: localApiIndexPath,
|
||||
query:[info:1,bluetooth:1,wifi:1,audio:1,display:1],
|
||||
query:["fields": ["info","wifi", "volume", "bluetooth"]],
|
||||
headers: [
|
||||
HOST: "${localIp}:8080",
|
||||
Authorization: "Basic ${"${localApiUser}:${apiKey}".bytes.encodeBase64()}"
|
||||
|
||||
@@ -124,7 +124,7 @@ def getDefaultIconData() { """data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgA
|
||||
|
||||
def mainPage() {
|
||||
def iconRequestOptions = [headers: ["Accept": "application/json"],
|
||||
uri: "${lametricHost}/api/v2/icons", query:["fields":"id,title,type,code"]];
|
||||
uri: "${lametricHost}/api/v2/icons", query:["fields":"id,title,type,code", "order":"title"]]
|
||||
|
||||
def icons = getIconsList();
|
||||
def iconLabels = getIconLabels();
|
||||
|
||||
Reference in New Issue
Block a user