mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-05 06:13:08 +01:00
Modifying 'LaMetric Time device handler and smart apps'
This commit is contained in:
@@ -753,7 +753,9 @@ def sendNotificationMessageToDevice(dni, data)
|
|||||||
body: data,
|
body: data,
|
||||||
headers: [
|
headers: [
|
||||||
HOST: "${localIp}:8080",
|
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([
|
sendHubCommand(new physicalgraph.device.HubAction([
|
||||||
method: "GET",
|
method: "GET",
|
||||||
path: localApiIndexPath,
|
path: localApiIndexPath,
|
||||||
query:[info:1,bluetooth:1,wifi:1,audio:1,display:1],
|
query:["fields": ["info","wifi", "volume", "bluetooth"]],
|
||||||
headers: [
|
headers: [
|
||||||
HOST: "${localIp}:8080",
|
HOST: "${localIp}:8080",
|
||||||
Authorization: "Basic ${"${localApiUser}:${apiKey}".bytes.encodeBase64()}"
|
Authorization: "Basic ${"${localApiUser}:${apiKey}".bytes.encodeBase64()}"
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ def getDefaultIconData() { """data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgA
|
|||||||
|
|
||||||
def mainPage() {
|
def mainPage() {
|
||||||
def iconRequestOptions = [headers: ["Accept": "application/json"],
|
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 icons = getIconsList();
|
||||||
def iconLabels = getIconLabels();
|
def iconLabels = getIconLabels();
|
||||||
|
|||||||
Reference in New Issue
Block a user