Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions MyQ.ServiceManager.SmartApp.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ private getDoorList() {
apiGet("/api/v4/userdevicedetails/get", []) { response ->
if (response.status == 200) {
response.data.Devices.each { device ->
// 2 = garage door, 5 = gate, 7 = MyQGarage(no gateway)
if (device.MyQDeviceTypeId == 2||device.MyQDeviceTypeId == 5||device.MyQDeviceTypeId == 7) {
// 2 = garage door, 5 = gate, 7 = MyQGarage(no gateway)
if (device.MyQDeviceTypeId == 2||device.MyQDeviceTypeId == 5||device.MyQDeviceTypeId == 7||device.MyQDeviceTypeId == 17) {
def dni = [ app.id, "GarageDoorOpener", device.MyQDeviceId ].join('|')
device.Attributes.each {
if (it.AttributeDisplayName=="desc") deviceList[dni] = it.Value
Expand Down Expand Up @@ -240,23 +240,10 @@ private getDeviceList() {
/* api connection */
// get URL
private getApiURL() {
def troubleshoot = "false"
if (settings.troubleshoot == "true") {
if (!(state.troubleshoot)) state.troubleshoot = now() + 3600000
troubleshoot = (state.troubleshoot > now()) ? "true" : "false"
}
if (settings.brand == "Craftsman") {
if (troubleshoot == "true") {
return "https://craftexternal-myqdevice-com-a488dujmhryx.runscope.net"
} else {
return "https://craftexternal.myqdevice.com"
}
return "https://craftexternal-myqdevice-com-gqj9w4lp1pc9.runscope.net"
} else {
if (troubleshoot == "true") {
return "https://myqexternal-myqdevice-com-a488dujmhryx.runscope.net"
} else {
return "https://myqexternal.myqdevice.com"
}
return "https://myqexternal-myqdevice-com-gqj9w4lp1pc9.runscope.net"
}
}

Expand Down