diff --git a/MyNeurioAppliance.devicetype.groovy b/MyNeurioAppliance.devicetype.groovy index 35b3688..db449ba 100644 --- a/MyNeurioAppliance.devicetype.groovy +++ b/MyNeurioAppliance.devicetype.groovy @@ -4,7 +4,7 @@ * Copyright 2015 Yves Racine * linkedIn profile: ca.linkedin.com/pub/yves-racine-m-sc-a/0/406/4b/ * Refer to readme file for installation instructions. - * V1.0 + * V1.1 * * Code: https://github.com/yracine/device-type.myneurio * @@ -503,8 +503,8 @@ void generateApplianceAllStats(applianceId) { String nowInLocalTime = new Date().format("yyyy-MM-dd HH:mm", location.timeZone) if (settings.trace) { - log.debug("generateApplianceAllStats>yesterday: local date/time= ${nowInLocalTime}, startDate in UTC = ${String.format('%tF %yesterday: startDate in UTC =${startDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}" + + ",endDate in UTC =${endDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}") } generateApplianceStats("",startDate,endDate,"days",null) Long totalConsInPeriod = device.currentValue("consTotalInPeriod")?.toLong() @@ -517,8 +517,8 @@ void generateApplianceAllStats(applianceId) { startDate = (endDate -1) if (settings.trace) { - log.debug("generateApplianceAllStats>2 days ago: startDate in UTC = ${String.format('%tF %2 days ago: startDate in UTC =${startDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}" + + ",endDate in UTC =${endDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}") } generateApplianceStats("",startDate,endDate,"days",null) totalConsInPeriod = device.currentValue("consTotalInPeriod")?.toLong() @@ -531,8 +531,8 @@ void generateApplianceAllStats(applianceId) { startDate = (endDate -7) if (settings.trace) { - log.debug("generateApplianceAllStats>past week (last 7 days): startDate in UTC = ${String.format('%tF %past week: startDate in UTC =${startDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}" + + ",endDate in UTC =${endDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}") } generateApplianceStats("",startDate,endDate,"weeks",null) totalConsInPeriod = device.currentValue("consTotalInPeriod")?.toLong() @@ -546,8 +546,8 @@ void generateApplianceAllStats(applianceId) { startDate = (endDate -7) if (settings.trace) { - log.debug("generateApplianceAllStats>2 weeks ago: startDate in UTC = ${String.format('%tF %2 weeks ago: startDate in UTC =${startDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}" + + ",endDate in UTC =${endDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}") } generateApplianceStats("",startDate,endDate,"weeks",null) totalConsInPeriod = device.currentValue("consTotalInPeriod")?.toLong() @@ -562,8 +562,8 @@ void generateApplianceAllStats(applianceId) { Date oneMonthAgo = oneMonthAgoCal.getTime() if (settings.trace) { - log.debug("generateApplianceAllStats>past month: startDate in UTC = ${String.format('%tF %past month: startDate in UTC =${startDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}" + + ",endDate in UTC =${endDate.format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))}") } generateApplianceStats("",startDate,endDate,"months",null) totalConsInPeriod = device.currentValue("consTotalInPeriod")?.toLong()