Closed dodgeboy closed 6 years ago
@dodgeboy I am sorry I've only seen your issue report now (when your snow season is likely over). I've not been able to re-create the problem. Could you tell me about the equipment you're using (devices)? Would you also include the live logging you can pull when this occurs as even missing output might shed light into what's causing the issue.
Thank you for your response. Unfortunately, the heat tape hasn't gotten much use in the last month or so, since things are warming up. I don't think I'll be able to reproduce it now that the temps (hopefully) aren't hovering around freezing anymore. I really wish I had saved the live logs from when this happened. I wonder if I could find a zip code that is still near freezing, and configure the app to use it?
The app is controlling two outlets, which my two heat tape wires are plugged into. They are both Enerwave outlets, but are slightly different models. Once is a ZW15RM and the other is a ZW20RM. The outlets can be controlled via the smartthings app without a problem (even when the app crashes, and has to be removed/readded).
Interestingly enough, I did have some successful iterations with the app, throughout the winter season. I couldn't determine what was different during the times it was able to successfully shut off the outlets. At one point I suspected it may have worked because I didn't specify an initial snow amount one time when I installed the app. However, I later disproved that, as it failed after the next snowfall melted. It turned the outlets on 100% of the time, as long as the weather information told the app it was snowing (sometimes it didn't, but that's not the fault of the app). It is only when it tries to turn off the outlet that the problem occurs. If I can manage to get a live log of the event, I will absolutely post it here. I likely won't have time to mess with it until this weekend, though.
Entirely reasonable .. if you happen to collect logs for such an incident please send them along.
I suspect (but have no evidence) there may be an issue with a long-running operation with the way the app stores historical data that causes strange behavior (the app's state getting corrupted somehow). I reviewed the on/off code to see what might be causing a problem in the "off" path but it's really pretty simple. All the complexity is in the calculations of snow levels and stuff that is used for the turn-it-on code path as well.
e
On Mon, Apr 3, 2017 at 9:47 PM, dodgeboy notifications@github.com wrote:
Thank you for your response. Unfortunately, the heat tape hasn't gotten much use in the last month or so, since things are warming up. I don't think I'll be able to reproduce it now that the temps (hopefully) aren't hovering around freezing anymore. I really wish I had saved the live logs from when this happened. I wonder if I could find a zip code that is still near freezing, and configure the app to use it?
The app is controlling two outlets, which my two heat tape wires are plugged into. They are both Enerwave outlets, but are slightly different models. Once is a ZW15RM and the other is a ZW20RM. The outlets can be controlled via the smartthings app without a problem (even when the app crashes, and has to be removed/readded).
Interestingly enough, I did have some successful iterations with the app, throughout the winter season. I couldn't determine what was different during the times it was able to successfully shut off the outlets. At one point I suspected it may have worked because I didn't specify an initial snow amount one time when I installed the app. However, I later disproved that, as it failed after the next snowfall melted. It turned the outlets on 100% of the time, as long as the weather information told the app it was snowing (sometimes it didn't, but that's not the fault of the app). It is only when it tries to turn off the outlet that the problem occurs. If I can manage to get a live log of the event, I will absolutely post it here. I likely won't have time to mess with it until this weekend, though.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-291392461, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5TonByBNm3Gy9MvcBYDEqmuRPp8pFfks5rsct4gaJpZM4Lgfac .
So now that we're deep into the winter, I've been having this issue again. What's the best way for me to get the logs you need? Just the SmartThings IDE Logger? I've tried a couple different ideas, which have had no impact: 1) Control only one outlet instead of two, from the smartapp, to see if the problem is related to multiple switches. Same issue. 2) Use a PWS instead of a zip code for the weather information. Same issue.
It runs perfectly (for months), right up until the conditions dictate that it shut off the switches. At that point, the app stops making timestamps for the status (as it normally does each hour), and the outlets stay on indefinitely. The only way to get it working again is to remove the app and re-add it (reconfiguring the settings each time).
This app is so perfect for what I need it for, that I really want to get it working right. I appreciate all the work you have put into making this available for us! I don't want what appears to be a unique issue to me, to become a burden for you. If you can think of anything for me to try in the meantime, please let me know! Thanks!
A few diagnostic ideas:
Try reducing the amount of history the app keeps .. perhaps running for a long time is a cause in itself.
It is possible there is a bug related to shutoff. Maybe try to trigger that behavior in a controlled way, such as switching the location between regions to see if you can re create it.
Let me know how it goes. I'm eager to help.
On Tue, Jan 9, 2018 at 6:07 AM dodgeboy notifications@github.com wrote:
So now that we're deep into the winter, I've been having this issue again. What's the best way for me to get the logs you need? Just the SmartThings IDE Logger? I've tried a couple different ideas, which have had no impact:
- Control only one outlet instead of two, from the smartapp, to see if the problem is related to multiple switches. Same issue.
- Use a PWS instead of a zip code for the weather information. Same issue.
It runs perfectly (for months), right up until the conditions dictate that it shut off the switches. At that point, the app stops making timestamps for the status (as it normally does each hour), and the outlets stay on indefinitely. The only way to get it working again is to remove the app and re-add it (reconfiguring the settings each time).
This app is so perfect for what I need it for, that I really want to get it working right. I appreciate all the work you have put into making this available for us! I don't want what appears to be a unique issue to me, to become a burden for you. If you can think of anything for me to try in the meantime, please let me know! Thanks!
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-356293494, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5Toi2KQf7y3RaN1NW2isp1CeluAk8lks5tI3K4gaJpZM4Lgfac .
Thanks for the diagnostic ideas. How do I reduce the amount of history that the app keeps? I left it installed all summer long, and there were probably thousands of pages of history in there. Even after all of that, it still turned on my heaters the first time this winter (and crashed when it was time to turn them off).
The way I've been configuring the app when I install it is: 2 Outlets pws:KMIWHITE25 Min temp: -4C Max temp: 4C Mode: Auto Initial snow: 60mm (which is approximately what's currently on my roof)
Changing the zipcode from my PWS (currently 1c), to 90210 (currently 13c) immediately reproduces the issue. Unfortunately, my untrained eye doesn't see anything that stands out in the logs. Here are the logs for the hour leading up to when I changed the zip code. I changed the zipcode at 3:03:39 PM, and it gave me a "Error saving page" message in the Smartthings App. From my experience, that happens when the app has crashed (will no longer log anything, and won't control the outlets). The only way to proceed is to remove and re-add the smart app.
Note: I am also able to reproduce the issue by changing the min/max temp range to something that would instruct it to turn off the outlets.
I also just noticed that if I put the zip code back, or set the temp range back (so that it would keep the outlets on), the app starts to respond again! I get the "saved successfully" banner, and it starts making log entries. This makes me think the issue lies with the shut-off code. Thoughts?
Logs:
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getMinTemp (controller) says : 0.0
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info heattapeController operational mode: Automatic
6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug precip: 0
6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info Unit Roof Heat Rear is on and drawing 403W
6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4]
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug fewer history : [[ts:1515528219570, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:899.65796, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getMinTemp (controller) says : 0.0
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info heattapeController operational mode: Automatic
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Front is on and drawing 496.658W
6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Rear is on and drawing 403W
6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:19, pressure_trend:-, forecast_url:http://www.wunderground.com/US/CA/Beverly_Hills.html, history_url:http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KCALOSAN470, estimated:[:], weather:Rain, windchill_string:NA, station_id:KCALOSAN470, UV:2, observation_epoch:1515528207, wind_gust_kph:0, precip_1hr_in:-999.00, observation_time:Last Updated on January 9, 12:03 PM PST, feelslike_string:53.6 F (12.0 C), temp_f:53.6, local_tz_long:America/Los_Angeles, relative_humidity:97%, temp_c:12.0, image:[title:Weather Underground, link:http://www.wunderground.com, url:http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:5.0, observation_location:[full:Lookout Mountian, Los Angeles, California, elevation:1319 ft, state:California, longitude:-118.385880, latitude:34.107597, country_iso3166:US, country:US, city:Lookout Mountian, Los Angeles], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.73 in (19 mm), observation_time_rfc822:Tue, 09 Jan 2018 12:03:27 -0800, feelslike_f:53.6, heat_index_f:NA, feelslike_c:12.0, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query=34.107597,-118.385880, dewpoint_string:53 F (12 C), local_tz_offset:-0800, wind_kph:0, windchill_f:NA, windchill_c:NA, wind_degrees:180, pressure_in:29.76, dewpoint_c:12, pressure_mb:1008, icon:rain, local_time_rfc822:Tue, 09 Jan 2018 12:03:39 -0800, precip_1hr_string:-999.00 in ( 0 mm), icon_url:http://icons.wxug.com/i/c/k/rain.gif, wind_dir:South, dewpoint_f:53, nowcast:, display_location:[zip:90210, magic:1, full:Beverly Hills, CA, elevation:168.9, state:CA, wmo:99999, longitude:-118.41000366, latitude:34.09999847, state_name:California, country_iso3166:US, country:US, city:Beverly Hills], visibility_km:8.0, temperature_string:53.6 F (12.0 C), local_tz_short:PST, local_epoch:1515528219, wind_string:Calm, precip_today_in:0.73]
6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug precip: 0
6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4]
6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Rear is on and drawing 403W
6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Front is on and drawing 497.824W
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Rear
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Front
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Ground snow and in temp range --> ON
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp says : -6.2
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp (controller) says : -6.2
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info heattapeController operational mode: Automatic
6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Rear
6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Front
6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Ground snow and in temp range --> ON
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp (controller) says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: info heattapeController operational mode: Automatic
6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Rear
6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Front
6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Ground snow and in temp range --> ON
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp (controller) says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: info heattapeController operational mode: Automatic
6819237b-7206-4461-856e-1f3d291f2010 2:13:46 PM: info Turning Heat Tape On : Roof Heat Rear
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Turning Heat Tape On : Roof Heat Front
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Ground snow and in temp range --> ON
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getMinTemp says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getMinTemp (controller) says : -3.6
6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]]
6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getting records : 4
6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug In getMinTemp
6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: info heattapeController operational mode: Automatic
Nice diagnostic work! I don't have time to really dig into it right now but it seems that you've found a clear and reproducible bug. I suspect there is a hint in the log -- in the normal cases you see "getting records" followed by "fewer history" output. But just before it fails this doesn't happen. It might imply that the operation associated with the 'fewer history' output is failing:
log.debug "getting records : " + records log.debug "fewer history : " + state.history[0, records - 1] # <-- I suspect this line.
I can't explain how this would fail as 'records' is printed as 4 just a moment before, but unless I'm mis interpreting the log the debug line that should be printed is not. Maybe something in the state.history records is corrupt?
I haven't found a better way to debug in SmartThings than just adding print statements. My next step (that I'll do when I have some time to dig in) is to do that and try to trace the behavior .. it is a bit tedious! You could try this if you like. Running it in the simulator is ideal if that can also trigger the bad behavior.
On Tue, Jan 9, 2018 at 12:34 PM, dodgeboy notifications@github.com wrote:
Thanks for the diagnostic ideas. How do I reduce the amount of history that the app keeps? I left it installed all summer long, and there were probably thousands of pages of history in there. Even after all of that, it still turned on my heaters the first time this winter (and crashed when it was time to turn them off).
The way I've been configuring the app when I install it is: 2 Outlets pws:KMIWHITE25 Min temp: -4C Max temp: 4C Mode: Auto Initial snow: 60mm (which is approximately what's currently on my roof)
Changing the zipcode from my PWS (currently 1c), to 90210 (currently 13c) immediately reproduces the issue. Unfortunately, my untrained eye doesn't see anything that stands out in the logs. Here are the logs for the hour leading up to when I changed the zip code. I changed the zipcode at 3:03:39 PM, and it gave me a "Error saving page" message in the Smartthings App. From my experience, that happens when the app has crashed (will no longer log anything, and won't control the outlets). The only way to proceed is to remove and re-add the smart app.
Note: I am also able to reproduce the issue by changing the min/max temp range to something that would instruct it to turn off the outlets.
I also just noticed that if I put the zip code back, or set the temp range back (so that it would keep the outlets on), the app starts to respond again! I get the "saved successfully" banner, and it starts making log entries. This makes me think the issue lies with the shut-off code. Thoughts?
Logs: 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug fewer history : [[ts:1515528219570, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:899.65796, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Front is on and drawing 496.658W 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:19, pressure_trend:-, forecast_url:http://www.wunderground.com/US/CA/ Beverly_Hills.html, history_url:http://www.wunderground.com/ weatherstation/WXDailyHistory.asp?ID=KCALOSAN470, estimated:[:], weather:Rain, windchill_string:NA, station_id:KCALOSAN470, UV:2, observation_epoch:1515528207, wind_gust_kph:0, precip_1hr_in:-999.00, observation_time:Last Updated on January 9, 12:03 PM PST, feelslike_string:53.6 F (12.0 C), temp_f:53.6, local_tz_long:America/Los_Angeles, relative_humidity:97%, temp_c:12.0, image:[title:Weather Underground, link: http://www.wunderground.com, url:http://icons.wxug.com/ graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:5.0, observation_location:[full:Lookout Mountian, Los Angeles, California, elevation:1319 ft, state:California, longitude:-118.385880, latitude:34.107597, country_iso3166:US, country:US, city:Lookout Mountian, Los Angeles], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.73 in (19 mm), observation_time_rfc822:Tue, 09 Jan 2018 12:03:27 -0800, feelslike_f:53.6, heat_index_f:NA, feelslike_c:12.0, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query= 34.107597,-118.385880, dewpoint_string:53 F (12 C), local_tz_offset:-0800, wind_kph:0, windchill_f:NA, windchill_c:NA, wind_degrees:180, pressure_in:29.76, dewpoint_c:12, pressure_mb:1008, icon:rain, local_time_rfc822:Tue, 09 Jan 2018 12:03:39 -0800, precip_1hr_string:-999.00 in ( 0 mm), icon_url:http://icons.wxug. com/i/c/k/rain.gif, wind_dir:South, dewpoint_f:53, nowcast:, display_location:[zip:90210, magic:1, full:Beverly Hills, CA, elevation:168.9, state:CA, wmo:99999, longitude:-118.41000366, latitude:34.09999847, state_name:California, country_iso3166:US, country:US, city:Beverly Hills], visibility_km:8.0, temperature_string:53.6 F (12.0 C), local_tz_short:PST, local_epoch:1515528219, wind_string:Calm, precip_today_in:0.73] 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Front is on and drawing 497.824W 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp (controller) says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:13:46 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: info heattapeController operational mode: Automatic
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-356405928, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5TosO2AGJkWtgxUgW7m7kfVQRtQgVSks5tI81ZgaJpZM4Lgfac .
I believe this is fixed in v0.4.3 -- if you continue to see this behavior please re-open.
Did you try the new version? I'd like to know if it's resolving the bad behavior you were seeing.
On Tue, Jan 9, 2018 at 1:14 PM Eric Mayers emayers@gmail.com wrote:
Nice diagnostic work! I don't have time to really dig into it right now but it seems that you've found a clear and reproducible bug. I suspect there is a hint in the log -- in the normal cases you see "getting records" followed by "fewer history" output. But just before it fails this doesn't happen. It might imply that the operation associated with the 'fewer history' output is failing:
log.debug "getting records : " + records log.debug "fewer history : " + state.history[0, records - 1] # <-- I suspect this line.
I can't explain how this would fail as 'records' is printed as 4 just a moment before, but unless I'm mis interpreting the log the debug line that should be printed is not. Maybe something in the state.history records is corrupt?
I haven't found a better way to debug in SmartThings than just adding print statements. My next step (that I'll do when I have some time to dig in) is to do that and try to trace the behavior .. it is a bit tedious! You could try this if you like. Running it in the simulator is ideal if that can also trigger the bad behavior.
On Tue, Jan 9, 2018 at 12:34 PM, dodgeboy notifications@github.com wrote:
Thanks for the diagnostic ideas. How do I reduce the amount of history that the app keeps? I left it installed all summer long, and there were probably thousands of pages of history in there. Even after all of that, it still turned on my heaters the first time this winter (and crashed when it was time to turn them off).
The way I've been configuring the app when I install it is: 2 Outlets pws:KMIWHITE25 Min temp: -4C Max temp: 4C Mode: Auto Initial snow: 60mm (which is approximately what's currently on my roof)
Changing the zipcode from my PWS (currently 1c), to 90210 (currently 13c) immediately reproduces the issue. Unfortunately, my untrained eye doesn't see anything that stands out in the logs. Here are the logs for the hour leading up to when I changed the zip code. I changed the zipcode at 3:03:39 PM, and it gave me a "Error saving page" message in the Smartthings App. From my experience, that happens when the app has crashed (will no longer log anything, and won't control the outlets). The only way to proceed is to remove and re-add the smart app.
Note: I am also able to reproduce the issue by changing the min/max temp range to something that would instruct it to turn off the outlets.
I also just noticed that if I put the zip code back, or set the temp range back (so that it would keep the outlets on), the app starts to respond again! I get the "saved successfully" banner, and it starts making log entries. This makes me think the issue lies with the shut-off code. Thoughts?
Logs: 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug fewer history : [[ts:1515528219570, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:899.65796, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Front is on and drawing 496.658W 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:19, pressure_trend:-, forecast_url: http://www.wunderground.com/US/CA/Beverly_Hills.html, history_url: http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KCALOSAN470, estimated:[:], weather:Rain, windchill_string:NA, station_id:KCALOSAN470, UV:2, observation_epoch:1515528207, wind_gust_kph:0, precip_1hr_in:-999.00, observation_time:Last Updated on January 9, 12:03 PM PST, feelslike_string:53.6 F (12.0 C), temp_f:53.6, local_tz_long:America/Los_Angeles, relative_humidity:97%, temp_c:12.0, image:[title:Weather Underground, link:http://www.wunderground.com, url: http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:5.0, observation_location:[full:Lookout Mountian, Los Angeles, California, elevation:1319 ft, state:California, longitude:-118.385880, latitude:34.107597, country_iso3166:US, country:US, city:Lookout Mountian, Los Angeles], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.73 in (19 mm), observation_time_rfc822:Tue, 09 Jan 2018 12:03:27 -0800, feelslike_f:53.6, heat_index_f:NA, feelslike_c:12.0, heat_index_string:NA, ob_url: http://www.wunderground.com/cgi-bin/findweather/getForecast?query=34.107597,-118.385880, dewpoint_string:53 F (12 C), local_tz_offset:-0800, wind_kph:0, windchill_f:NA, windchill_c:NA, wind_degrees:180, pressure_in:29.76, dewpoint_c:12, pressure_mb:1008, icon:rain, local_time_rfc822:Tue, 09 Jan 2018 12:03:39 -0800, precip_1hr_string:-999.00 in ( 0 mm), icon_url: http://icons.wxug.com/i/c/k/rain.gif, wind_dir:South, dewpoint_f:53, nowcast:, display_location:[zip:90210, magic:1, full:Beverly Hills, CA, elevation:168.9, state:CA, wmo:99999, longitude:-118.41000366, latitude:34.09999847, state_name:California, country_iso3166:US, country:US, city:Beverly Hills], visibility_km:8.0, temperature_string:53.6 F (12.0 C), local_tz_short:PST, local_epoch:1515528219, wind_string:Calm, precip_today_in:0.73] 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Front is on and drawing 497.824W 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp (controller) says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:13:46 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: info heattapeController operational mode: Automatic
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-356405928, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5TosO2AGJkWtgxUgW7m7kfVQRtQgVSks5tI81ZgaJpZM4Lgfac .
I did! Thank you for tackling it so quickly! I wasn’t sure how to contact you without re-opening the issue. When I try to simulate the issue, by changing zip codes, the app no longer crashes. However, it also doesn’t seem to turn the outlets off when it should. The weather hasn’t allowed the outlets to come on/off naturally since you updated the app. It’s been around 0F here for the last few days, so I haven’t been able to truly test it.
I didn’t want to reopen the issue until I had a chance to see it go through the cycle naturally. However, based on the simulation, I suspect it may not shut off the switches.
If there are specific print/debugs you’d like me to add to the app, please give me an idea as to where you’d like them, and I will add them.
Here is a log where I start with a zip code that turns on the outlets, and then change to a zip code that is colder than the range, which should shut off the outlets. It doesn’t. I’ve waited a few minutes, and re-saved the app with the new settings, and it still doesn’t shut off. The only way to get it to shut off is to remove the app, manually turn them off, and reinstall the app.
70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug precip: 0
70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:+, forecast_url:http://www.wunderground.com/US/MI/White_Lake.html, history_url:http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMIWHITE25, estimated:[:], weather:Overcast, windchill_string:14 F (-10 C), station_id:KMIWHITE25, UV:0.0, observation_epoch:1515976638, wind_gust_kph:0, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:37 PM EST, feelslike_string:14 F (-10 C), temp_f:14.0, local_tz_long:America/New_York, relative_humidity:79%, temp_c:-10.0, image:[title:Weather Underground, link:http://www.wunderground.com, url:http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:0, visibility_mi:9.0, observation_location:[full:Cumberland Valley, White Lake Township, Michigan, elevation:1043 ft, state:Michigan, longitude:-83.552948, latitude:42.666267, country_iso3166:US, country:US, city:Cumberland Valley, White Lake Township], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:37:18 -0500, feelslike_f:14, heat_index_f:NA, feelslike_c:-10, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query=42.666267,-83.552948, dewpoint_string:9 F (-13 C), local_tz_offset:-0500, wind_kph:0, windchill_f:14, windchill_c:-10, wind_degrees:62, pressure_in:30.56, dewpoint_c:-13, pressure_mb:1035, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:59 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug.com/i/c/k/nt_cloudy.gif, wind_dir:ENE, dewpoint_f:9, nowcast:, display_location:[zip:48383, magic:1, full:White Lake, MI, elevation:319.1, state:MI, wmo:99999, longitude:-83.54000092, latitude:42.65999985, state_name:Michigan, country_iso3166:US, country:US, city:White Lake], visibility_km:14.5, temperature_string:14.0 F (-10.0 C), local_tz_short:EST, local_epoch:1515976739, wind_string:Calm, precip_today_in:0.00]
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug fewer history : [[ts:1515976775787, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:893.08496, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976673021, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info Unit Roof Heat Front is on and drawing 490.085W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info heattapeController operational mode: Automatic
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug In getMinTemp
70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info Unit Roof Heat Rear is on and drawing 403W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-4 0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:48383, start_snow:30.0]
70354466-2d64-42a9-b43f-5aac340b97d 7:39:10 PM: info Unit Roof Heat Front is on and drawing 489.570W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:10 PM: info Unit Roof Heat Rear is on and drawing 402W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Unit Roof Heat Front is on and drawing 489.141W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Unit Roof Heat Rear is on and drawing 401W
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Turning Heat Tape On : Roof Heat Front
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: debug In getMinTemp
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getMinTemp says : -10.0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug fewer history : [[ts:1515976739598, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:890.141, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976519862, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Turning Heat Tape On : Roof Heat Rear
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getMinTemp (controller) says : -10.0
70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug fewer history : [[ts:1515976739598, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:890.141, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976519862, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info heattapeController operational mode: Automatic
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:+, forecast_url:http://www.wunderground.com/US/MI/White_Lake.html, history_url:http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMIWHITE25, estimated:[:], weather:Overcast, windchill_string:14 F (-10 C), station_id:KMIWHITE25, UV:0.0, observation_epoch:1515976638, wind_gust_kph:0, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:37 PM EST, feelslike_string:14 F (-10 C), temp_f:14.0, local_tz_long:America/New_York, relative_humidity:79%, temp_c:-10.0, image:[title:Weather Underground, link:http://www.wunderground.com, url:http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:0, visibility_mi:9.0, observation_location:[full:Cumberland Valley, White Lake Township, Michigan, elevation:1043 ft, state:Michigan, longitude:-83.552948, latitude:42.666267, country_iso3166:US, country:US, city:Cumberland Valley, White Lake Township], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:37:18 -0500, feelslike_f:14, heat_index_f:NA, feelslike_c:-10, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query=42.666267,-83.552948, dewpoint_string:9 F (-13 C), local_tz_offset:-0500, wind_kph:0, windchill_f:14, windchill_c:-10, wind_degrees:62, pressure_in:30.56, dewpoint_c:-13, pressure_mb:1035, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:59 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug.com/i/c/k/nt_cloudy.gif, wind_dir:ENE, dewpoint_f:9, nowcast:, display_location:[zip:48383, magic:1, full:White Lake, MI, elevation:319.1, state:MI, wmo:99999, longitude:-83.54000092, latitude:42.65999985, state_name:Michigan, country_iso3166:US, country:US, city:White Lake], visibility_km:14.5, temperature_string:14.0 F (-10.0 C), local_tz_short:EST, local_epoch:1515976739, wind_string:Calm, precip_today_in:0.00]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info Unit Roof Heat Rear is on and drawing 401W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-8.0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:48383, start_snow:30.0]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug precip: 0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info Unit Roof Heat Front is on and drawing 489.141W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Front is on and drawing 489.141W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Rear is on and drawing 401W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Front is on and drawing 489.141W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Rear is on and drawing 401W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:36 PM: info Unit Roof Heat Front is on and drawing 492.024W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:36 PM: info Unit Roof Heat Rear is on and drawing 404W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Turning Heat Tape On : Roof Heat Front
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Turning Heat Tape On : Roof Heat Rear
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Ground snow and in temp range --> ON
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getMinTemp says : -10.0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug fewer history : [[ts:1515976704446, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-7.3, state:off, power:0.0, weather:Overcast, solar_radiation:--, sun_level:0.0, wind_kph:6.4], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug In getMinTemp
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getMinTemp (controller) says : -10.0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug fewer history : [[ts:1515976704446, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-7.3, state:off, power:0.0, weather:Overcast, solar_radiation:--, sun_level:0.0, wind_kph:6.4], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug In getMinTemp
70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info heattapeController operational mode: Automatic
70354466-2d64-42a9-b43f-5aac340b97d 7:38:29 PM: info Unit Roof Heat Front is on and drawing 497.247W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:29 PM: info Unit Roof Heat Rear is off and drawing 407W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:25 PM: info Turning Heat Tape On : Roof Heat Rear
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: info Ground snow and in temp range --> ON
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug getting records : 4
70354466-2d64-42a9-b43f-5aac340b97d 7:38:25 PM: info Turning Heat Tape On : Roof Heat Front
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug getMinTemp says : -10.0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug fewer history : [[ts:1515976704446, snow_mm:0.0, rain_mm:0.0, temp_c:-7.3, solar_radiation:--, uv:null, wind_kph:6.4, state:off, power:0.0, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug fewer history : [[ts:1515976704446, snow_mm:0.0, rain_mm:0.0, temp_c:-7.3, solar_radiation:--, uv:null, wind_kph:6.4, state:off, power:0.0, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug In getMinTemp
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug precip: 0
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug condition data : [wind_gust_mph:12.0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:0, forecast_url:http://www.wunderground.com/US/IN/Rockville.html, history_url:http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KINROCKV2, estimated:[:], weather:Overcast, windchill_string:13 F (-11 C), station_id:KINROCKV2, UV:0, observation_epoch:1515976681, wind_gust_kph:19.3, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:38 PM EST, feelslike_string:13 F (-11 C), temp_f:18.8, local_tz_long:America/New_York, relative_humidity:78%, temp_c:-7.3, image:[title:Weather Underground, link:http://www.wunderground.com, url:http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:10.0, observation_location:[full:Rockville, Indiana, elevation:702 ft, state:Indiana, longitude:-87.224838, latitude:39.774242, country_iso3166:US, country:US, city:Rockville], wind_mph:4.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:38:01 -0500, feelslike_f:13, heat_index_f:NA, feelslike_c:-11, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query=39.774242,-87.224838, dewpoint_string:13 F (-10 C), local_tz_offset:-0500, wind_kph:6.4, windchill_f:13, windchill_c:-11, wind_degrees:161, pressure_in:30.51, dewpoint_c:-10, pressure_mb:1033, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:24 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug.com/i/c/k/nt_cloudy.gif, wind_dir:SSE, dewpoint_f:13, nowcast:, display_location:[zip:47872, magic:1, full:Rockville, IN, elevation:217.0, state:IN, wmo:99999, longitude:-87.23000336, latitude:39.75999832, state_name:Indiana, country_iso3166:US, country:US, city:Rockville], visibility_km:16.1, temperature_string:18.8 F (-7.3 C), local_tz_short:EST, local_epoch:1515976704, wind_string:From the SSE at 4.0 MPH Gusting to 12.0 MPH, precip_today_in:0.00]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-8.0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:47872, start_snow:30.0]
70354466-2d64-42a9-b43f-5aac340b97d 7:38:16 PM: info Unit Roof Heat Front is off and drawing 0.000W
70354466-2d64-42a9-b43f-5aac340b97d 7:38:16 PM: info Unit Roof Heat Rear is off and drawing 0W
I've made another set of changes so please pull the current code and give it another go.
Also, in testing, please give it about 15 minutes after you make a setting change (such as zipcode or temp ranges) to see the impact. There is no callback that I could find for that kind of setting change to re-trigger the evaluation so we're relying on the scheduled evaluation which happens 4 times an hour.
This set of changes aims to improve a lot of things, handling some cases where bad data could get into the history, better handling of early states where there is no history data, better display of data, work-arounds for some bugs in the smartthings simulator, and logging output cleanup.
I also pulled out a 'feature' I had built that might seem like buggy behavior. This was code that would keep the heat tape on a few hours after freezing conditions ended with the intent that you might want to keep melting actively if there had been ice. This might be useful in some cases but it seems rare and while battling this control bug I don't want the unnecessary complication.
There may be additional bugs in here still -- please let me know if you find anything broken or odd. And let me know if you have feature requests too!
On Sun, Jan 14, 2018 at 4:46 PM, dodgeboy notifications@github.com wrote:
I did! Thank you for tackling it so quickly! I wasn’t sure how to contact you without re-opening the issue. When I try to simulate the issue, by changing zip codes, the app no longer crashes. However, it also doesn’t seem to turn the outlets off when it should. The weather hasn’t allowed the outlets to come on/off naturally since you updated the app. It’s been around 0F here for the last few days, so I haven’t been able to truly test it.
I didn’t want to reopen the issue until I had a chance to see it go through the cycle naturally. However, based on the simulation, I suspect it may not shut off the switches.
If there are specific print/debugs you’d like me to add to the app, please give me an idea as to where you’d like them, and I will add them.
Here is a log where I start with a zip code that turns on the outlets, and then change to a zip code that is colder than the range, which should shut off the outlets. It doesn’t. I’ve waited a few minutes, and re-saved the app with the new settings, and it still doesn’t shut off. The only way to get it to shut off is to remove the app, manually turn them off, and reinstall the app.
70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug precip: 0 70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:+, forecasturl:http://www.wunderground.com/US/MI/White Lake.html, history_url:http://www.wunderground.com/ weatherstation/WXDailyHistory.asp?ID=KMIWHITE25, estimated:[:], weather:Overcast, windchill_string:14 F (-10 C), station_id:KMIWHITE25, UV:0.0, observation_epoch:1515976638, wind_gust_kph:0, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:37 PM EST, feelslike_string:14 F (-10 C), temp_f:14.0, local_tz_long:America/New_York, relative_humidity:79%, temp_c:-10.0, image:[title:Weather Underground, link: http://www.wunderground.com, url:http://icons.wxug.com/ graphics/wu2/logo_130x80.png], solarradiation:0, visibility_mi:9.0, observation_location:[full:Cumberland Valley, White Lake Township, Michigan, elevation:1043 ft, state:Michigan, longitude:-83.552948, latitude:42.666267, country_iso3166:US, country:US, city:Cumberland Valley, White Lake Township], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:37:18 -0500, feelslike_f:14, heat_index_f:NA, feelslike_c:-10, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/ findweather/getForecast?query=42.666267,-83.552948, dewpoint_string:9 F (-13 C), local_tz_offset:-0500, wind_kph:0, windchill_f:14, windchill_c:-10, wind_degrees:62, pressure_in:30.56, dewpoint_c:-13, pressure_mb:1035, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:59 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug. com/i/c/k/nt_cloudy.gif, wind_dir:ENE, dewpoint_f:9, nowcast:, display_location:[zip:48383, magic:1, full:White Lake, MI, elevation:319.1, state:MI, wmo:99999, longitude:-83.54000092, latitude:42.65999985, state_name:Michigan, country_iso3166:US, country:US, city:White Lake], visibility_km:14.5, temperature_string:14.0 F (-10.0 C), local_tz_short:EST, local_epoch:1515976739, wind_string:Calm, precip_today_in:0.00] 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug fewer history : [[ts:1515976775787, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:893.08496, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976673021, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info Unit Roof Heat Front is on and drawing 490.085W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info heattapeController operational mode: Automatic 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: debug In getMinTemp 70354466-2d64-42a9-b43f-5aac340b97d 7:39:36 PM: info Unit Roof Heat Rear is on and drawing 403W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:35 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-4 0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:48383, start_snow:30.0] 70354466-2d64-42a9-b43f-5aac340b97d 7:39:10 PM: info Unit Roof Heat Front is on and drawing 489.570W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:10 PM: info Unit Roof Heat Rear is on and drawing 402W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Unit Roof Heat Front is on and drawing 489.141W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Unit Roof Heat Rear is on and drawing 401W 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Turning Heat Tape On : Roof Heat Front 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: debug In getMinTemp 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getMinTemp says : -10.0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug fewer history : [[ts:1515976739598, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:890.141, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976519862, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: info Turning Heat Tape On : Roof Heat Rear 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getMinTemp (controller) says : -10.0 70354466-2d64-42a9-b43f-5aac340b97d 7:39:00 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug fewer history : [[ts:1515976739598, snow_mm:0.0, rain_mm:0.0, temp_c:-10.0, solar_radiation:0, uv:null, wind_kph:0, state:on, power:890.141, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976519862, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info heattapeController operational mode: Automatic 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:+, forecasturl:http://www.wunderground.com/US/MI/White Lake.html, history_url:http://www.wunderground.com/ weatherstation/WXDailyHistory.asp?ID=KMIWHITE25, estimated:[:], weather:Overcast, windchill_string:14 F (-10 C), station_id:KMIWHITE25, UV:0.0, observation_epoch:1515976638, wind_gust_kph:0, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:37 PM EST, feelslike_string:14 F (-10 C), temp_f:14.0, local_tz_long:America/New_York, relative_humidity:79%, temp_c:-10.0, image:[title:Weather Underground, link: http://www.wunderground.com, url:http://icons.wxug.com/ graphics/wu2/logo_130x80.png], solarradiation:0, visibility_mi:9.0, observation_location:[full:Cumberland Valley, White Lake Township, Michigan, elevation:1043 ft, state:Michigan, longitude:-83.552948, latitude:42.666267, country_iso3166:US, country:US, city:Cumberland Valley, White Lake Township], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:37:18 -0500, feelslike_f:14, heat_index_f:NA, feelslike_c:-10, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/ findweather/getForecast?query=42.666267,-83.552948, dewpoint_string:9 F (-13 C), local_tz_offset:-0500, wind_kph:0, windchill_f:14, windchill_c:-10, wind_degrees:62, pressure_in:30.56, dewpoint_c:-13, pressure_mb:1035, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:59 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug. com/i/c/k/nt_cloudy.gif, wind_dir:ENE, dewpoint_f:9, nowcast:, display_location:[zip:48383, magic:1, full:White Lake, MI, elevation:319.1, state:MI, wmo:99999, longitude:-83.54000092, latitude:42.65999985, state_name:Michigan, country_iso3166:US, country:US, city:White Lake], visibility_km:14.5, temperature_string:14.0 F (-10.0 C), local_tz_short:EST, local_epoch:1515976739, wind_string:Calm, precip_today_in:0.00] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info Unit Roof Heat Rear is on and drawing 401W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-8.0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:48383, start_snow:30.0] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: debug precip: 0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:59 PM: info Unit Roof Heat Front is on and drawing 489.141W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Front is on and drawing 489.141W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Rear is on and drawing 401W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Front is on and drawing 489.141W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:54 PM: info Unit Roof Heat Rear is on and drawing 401W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:36 PM: info Unit Roof Heat Front is on and drawing 492.024W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:36 PM: info Unit Roof Heat Rear is on and drawing 404W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Turning Heat Tape On : Roof Heat Front 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Turning Heat Tape On : Roof Heat Rear 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info Ground snow and in temp range --> ON 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getMinTemp says : -10.0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug fewer history : [[ts:1515976704446, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-7.3, state:off, power:0.0, weather:Overcast, solar_radiation:--, sun_level:0.0, wind_kph:6.4], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug In getMinTemp 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getMinTemp (controller) says : -10.0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug fewer history : [[ts:1515976704446, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-7.3, state:off, power:0.0, weather:Overcast, solar_radiation:--, sun_level:0.0, wind_kph:6.4], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: debug In getMinTemp 70354466-2d64-42a9-b43f-5aac340b97d 7:38:32 PM: info heattapeController operational mode: Automatic 70354466-2d64-42a9-b43f-5aac340b97d 7:38:29 PM: info Unit Roof Heat Front is on and drawing 497.247W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:29 PM: info Unit Roof Heat Rear is off and drawing 407W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:25 PM: info Turning Heat Tape On : Roof Heat Rear 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: info Ground snow and in temp range --> ON 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug getting records : 4 70354466-2d64-42a9-b43f-5aac340b97d 7:38:25 PM: info Turning Heat Tape On : Roof Heat Front 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug getMinTemp says : -10.0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug fewer history : [[ts:1515976704446, snow_mm:0.0, rain_mm:0.0, temp_c:-7.3, solar_radiation:--, uv:null, wind_kph:6.4, state:off, power:0.0, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug fewer history : [[ts:1515976704446, snow_mm:0.0, rain_mm:0.0, temp_c:-7.3, solar_radiation:--, uv:null, wind_kph:6.4, state:off, power:0.0, agg_snow_mm:30.0, sun_level:0.0, weather:Overcast], [ts:1515976495969, agg_snow_mm:30.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-10.0, state:off, power:0.0, weather:Overcast, solar_radiation:0, sun_level:0.0, wind_kph:0]] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug In getMinTemp 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug precip: 0 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug condition data : [wind_gust_mph:12.0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:0, forecast_url:http://www.wunderground.com/US/IN/ Rockville.html, history_url:http://www.wunderground.com/ weatherstation/WXDailyHistory.asp?ID=KINROCKV2, estimated:[:], weather:Overcast, windchill_string:13 F (-11 C), station_id:KINROCKV2, UV:0, observation_epoch:1515976681, wind_gust_kph:19.3, precip_1hr_in:0.00, observation_time:Last Updated on January 14, 7:38 PM EST, feelslike_string:13 F (-11 C), temp_f:18.8, local_tz_long:America/New_York, relative_humidity:78%, temp_c:-7.3, image:[title:Weather Underground, link: http://www.wunderground.com, url:http://icons.wxug.com/ graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:10.0, observation_location:[full:Rockville, Indiana, elevation:702 ft, state:Indiana, longitude:-87.224838, latitude:39.774242, country_iso3166:US, country:US, city:Rockville], wind_mph:4.0, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Sun, 14 Jan 2018 19:38:01 -0500, feelslike_f:13, heat_index_f:NA, feelslike_c:-11, heat_index_string:NA, ob_url:http://www. wunderground.com/cgi-bin/findweather/getForecast?query= 39.774242,-87.224838, dewpoint_string:13 F (-10 C), local_tz_offset:-0500, wind_kph:6.4, windchill_f:13, windchill_c:-11, wind_degrees:161, pressure_in:30.51, dewpoint_c:-10, pressure_mb:1033, icon:cloudy, local_time_rfc822:Sun, 14 Jan 2018 19:38:24 -0500, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug. com/i/c/k/nt_cloudy.gif, wind_dir:SSE, dewpoint_f:13, nowcast:, display_location:[zip:47872, magic:1, full:Rockville, IN, elevation:217.0, state:IN, wmo:99999, longitude:-87.23000336, latitude:39.75999832, state_name:Indiana, country_iso3166:US, country:US, city:Rockville], visibility_km:16.1, temperature_string:18.8 F (-7.3 C), local_tz_short:EST, local_epoch:1515976704, wind_string:From the SSE at 4.0 MPH Gusting to 12.0 MPH, precip_today_in:0.00] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:24 PM: debug Updated with settings: [maxTemp:3.0, minTemp:-8.0, heattape:[Roof Heat Rear, Roof Heat Front], op_mode:Automatic, zipcode:47872, start_snow:30.0] 70354466-2d64-42a9-b43f-5aac340b97d 7:38:16 PM: info Unit Roof Heat Front is off and drawing 0.000W 70354466-2d64-42a9-b43f-5aac340b97d 7:38:16 PM: info Unit Roof Heat Rear is off and drawing 0W
From: Eric Mayers Sent: Sunday, January 14, 2018 6:35 PM To: erisod/heattape-smartthings Cc: dodgeboy; Mention Subject: Re: [erisod/heattape-smartthings] Smartapp crashes when turning offheat tape (#1)
Did you try the new version? I'd like to know if it's resolving the bad behavior you were seeing.
On Tue, Jan 9, 2018 at 1:14 PM Eric Mayers emayers@gmail.com wrote:
Nice diagnostic work! I don't have time to really dig into it right now but it seems that you've found a clear and reproducible bug. I suspect there is a hint in the log -- in the normal cases you see "getting records" followed by "fewer history" output. But just before it fails this doesn't happen. It might imply that the operation associated with the 'fewer history' output is failing:
log.debug "getting records : " + records log.debug "fewer history : " + state.history[0, records - 1] # <-- I suspect this line.
I can't explain how this would fail as 'records' is printed as 4 just a moment before, but unless I'm mis interpreting the log the debug line that should be printed is not. Maybe something in the state.history records is corrupt?
I haven't found a better way to debug in SmartThings than just adding print statements. My next step (that I'll do when I have some time to dig in) is to do that and try to trace the behavior .. it is a bit tedious! You could try this if you like. Running it in the simulator is ideal if that can also trigger the bad behavior.
On Tue, Jan 9, 2018 at 12:34 PM, dodgeboy notifications@github.com wrote:
Thanks for the diagnostic ideas. How do I reduce the amount of history that the app keeps? I left it installed all summer long, and there were probably thousands of pages of history in there. Even after all of that, it still turned on my heaters the first time this winter (and crashed when it was time to turn them off).
The way I've been configuring the app when I install it is: 2 Outlets pws:KMIWHITE25 Min temp: -4C Max temp: 4C Mode: Auto Initial snow: 60mm (which is approximately what's currently on my roof)
Changing the zipcode from my PWS (currently 1c), to 90210 (currently 13c) immediately reproduces the issue. Unfortunately, my untrained eye doesn't see anything that stands out in the logs. Here are the logs for the hour leading up to when I changed the zip code. I changed the zipcode at 3:03:39 PM, and it gave me a "Error saving page" message in the Smartthings App. From my experience, that happens when the app has crashed (will no longer log anything, and won't control the outlets). The only way to proceed is to remove and re-add the smart app.
Note: I am also able to reproduce the issue by changing the min/max temp range to something that would instruct it to turn off the outlets.
I also just noticed that if I put the zip code back, or set the temp range back (so that it would keep the outlets on), the app starts to respond again! I get the "saved successfully" banner, and it starts making log entries. This makes me think the issue lies with the shut-off code. Thoughts?
Logs: 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug fewer history : [[ts:1515528235438, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:900.69, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:56 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:55 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug fewer history : [[ts:1515528219570, snow_mm:0.0, rain_mm:0.0, temp_c:12.0, solar_radiation:--, uv:null, wind_kph:0, state:on, power:899.65796, agg_snow_mm:82.59725, sun_level:0.9, weather:Rain], [ts:1515520030646, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.0, state:on, power:886.687, weather:Clear, solar_radiation:177, sun_level:0.9, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getMinTemp (controller) says : 0.0 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Front is on and drawing 496.658W 6819237b-7206-4461-856e-1f3d291f2010 3:03:40 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug condition data : [wind_gust_mph:0, precip_1hr_metric: 0, precip_today_metric:19, pressure_trend:-, forecast_url: http://www.wunderground.com/US/CA/Beverly_Hills.html, history_url: http://www.wunderground.com/weatherstation/WXDailyHistory. asp?ID=KCALOSAN470, estimated:[:], weather:Rain, windchill_string:NA, station_id:KCALOSAN470, UV:2, observation_epoch:1515528207, wind_gust_kph:0, precip_1hr_in:-999.00, observation_time:Last Updated on January 9, 12:03 PM PST, feelslike_string:53.6 F (12.0 C), temp_f:53.6, local_tz_long:America/Los_Angeles, relative_humidity:97%, temp_c:12.0, image:[title:Weather Underground, link:http://www.wunderground.com, url: http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:--, visibility_mi:5.0, observation_location:[full:Lookout Mountian, Los Angeles, California, elevation:1319 ft, state:California, longitude:-118.385880, latitude:34.107597, country_iso3166:US, country:US, city:Lookout Mountian, Los Angeles], wind_mph:0.0, heat_index_c:NA, precip_today_string:0.73 in (19 mm), observation_time_rfc822:Tue, 09 Jan 2018 12:03:27 -0800, feelslike_f:53.6, heat_index_f:NA, feelslike_c:12.0, heat_index_string:NA, ob_url: http://www.wunderground.com/cgi-bin/findweather/ getForecast?query=34.107597,-118.385880, dewpoint_string:53 F (12 C), local_tz_offset:-0800, wind_kph:0, windchill_f:NA, windchill_c:NA, wind_degrees:180, pressure_in:29.76, dewpoint_c:12, pressure_mb:1008, icon:rain, local_time_rfc822:Tue, 09 Jan 2018 12:03:39 -0800, precip_1hr_string:-999.00 in ( 0 mm), icon_url: http://icons.wxug.com/i/c/k/rain.gif, wind_dir:South, dewpoint_f:53, nowcast:, display_location:[zip:90210, magic:1, full:Beverly Hills, CA, elevation:168.9, state:CA, wmo:99999, longitude:-118.41000366, latitude:34.09999847, state_name:California, country_iso3166:US, country:US, city:Beverly Hills], visibility_km:8.0, temperature_string:53.6 F (12.0 C), local_tz_short:PST, local_epoch:1515528219, wind_string:Calm, precip_today_in:0.73] 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug precip: 0 6819237b-7206-4461-856e-1f3d291f2010 3:03:39 PM: debug Updated with settings: [op_mode:Automatic, heattape:[Roof Heat Front, Roof Heat Rear], start_snow:85.0, minTemp:-4, zipcode:90210, maxTemp:4] 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Rear is on and drawing 403W 6819237b-7206-4461-856e-1f3d291f2010 3:03:14 PM: info Unit Roof Heat Front is on and drawing 497.824W 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getMinTemp (controller) says : -6.2 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug fewer history : [[agg_snow_mm:84.86725, ts:1515527230626, snow_mm:0.0, uv:null, temp_c:0.6, rain_mm:0.0, state:on, weather:Scattered Clouds, power:901.599, sun_level:0.4, solar_radiation:24, wind_kph:0], [agg_snow_mm:85.0, ts:1515516430623, snow_mm:0.0, uv:null, temp_c:-6.2, rain_mm:0.0, state:on, weather:Partly Cloudy, power:887.187, sun_level:0.4, solar_radiation:25, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:58:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:43:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:43:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:28:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:28:44 PM: info heattapeController operational mode: Automatic 6819237b-7206-4461-856e-1f3d291f2010 2:13:46 PM: info Turning Heat Tape On : Roof Heat Rear 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Turning Heat Tape On : Roof Heat Front 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: info Ground snow and in temp range --> ON 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getMinTemp says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:45 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getMinTemp (controller) says : -3.6 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug fewer history : [[ts:1515523630619, agg_snow_mm:84.95575, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:0.3, state:on, power:897.46204, weather:Clear, solar_radiation:45, sun_level:0.4, wind_kph:0], [ts:1515512830668, agg_snow_mm:85.0, snow_mm:0.0, uv:null, rain_mm:0.0, temp_c:-3.6, state:on, power:882.266, weather:Partly Cloudy, solar_radiation:47, sun_level:0.4, wind_kph:0]] 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug getting records : 4 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: debug In getMinTemp 6819237b-7206-4461-856e-1f3d291f2010 2:13:44 PM: info heattapeController operational mode: Automatic
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1# issuecomment-356405928, or mute the thread https://github.com/notifications/unsubscribe-auth/ AO5TosO2AGJkWtgxUgW7m7kfVQRtQgVSks5tI81ZgaJpZM4Lgfac .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-357557304, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5TorTNv05Qkn0oy53kcjlBeprLbw-qks5tKp_cgaJpZM4Lgfac .
I've pulled the update. I had completely forgotten about the shutoff delay feature. That may have been completely responsible for why it wasn't turning off the outlets during this latest round of testing.
I ran through a test by changing the temp range to trigger the outlets to turn on/off, and it seems to work so far! It took about 15 minutes to shut the outlets off (as you specified above), but it did shut them off. And it did not crash the app. This week should be a good week to test the app naturally, as we will be flirting with melt temps, and have precip on and off all week. I'll report back on the progress. I can't tell you how much I appreciate your work on this! Please send me your paypal address, if you have one.
As far as feature requests, I've been using this app for more than a year, and it does exactly what I need it to do. I can only think of a couple things I would want to see: 1) I wish the update interval was configurable. Or maybe it could just update the conditions more often if you were within the "melt zone" temp range (as specified in the config of the app). There have been times where I've noticed it has started to snow, and it won't turn the outlets on for another 30+ minutes, because of the fixed interval. This obviously isn't a huge deal, but you asked for feature requests! :)
2) It would be nice if you could set a timer (in hours) for the "force-on" mode. I've only had to use it a few times, but on one of those occasions I forgot to turn it back off for a couple days. Definitely a niche case, though.
One of my favorite features of the app is the way it will monitor the sun, and turn on if it is sunny, even if it's colder than the specified temp range.
Thanks again! I'm excited to potentially see it work throughout the week!
No need to paypal but I appreciate the sentiment; I enjoy this stuff and I'm happy to have people using it.
Re your feature requests:
If you want to run in temperature only mode the accumulation/melt calculations don't matter and you could easily hack the app, modifying the initialize() function, specifically these lines which control the frequency at which the functions run: runEvery1Hour(snowBookkeeper) runEvery15Minutes(heattapeController)
You could set both to use runEvery5Minutes for example.
I think I will re-organize the code to separate out the accumulation/melt from the current temperature/control and implement a dynamic higher rate when near threshold conditions (or maybe just pump up the polling frequency all the time). It'll be a fairly big change so I'll wait until I've got some time to play with it and test it well.
One addition thing to worry about with a higher frequency poll is that I don't know if the underlying data moves quickly. I suspect it's faster than hourly but if wunderground (the ultimate data source for this stuff) updates their data only every 5 or 10 or 15 minutes then polling at a higher rate doesn't provide any benefit. Should be easy enough to test.
If the weather data was checked more frequently do you think you'd want to see it in the app? I'm kind of abusing the configuration UI already by displaying a bunch of data -- 5 minute granularity might be waaaay too much (for a person to look at and might hit an app display or storage limit).
And while you're reading this long email anyway and thinking about features .. I've been thinking about whether to try add another data source to the melt/control calculations (let me know if you'd find this useful!) : Thermostat setting and/or temperature sensors. The idea being that problematic melt is mostly coming from home-heating melting roof snow into gutters which freeze. If it's so cold outside that the roof snow never melts the heat tape need not be on usually. It would seem likely (dependent on insulation, etc) that when the interior temperature is higher that you'd have more problematic melt, so might want to lower the low-threshold temperature. For example, instead of -10c, if the interior temperature is 30c you might still want to run the heat tape with outside temperatures down to -15c. Just made up numbers but that's the idea. To be honest, I'm not sure if there'd be a real benefit for this, but I have interior temp sensors and it seems like a cool home automation feature to be able to wire these things together.
Eric
On Mon, Jan 15, 2018 at 4:56 AM, dodgeboy notifications@github.com wrote:
I've pulled the update. I had completely forgotten about the shutoff delay feature. That may have been completely responsible for why it wasn't turning off the outlets during this latest round of testing.
I ran through a test by changing the temp range to trigger the outlets to turn on/off, and it seems to work so far! It took about 15 minutes to shut the outlets off (as you specified above), but it did shut them off. And it did not crash the app. This week should be a good week to test the app naturally, as we will be flirting with melt temps, and have precip on and off all week. I'll report back on the progress. I can't tell you how much I appreciate your work on this! Please send me your paypal address, if you have one.
As far as feature requests, I've been using this app for more than a year, and it does exactly what I need it to do. I can only think of a couple things I would want to see:
1.
I wish the update interval was configurable. Or maybe it could just update the conditions more often if you were within the "melt zone" temp range (as specified in the config of the app). There have been times where I've noticed it has started to snow, and it won't turn the outlets on for another 30+ minutes, because of the fixed interval. This obviously isn't a huge deal, but you asked for feature requests! :) 2.
It would be nice if you could set a timer (in hours) for the "force-on" mode. I've only had to use it a few times, but on one of those occasions I forgot to turn it back off for a couple days. Definitely a niche case, though.
One of my favorite features of the app is the way it will monitor the sun, and turn on if it is sunny, even if it's colder than the specified temp range.
Thanks again! I'm excited to potentially see it work throughout the week!
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-357675400, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5Too9rcMM9RJXzMNBeV4SoQebyzU3Wks5tK0rwgaJpZM4Lgfac .
Good news! The heat tape turned on and off about 8 times today, successfully! Looks like the shutoff bug has been taken care of. However, I didn't realize how much I appreciated the extended shutoff timer you had implemented. The temp was teetering around the minimum, and it was sunny, so the conditions kept turning it on and off (every 15 minutes, in some cases). I think it would be a benefit to reintroduce that shutoff delay, because I'm not sure the tape was on long enough to do much good in this particular scenario. I only noticed the frequent on/off behavior, because I set ST to notify me when the outlets turned on, for debugging purposes. But a few times, it was only on for a 15 minute stretch, which is barely enough to get the wire up to temp. If you think the extended shutoff delay was part of the problem, maybe some hysteresis could be built-in?
As for the frequency of Weather Underground updates, here is a post from a Weather Underground rep, in their forum... This is specifically in reference to API calls.
"Each observation station has different update times. Personal Weather Stations update as frequently as every 2.5 seconds. National Weather Service (airports) update about once an hour in good weather, more frequently in bad weather. And some locations outside the United States only update every 3 hours. If you wanted to schedule update retrievals you could do them every 5 or 15 minutes and then you'll always have the most current data."
One thing to think about, though... Where to the weather calls originate from? I'm sure they limit the number of calls. If they originate from ST, they may allow unlimited calls... but if they originate (presumably anonymously, without a specific key) from the hub itself, that may be a problem.
Good point on the verbosity of the logging info in the app. If it polled more frequently, I wouldn't want to "spam" the visible log with it. I mainly look at the log to determine the following:
1) When did the tape turn on? (and how long has it been on)
2) Why did the tape turn on? (temp trigger, snow trigger, sun+temp trigger)
3) What the app thinks the temp/conditions currently are (and what they were when it turned the tape on).
Honestly, I wouldn't have much need for the log info at all, if I hadn't run into the issue my setup had. But since I'm a geek, I appreciate the info.
Force-on-for-24h-then-Auto would be perfect, for my use. Even 8 or 12 hours, really.
I love where you're going with the temp sensor idea! I have a temp sensor in my attic already (tied into ST), because I was trying to figure out why I was getting so much melt. Taking it one step further, you could allow a water leak sensor as a trigger (with the remote sensor wire placed in the gutter). I like the idea of being proactive about it, though, which your temp sensor idea would allow it do be. I don't know how useful the temp sensor would be, if it was indoors... most of the time, the indoor temp is pretty consistent. A sensor in the attic, or even an outdoor motion sensor (most have temp and lux) input could be useful, though.
The UV/Sun calculation that the app is using is a critical piece of its usefulness. Today it was -5c, but sunny, and I was seeing melt. I have my minimum set to -4c, and the heat tape came on several times (and I was happy it did).
More good news! Yesterday was a complete success. The sun was more consistent, so I didn't get the on/off/on/off behavior at all. It turned on in the morning, and off around midnight, exactly as it should. The shutoff bug is definitely taken care of. Thanks again for all of your work on this! It feels awesome to not have to think about the status of the heat tape throughout the day!
The only issue I've noticed since you fixed the shut off bug is that the snow melt calculation seems a bit off. It was 50F here all day Sunday, and it only calculated about 10mm of melt, when in fact there was closer to 100mm of melt. I don't think this has anything to do with the bug fix, and in fact it may be localized to snow that gets added during the initial install of the app... perhaps it would've calculated less snow accumulation than I entered in initially.
Things brings up another idea for a feature enhancement... Perhaps a "reset snow to 0" button that could be pressed. Currently, the only way to reset the snow is to remove/re-add the app (I think).
I based the snow melt calculations on research I found ( https://directives.sc.egov.usda.gov/OpenNonWebContent.aspx?content=17753.wba) and not experiment. Below is the code that calculates the melt. Maybe we can work out some adjustments based on experiment. Part of what makes this complex is that the density of fallen snow is highly variable. Ideally we'd be able to estimate the density based on conditions when the snow fell. 50F is 10C.
The calculation starts with a baseline "mm/degree-c-per-day" rate, does some (wild guess) adjustments based on rain, wind and sun, then does the calculation per hour.
10C for 24 hours, assuming no other factors should result in: 2.74 * 10 = 27.4mm melt per day. Sounds like you're seeing less than that?
The range listed in the referenced page says 1.6 to 6.0 mm/degree-day C. If it was setup w/ the max rate (and no other factors), we'd see 60mm per day.
Did you experience wind, strong sun, or other factors? Perhaps the wind and sun multipliers are too small. It could be the baseline melt rates are just totally wrong (despite the usda.gov site)!
Here's the code for reference:
// Melt snow!
if (it.temp_c > 0) {
// Based on
http://directives.sc.egov.usda.gov/OpenNonWebContent.aspx?content=17753.wba // Typical values are from 0.035 to 0.13 inches per degree-day // 1.6 to 6.0 mm/degree-day C .. 2.74 mm/degree-day C is often used when other information. float mm_melt_per_degreeC_day = 2.74
// Rain melts snow faster. How fast? add melt for rain
and temp. This is kind of made up. mm_melt_per_degreeC_day += (it.rain_mm * 0.1778) // 0.1778 comes from a conversion in the usda doc.
// Calculate heat from sun. Made up approach.
mm_melt_per_degreeC_day += it.sun_level * 2.0
// Calculate melt increase from wind.
mm_melt_per_degreeC_day += it.wind_kph * 0.008
// Note: Solid/Liquid freezing point for water doesn't
change substantially with altitude.
// This is a daily melt rate but we calculate in hours so convert.
float melt_mm = (mm_melt_per_degreeC_day / 24.0) *
it.temp_c.toFloat() snow_depth -= melt_mm }
// No negative snow level.
// snow_depth = maxFloat(snow_depth, 0.0)
snow_depth = [snow_depth, 0.0].max()
}
FYI, I'm poking around adding some debugging statements into the snow melt calculations. It re-calculates based on the full history and my current version dumps a lot of log output (which isn't guaranteed in order if output in the same second, and gets all mixed up). I'll wrangle with it a bit more and come up with some more useful diagnostics. Maybe I'll add melt and calculated ground snow into the in-app history display.
Eric
On Tue, Jan 23, 2018 at 12:37 PM, dodgeboy notifications@github.com wrote:
The only issue I've noticed since you fixed the shut off bug is that the snow melt calculation seems a bit off. It was 50F here all day Sunday, and it only calculated about 10mm of melt, when in fact there was closer to 100mm of melt. I don't think this has anything to do with the bug fix, and in fact it may be localized to snow that gets added during the initial install of the app... perhaps it would've calculated less snow accumulation than I entered in initially.
Things brings up another idea for a feature enhancement... Perhaps a "reset snow to 0" button that could be pressed. Currently, the only way to reset the snow is to remove/re-add the app (I think).
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/erisod/heattape-smartthings/issues/1#issuecomment-359922245, or mute the thread https://github.com/notifications/unsubscribe-auth/AO5Toi1haQlVEcvVk0na4m8Ww4_5KQtpks5tNkLygaJpZM4Lgfac .
I'm having an issue when the smartapp tries to turn off my switches (that control my heat tape). When the conditions call for it, and the app tries to turn off those switches, the app basically crashes. It no longer updates, and the settings cannot be modified. I have to remove it and re-add it, where it functions normally again until it has to turn off a switch. It then fails to turn off the switches, and stops functioning.
I've looked at the logs, and there is nothing interesting when this occurs. My setup is fairly basic. I am inputting an initial snow amount of 200.0mm, and I have two switches. I have the temp range set from -4 to 2, and I have it running in all modes. It monitors things perfectly, and turns my switches on exactly when I would want it to.
Please let me know how I can get you the information you need to fix it.