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

Commit e23c375

Browse files
authored
Merge pull request #1 from tonesto7/master
upgrade
2 parents f3cdd6d + 8559429 commit e23c375

File tree

11 files changed

+183
-166
lines changed

11 files changed

+183
-166
lines changed

Data/appConfig.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
"setupVersion": 2,
2121
"versions": {
2222
"app": {
23-
"ver": "5.6.0"
23+
"ver": "5.6.4"
2424
},
2525
"autoapp": {
2626
"ver": "5.5.0"
2727
},
2828
"thermostat": {
29-
"ver": "5.4.5"
29+
"ver": "5.4.6"
3030
},
3131
"protect": {
3232
"ver": "5.4.3"
3333
},
3434
"camera": {
35-
"ver": "5.4.4"
35+
"ver": "5.4.5"
3636
},
3737
"presence": {
3838
"ver": "5.4.4"
3939
},
4040
"weather": {
41-
"ver": "5.5.1"
41+
"ver": "5.5.2"
4242
},
4343
"stream": {
4444
"ver": "2.0.1"
@@ -52,6 +52,7 @@
5252
},
5353
"database": {
5454
"disableExceptions": true,
55+
"sendExceptions": false,
5556
"exceptionKey": "exceptions",
5657
"pullSettingFromFB": false,
5758
"metricsUrl": "https://nst-manager-metrics.firebaseio.com",
@@ -64,6 +65,9 @@
6465
"schedules": {
6566
"count": 8
6667
},
68+
"streaming": {
69+
"allowLocal": false
70+
},
6771
"healthcheck": {
6872
"camTimeout": 120,
6973
"protWireTimeout": 45,
@@ -78,9 +82,25 @@
7882
"stateVer": 3
7983
}
8084
},
85+
"other": {
86+
"active": 0,
87+
"items": [{
88+
"id": "OWQxMzJlODMtMTFmYy00NWJlLTlhOGQtOTViN2E3Y2IwN2Ew",
89+
"secret": "TERhSmU4dEFNdmRQR3lGUHQwSkpQMTY1eA=="
90+
},
91+
{
92+
"id": "MzFhZWE0NmMtNDA0OC00YzJiLWI2YmUtY2FjN2ZlMzA1ZDRj",
93+
"secret": "Rm1PNDY5R1hmZFNWam43UGhLbmpHV1psbQ=="
94+
},
95+
{
96+
"id": "NjNlOWJlZmEtZGM2Mi00YjczLWFhZjQtZGNmMzgyNmRkNzA0",
97+
"secret": "OGlxVDhYNDZ3YTJVWm5MMG9lM1RieU9hMA=="
98+
}
99+
]
100+
},
81101
"blacklists": {
82102
"clients": [],
83103
"metrics": [],
84104
"exceptions": []
85105
}
86-
}
106+
}

Data/appData.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"setupVersion": 2,
2525
"versions": {
2626
"app": {
27-
"ver": "5.6.0"
27+
"ver": "5.6.4"
2828
},
2929
"autoapp": {
3030
"ver": "5.5.0"
@@ -33,19 +33,19 @@
3333
"ver": "5.4.0"
3434
},
3535
"thermostat": {
36-
"ver": "5.4.5"
36+
"ver": "5.4.6"
3737
},
3838
"protect": {
3939
"ver": "5.4.3"
4040
},
4141
"camera": {
42-
"ver": "5.4.4"
42+
"ver": "5.4.5"
4343
},
4444
"presence": {
4545
"ver": "5.4.4"
4646
},
4747
"weather": {
48-
"ver": "5.5.1"
48+
"ver": "5.5.2"
4949
}
5050
},
5151
"allowInApp": false
@@ -98,4 +98,4 @@
9898
"enabled": false,
9999
"path": ""
100100
}
101-
}
101+
}

Data/changelog.txt

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
V5.6.4 (May 16th, 2019):
2+
▔▔▔▔▔▔▔▔▔▔▔
3+
Manager App:
4+
• Token Updates
5+
6+
V5.6.2 (April 9th, 2019):
7+
▔▔▔▔▔▔▔▔▔▔▔
8+
Manager App:
9+
• Adjust for more conservative nest throttling
10+
11+
V5.6.1 (March 29th, 2019):
12+
▔▔▔▔▔▔▔▔▔▔▔
13+
Manager App:
14+
• REMOVED: Local rest stream support (Until ST restores the feature)
15+
• UPDATED: Simplified exception report logic.
16+
117
V5.5.6 (November 14th, 2018):
218
▔▔▔▔▔▔▔▔▔▔▔
319
Manager App:
@@ -32,21 +48,3 @@ Manager App:
3248

3349
Automation App 5.4.3:
3450
• FIXED: Bug Fixes
35-
36-
V5.4.0 (August 10th, 2018):
37-
▔▔▔▔▔▔▔▔▔▔▔
38-
Manager App:
39-
• ADDED: Pushover Manager Integration
40-
41-
Automation App 5.4.0:
42-
• ADDED: Pushover Manager Integration
43-
44-
V5.3.9 (July 30th, 2018):
45-
▔▔▔▔▔▔▔▔▔▔▔
46-
Manager App:
47-
• ADDED: Camera Motion Zone Filtering (Requires Nest Aware and NST Streaming Service)
48-
• FIXED: Bug fixes and Code Cleanups/Optimizations
49-
50-
Automation App 5.3.6:
51-
• REMOVED: Support for Contact Book
52-

devicetypes/tonesto7/nest-camera.src/nest-camera.groovy

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contributors: Ben W. (@desertblade), Eric S. (@E_Sch)
55
* A Huge thanks goes out to Greg (@ghesp) for all of your help getting this working.
66
*
7-
* Copyright (C) 2017, 2018 Anthony S.
7+
* Copyright (C) 2017, 2018, 2019 Anthony S.
88
* Licensing Info: Located at https://raw.githubusercontent.com/tonesto7/nest-manager/master/LICENSE.md
99
*/
1010

@@ -13,7 +13,7 @@ import groovy.time.TimeCategory
1313

1414
preferences { }
1515

16-
def devVer() { return "5.4.4" }
16+
def devVer() { return "5.4.5" }
1717

1818
metadata {
1919
definition (name: "${textDevName()}", author: "Anthony S.", namespace: "tonesto7") {
@@ -325,7 +325,7 @@ def processEvent() {
325325
audioInputEnabledEvent(results?.is_audio_input_enabled?.toString())
326326
softwareVerEvent(results?.software_version?.toString())
327327
if(results?.activity_zones) { state?.activityZones = results?.activity_zones }
328-
328+
329329
//if(results?.snapshot_url) { state?.snapshot_url = results?.snapshot_url?.toString() }
330330
imageEvent(results?.snapshot_url?.toString())
331331
if(results?.app_url) { state?.app_url = results?.app_url?.toString() }
@@ -370,7 +370,7 @@ def getDeviceStateData() {
370370
}
371371

372372
def evtSnapShotOk() {
373-
if(state?.takeSnapOnEvt != true) { return false }
373+
if(!state?.isOnline || !state?.isStreaming || !state?.takeSnapOnEvt) { return false }
374374
return settings?.enableEvtSnapShot == false ? false : true
375375
}
376376

@@ -572,19 +572,19 @@ def lastEventDataEvent(data) {
572572
def curEndDt = device?.currentState("lastEventEnd")?.value ? tf?.format(Date.parse("E MMM dd HH:mm:ss z yyyy", device?.currentState("lastEventEnd")?.value?.toString())) : null
573573
def newStartDt = data?.start_time ? tf.format(Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", data?.start_time?.toString())) : "Not Available"
574574
def newEndDt = data?.end_time ? tf.format(Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", data?.end_time?.toString())) : "Not Available"
575-
575+
576576
def camMotionZones = state?.camMotionZones && state?.camMotionZones != [] ? state?.camMotionZones : []
577577

578-
def hasPerson = data?.has_person ? data?.has_person?.toBoolean() : false
579-
state?.motionPerson = hasPerson
580-
def hasMotion = data?.has_motion ? data?.has_motion?.toBoolean() : false
581-
def hasSound = data?.has_sound ? data?.has_sound?.toBoolean() : false
578+
def hasPerson = data?.has_person != null ? data?.has_person.toBoolean() : false
579+
state.motionPerson = hasPerson
580+
def hasMotion = data?.has_motion != null ? data?.has_motion.toBoolean() : false
581+
def hasSound = data?.has_sound != null ? data?.has_sound.toBoolean() : false
582582
def actZones = state?.activityZones
583583
def evtZoneIds = data?.activity_zone_ids
584584
def evtZoneNames = null
585585

586-
String evtType = !hasMotion ? "Sound Event" : "Motion Event${hasPerson ? " (Person)${hasSound ? " (Sound)" : ""}" : ""}"
587-
state?.lastEventTypeHtml = !hasMotion && hasSound ? "Sound Event" : "Motion Event${hasPerson ? "<br>(Person)${hasSound ? "<br>(Sound)" : ""}" : ""}"
586+
String evtType = (!hasMotion ? "Sound Event" : "Motion Event") + "${hasPerson ? " (Person)" : ""}" + "${hasSound ? " (Sound)" : ""}"
587+
state?.lastEventTypeHtml = (!hasMotion && hasSound ? "Sound Event" : "Motion Event") + "${hasPerson ? "<br>(Person)" : ""}" + "${hasSound ? "<br>(Sound)" : ""}"
588588
if(actZones && evtZoneIds) {
589589
evtZoneNames = actZones.findAll { it?.id?.toString() in evtZoneIds }.collect { it?.name }
590590
def zstr = ""
@@ -605,7 +605,9 @@ def lastEventDataEvent(data) {
605605

606606
def tryPic = false
607607

608-
if(!state?.lastCamEvtData || (curStartDt != newStartDt || curEndDt != newEndDt) && (hasPerson || hasMotion || hasSound) || isStateChange(device, "lastEventType", evtType?.toString()) || isStateChange(device, "lastEventZones", evtZoneNames?.toString())) {
608+
//if(!state?.lastCamEvtData || (curStartDt != newStartDt || curEndDt != newEndDt) || (hasPerson || hasMotion || hasSound) || isStateChange(device, "lastEventType", evtType?.toString()) || isStateChange(device, "lastEventZones", evtZoneNames?.toString())) {
609+
if(!state?.lastCamEvtData || (curStartDt != newStartDt || curEndDt != newEndDt) || isStateChange(device, "lastEventType", evtType?.toString()) || isStateChange(device, "lastEventZones", evtZoneNames?.toString())) {
610+
if(hasPerson || hasMotion || hasSound) {
609611
sendEvent(name: 'lastEventStart', value: newStartDt, descriptionText: "Last Event Start is ${newStartDt}", displayed: false)
610612
sendEvent(name: 'lastEventEnd', value: newEndDt, descriptionText: "Last Event End is ${newEndDt}", displayed: false)
611613
sendEvent(name: 'lastEventType', value: evtType, descriptionText: "Last Event Type was ${evtType}", displayed: false)
@@ -622,6 +624,7 @@ def lastEventDataEvent(data) {
622624
Logger("│ Type: ${evtType}")
623625
Logger(state?.enRemDiagLogging ? "┌───New Camera Event────" : "┌────────New Camera Event────────")
624626
addCheckinReason("lastEventData")
627+
}
625628
} else {
626629
LogAction("Last Event Start Time: (${newStartDt}) - Zones: ${evtZoneNames} | Original State: (${curStartDt})")
627630
LogAction("Last Event End Time: (${newEndDt}) - Zones: ${evtZoneNames} | Original State: (${curEndDt})")
@@ -658,7 +661,7 @@ def motionSoundEvtHandler(zoneOk=true) {
658661
}
659662

660663
void motionEvtHandler(data, zoneOk) {
661-
664+
662665
def curMotion = device.currentState("motion")?.stringValue
663666
def motionStat = "inactive"
664667
def motionPerStat = "inactive"
@@ -688,8 +691,8 @@ void motionEvtHandler(data, zoneOk) {
688691
// log.trace "motionEvtHandler(zoneOk: $zoneOk) | motionStat: $motionStat | curMotion: $curMotion"
689692
if(isStateChange(device, "motion", motionStat?.toString()) || isStateChange(device, "motionPerson", motionPerStat?.toString())) {
690693
Logger("UPDATED | Motion Sensor is: (${motionStat}) | Person: (${motionPerStat}) | Original State: (${curMotion})")
691-
sendEvent(name: "motion", value: motionStat, descriptionText: "Motion Sensor is: ${motionStat}", displayed: true, isStateChange: true, state: motionStat)
692-
sendEvent(name: "motionPerson", value: motionPerStat, descriptionText: "Motion Person is: ${motionPerStat}", displayed: true, isStateChange: true, state: motionPerStat)
694+
sendEvent(name: "motion", value: motionStat, descriptionText: "Motion Sensor is: ${motionStat}", displayed: true, /*isStateChange: true,*/ state: motionStat)
695+
sendEvent(name: "motionPerson", value: motionPerStat, descriptionText: "Motion Person is: ${motionPerStat}", displayed: true, /*isStateChange: true,*/ state: motionPerStat)
693696
addCheckinReason("motion")
694697
} else { LogAction("Motion Sensor is: (${motionStat}) | Original State: (${curMotion})") }
695698
}
@@ -732,13 +735,13 @@ def imageEvent(url) {
732735
clearUrl = false
733736
if(isStateChange(device, "image", url?.toString())) {
734737
LogAction("UPDATED | Image Url: (${url}) | Original State: (${curImage})")
735-
sendEvent(name: "image", value: url, descriptionText: "Image URL ${url}", displayed: false, isStateChange: true, state: url)
738+
sendEvent(name: "image", value: url, descriptionText: "Image URL ${url}", displayed: false, isStateChange: true, state: url)
736739
}
737740
}
738741
}
739742
if(clearUrl) {
740743
state.snapshot_url = null
741-
sendEvent(name: "image", value: "", descriptionText: "Image URL Cleared", displayed: false)
744+
sendEvent(name: "image", value: "", descriptionText: "Image URL Cleared", displayed: false)
742745
}
743746
}
744747

@@ -799,17 +802,17 @@ def videoQualityEvent() {
799802
Dropcam, Dropcam HD
800803
* Low: 30GB
801804
* Medium: 120GB
802-
805+
803806
Nest Hello Doorbell
804807
* Low: 50GB
805808
* Medium: 150GB
806809
* High: 300GB
807-
810+
808811
*/
809812
def vals = []
810813
camData?.each { item->
811814
log.debug "${item?.split(".")}"
812-
815+
813816
// if(t[2]?.isNumber()) {
814817
// vals.push(t[2] as Integer)
815818
// }
@@ -820,7 +823,7 @@ def videoQualityEvent() {
820823
def findCameraModel() {
821824
// if(!state?.camApiServerData) { return }
822825
// def camData = state?.camApiServerData?.items[0]?.capabilities?.findAll { it?.startsWith("streaming.cameraprofile") }
823-
826+
824827
}
825828

826829
def publicShareUrlEvent(url) {
@@ -844,7 +847,7 @@ def publicShareUrlEvent(url) {
844847
def camData
845848
def ldtSec = getTimeDiffSeconds(state?.lastGetCamApiServerData)
846849
if(state?.camUUID && (state?.camApiServerData == null || ldtSec > (180*60)) ) {
847-
camData = getCamApiServerData(state?.camUUID)
850+
camData = getCamApiServerData(state?.camUUID)
848851
}
849852
if(camData && state?.lastCamApiServerData != camData) {
850853
state?.lastCamApiServerData = camData

devicetypes/tonesto7/nest-presence.src/nest-presence.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Author: Anthony S. (@tonesto7)
44
* Co-Authors: Ben W. (@desertBlade), Eric S. (@E_Sch)
55
*
6-
* Copyright (C) 2017, 2018 Anthony S., Ben W.
6+
* Copyright (C) 2017, 2018, 2019 Anthony S., Ben W.
77
* Licensing Info: Located at https://raw.githubusercontent.com/tonesto7/nest-manager/master/LICENSE.md
88
*/
99

devicetypes/tonesto7/nest-protect.src/nest-protect.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Author: Anthony S. (@tonesto7)
44
* Co-Authors: Ben W. (@desertblade), Eric S. (@E_Sch)
55
*
6-
* Copyright (C) 2017, 2018 Anthony S.
6+
* Copyright (C) 2017, 2018, 2019 Anthony S.
77
* Licensing Info: Located at https://raw.githubusercontent.com/tonesto7/nest-manager/master/LICENSE.md
88
*/
99

0 commit comments

Comments
 (0)