Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 8559429

Browse files
committed
Merge tag 'v5.6.4'
2 parents 6136a94 + e7ae126 commit 8559429

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

Data/appConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@
103103
"metrics": [],
104104
"exceptions": []
105105
}
106-
}
106+
}

Data/appData.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"setupVersion": 2,
2525
"versions": {
2626
"app": {
27-
"ver": "5.6.3"
27+
"ver": "5.6.4"
2828
},
2929
"autoapp": {
3030
"ver": "5.5.0"
@@ -98,4 +98,4 @@
9898
"enabled": false,
9999
"path": ""
100100
}
101-
}
101+
}

Data/changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
V5.6.4 (May 16th, 2019):
2+
▔▔▔▔▔▔▔▔▔▔▔
3+
Manager App:
4+
• Token Updates
5+
16
V5.6.2 (April 9th, 2019):
27
▔▔▔▔▔▔▔▔▔▔▔
38
Manager App:

installerManifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"iconUrl": "https://raw.githubusercontent.com/tonesto7/nest-manager/master/Images/App/nst_manager_5.png",
2929
"published": true,
3030
"oAuth": true,
31-
"version": "5.6.3",
31+
"version": "5.6.4",
3232
"appSettings": {
3333
"clientId": "",
3434
"clientSecret": "",
@@ -88,4 +88,4 @@
8888
"optional": true
8989
}
9090
]
91-
}
91+
}

smartapps/tonesto7/nest-manager.src/nest-manager.groovy

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ definition(
3434
appSetting "devOpt"
3535
}
3636

37-
def appVersion() { "5.6.3" }
38-
def appVerDate() { "05-03-2019" }
37+
def appVersion() { "5.6.4" }
38+
def appVerDate() { "05-16-2019" }
3939
def minVersions() {
4040
return [
4141
"automation":["val":550, "desc":"5.5.0"],
@@ -6403,7 +6403,7 @@ private broadcastCheck() {
64036403
LogTrace("broadcastCheck")
64046404
Map bCastData = atomicState?.appData?.broadcast
64056405
if(atomicState?.isInstalled && bCastData) {
6406-
if(bCastData?.msgId != "" && bCastData?.message != "" && atomicState?.lastBroadcastId != bCastData?.msgId && (bCastData?.minVer == "" || bCastData?.minVer != appVersion())) {
6406+
if(bCastData?.msgId != "" && bCastData?.message != "" && atomicState?.lastBroadcastId && atomicState?.lastBroadcastId != bCastData?.msgId && (bCastData?.minVer == "" || bCastData?.minVer != appVersion())) {
64076407
if(sendMsg(strCapitalize(bCastData?.type), bCastData?.message.toString(), true, null, null, null, true)) {
64086408
atomicState?.lastBroadcastId = bCastData?.msgId
64096409
}
@@ -7555,25 +7555,36 @@ def toQueryString(Map m) {
75557555
return m.collect { k, v -> "${k}=${URLEncoder.encode(v.toString())}" }.sort().join("&")
75567556
}
75577557

7558-
def clientId() {
7558+
Map devClientData() {
7559+
if(!atomicState?.appData?.other) { updateWebStuff(true) }
7560+
Map m = atomicState?.appData?.other ?: [:]
7561+
// log.debug "m: ${m}"
7562+
def clt = m?.active ?: 0
7563+
def id = m?.items[clt]?.id?.decodeBase64()
7564+
def secret = m?.items[clt]?.secret?.decodeBase64()
7565+
return [id: new String(id), secret: new String(secret)]
7566+
}
7567+
7568+
//These are the Nest OAUTH Methods to aquire the auth code and then Access Token.
7569+
String clientId() {
75597570
if(appSettings?.clientId && appSettings?.clientId != "blank") {
75607571
return appSettings?.clientId?.toString().trim()
75617572
} else {
7562-
if(atomicState?.appData?.token?.id) {
7563-
return atomicState?.appData?.token?.id
7573+
if(devClientData()) {
7574+
return devClientData()?.id ?: null//Developer ID
75647575
} else {
75657576
LogAction("clientId is missing and is required to generate your Nest Auth token. Please verify you are running the latest software version", "error", true)
75667577
}
75677578
return null
75687579
}
75697580
}
75707581

7571-
def clientSecret() {
7582+
String clientSecret() {
75727583
if(appSettings?.clientSecret && appSettings?.clientSecret != "blank") {
75737584
return appSettings?.clientSecret?.toString().trim()
75747585
} else {
7575-
if(atomicState?.appData?.token?.secret) {
7576-
return atomicState?.appData?.token?.secret
7586+
if(devClientData()) {
7587+
return devClientData()?.secret ?: null//Developer Secret
75777588
} else {
75787589
LogAction("clientSecret is missing and is required to generate your Nest Auth token. Please verify you are running the latest software version", "error", true)
75797590
}
@@ -7582,6 +7593,8 @@ def clientSecret() {
75827593
}
75837594

75847595
def nestDevAccountCheckOk() {
7596+
// log.debug "clientId: ${clientId()}"
7597+
// log.debug "clientSecret: ${clientSecret()}"
75857598
if(atomicState?.authToken == null && (clientId() == null || clientSecret() == null) ) { return false }
75867599
else { return true }
75877600
}

0 commit comments

Comments
 (0)