Honeywell RTH9580WF Thermostat - Waiting for Update Deep Dive
I'm still having issues with the Honeywell wifi thermostat (RTH9580WF) displaying "waiting for update" on when the wifi is routed through my proxy server, so I decided to do a deep dive into what the thermostat is doing when it's getting the weather updates.
I also wanted to better understand how to trace traffic on my network.
Here's what I learned about the thermostats weather updates system by tracing the communication between the thermostat and servers. Currently:
When the traffic is routed through the squid cache here is what the request and response looks like:
GET /WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
11:26:11.876659 IP 104.209.185.251.80 > 192.168.20.191.30938: tcp 770
HTTP/1.1 400 Bad Request
Server: squid/3.5.11
Mime-Version: 1.0
Date: Sun, 13 Dec 2015 18:26:11 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 2356
X-Squid-Error: ERR_INVALID_REQ 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from trebacz-smoothwall
Via: 1.1 trebacz-smoothwall (squid/3.5.11)
Connection: close
ERROR
GET /WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
Some possible problems are:
Missing or unknown request method.
Missing URL.
Missing HTTP Identifier (HTTP/1.0).
Request is too large.
Content-Length missing for POST or PUT requests.
Illegal character in hostname; underscores are not allowed.
HTTP/1.1
Still not exactly sure what is causing squid to puke on the request, but I understand a lot better what is going on behind the scenes and learned a lot about tcpdump on Linux.
Resources:
http://blog.trebacz.com/2014/12/outdoor-temperature-waiting-for-update-honeywell-wifi-hermostat-RTH9580WF.html - Original Problem Post
I also wanted to better understand how to trace traffic on my network.
Here's what I learned about the thermostats weather updates system by tracing the communication between the thermostat and servers. Currently:
- Thermostat requests the current weather and 12 hour forecast from a server: http://104.209.185.251. This server appears to run code managed by Honeywell in Microsoft's Azure cloud.
- Every 15 minutes it makes two port 80 GET requests to the IP address:
- http://104.209.185.251/WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC (return current weather for location)
- http://104.209.185.251//WeatherAPIProd/api/weather/forecasts/hourly/12hour?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC (returns
- The Honeywell API is somewhat documented here: http://lyric.alarmnet.com/Help or http://104.209.185.251/Help
- The appKey (b9db7a3d469892e8) is the same for both thermostats I have and I assume is always the same for this termostat
- The locationKey (36691_PC) is my physical location encoded by the thermostat software based on my address
- The thermostat gets the current weather and 12 hour forecast, but only seems to use the current weather on the thermostat display
- Current weather is returned in Celsius and then converted by the thermostat software
I got this information by tracing the packets to and from the thermostat using the command:
tcpdump -i eth2 -n src 192.168.20.191 and port 80 or dst 192.168.20.191 -w Honeywell.pcap
I then inspected the file using tcpdump
tcpdump -qns 0 -A -r Honeywell.pcap
Below is the relevant request and the responses from the Honeywell server pulled for the tcpdump log when the squid cache wasn't enabled:
GET /WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
10:56:12.019826 IP 104.209.185.251.80 > 192.168.20.191.30934: tcp 458
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 180
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Sun, 13 Dec 2015 17:56:11 GMT
Connection: close
{
"currentWeather": {
"dateTime": "2015-12-13T10:20:00-07:00",
"weatherIcon": 1,
"iconText": "Sunny",
"temperature": 8.1,
"relativeHumidity": 68
}
}
GET /WeatherAPIProd/api/weather/forecasts/hourly/12hour?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
10:56:12.254178 IP 104.209.185.251.80 >192.168.20.191.30935: tcp 1460
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 2228
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Sun, 13 Dec 2015 17:56:11 GMT
Connection: close
{
"forecastWeather": [
{
"dateTime": "2015-12-13T11:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 9.9,
"relativeHumidity": 49
},
{
"dateTime": "2015-12-13T12:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 11.6,
"relativeHumidity": 43
},
{
"dateTime": "2015-12-13T13:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 12.5,
"relativeHumidity": 37
},
{
"dateTime": "2015-12-13T14:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 13.3,
"relativeHumidity": 33
},
{
"dateTime": "2015-12-13T15:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 13.7,
"relativeHumidity": 31
},
{
"dateTime": "2015-12-13T16:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 13.2,
"relativeHumidity": 32
},
{
"dateTime": "2015-12-13T17:00:00-07:00",
"weatherIcon": 2,
"iconPhrase": "Mostly sunny",
"temperature": 12.2,
"relativeHumidity": 35
},
{
"dateTime": "2015-12-13T18:00:00-07:00",
"weatherIcon": 34,
"iconPhrase": "Mostly clear",
"temperature": 10.7,
"relativeHumidity": 42
},
{
"dateTime": "2015-12-13T19:00:00-07:00",
"weatherIcon": 34,
"iconPhrase": "Mostly clear",
"temperature": 9.1,
"relativeHumidity": 51
},
{
"dateTime": "2015-12-13T20:00:00-07:00",
"weatherIcon": 34,
"iconPhrase": "Mostly clear",
"temperature": 7.5,
"relativeHumidity": 59
},
{
"dateTime": "2015-12-13T21:00:00-07:00",
"weatherIcon": 34,
"iconPhrase": "Mostly clear",
"temperature": 6.2,
"relativeHumidity": 67
},
},
{
"dateTime": "2015-12-13T22:00:00-07:00",
"weatherIcon": 34,
"iconPhrase": "Mostly clear",
"temperature": 5.7,
"relativeHumidity": 75
}
]
}
GET /WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
11:26:11.876659 IP 104.209.185.251.80 > 192.168.20.191.30938: tcp 770
HTTP/1.1 400 Bad Request
Server: squid/3.5.11
Mime-Version: 1.0
Date: Sun, 13 Dec 2015 18:26:11 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 2356
X-Squid-Error: ERR_INVALID_REQ 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from trebacz-smoothwall
Via: 1.1 trebacz-smoothwall (squid/3.5.11)
Connection: close
ERROR
The requested URL could not be retrieved
Invalid Request error was encountered while trying to process the request:GET /WeatherAPIProd/api/weather/current?appKey=b9db7a3d469892e8&language=en-us&locationKey=36691_PC HTTP/1.0
Some possible problems are:
Expect:feature is being asked from an HTTP/1.0 software.
Resources:
http://blog.trebacz.com/2014/12/outdoor-temperature-waiting-for-update-honeywell-wifi-hermostat-RTH9580WF.html - Original Problem Post
I have replaced my thermostat recently, and I did it after comparing the available options, so I tried to read thermostat reviews. I liked gaining complete information by visiting Mythermostatreviews.com so I would suggest all friends to check it out before installing a new thermostat.
ReplyDelete