<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Node &#8211; WiredPrairie</title>
	<atom:link href="blog/archives/tag/node/feed" rel="self" type="application/rss+xml" />
	<link>/blog</link>
	<description>Yet another tech blog.</description>
	<lastBuildDate>Sat, 07 Dec 2013 02:44:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0</generator>
<site xmlns="com-wordpress:feed-additions:1">193486638</site>	<item>
		<title>How to list all dependents of a Node package</title>
		<link>/blog/index.php/archives/1990</link>
		
		<dc:creator><![CDATA[Aaron]]></dc:creator>
		<pubDate>Sat, 07 Dec 2013 02:44:34 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[NodeJs]]></category>
		<category><![CDATA[npm]]></category>
		<guid isPermaLink="false">/blog/?p=1990</guid>

					<description><![CDATA[You can use the web npm web site as it lists the dependents for any given package. Like coffee-script for example: http://npmjs.org/browse/depended/coffee-script Or, you could get JSON results for the same query (using curl) (just substitute the name of the package with &#34;sql&#34; in the example: &#62; curl -g 'http://registry.npmjs.org/-/_view/dependedUpon?group_level=2&#38;startkey=[&#34;sql&#34;]&#38;endkey=[&#34;sql&#34;,&#34;ZZZZZZZZZZZZZ&#34;]&#38;skip=0&#38;limit=1000' Results: {&#34;rows&#34;:[ {&#34;key&#34;:[&#34;sql&#34;,&#34;anydb-sql&#34;],&#34;value&#34;:1}, {&#34;key&#34;:[&#34;sql&#34;,&#34;dbal&#34;],&#34;value&#34;:1}, {&#34;key&#34;:[&#34;sql&#34;,&#34;ectypes-downstairs&#34;],&#34;value&#34;:1}, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>You can use the web npm web site as it lists the dependents for any given package. </p>
<p>Like coffee-script for example:</p>
<pre><code>http://npmjs.org/browse/depended/coffee-script</code></pre>
<p>Or, you could get JSON results for the same query (using <code>curl</code>) (just substitute the name of the package with &quot;sql&quot; in the example:</p>
<pre><code>&gt; curl -g 'http://registry.npmjs.org/-/_view/dependedUpon?group_level=2&amp;startkey=[&quot;sql&quot;]&amp;endkey=[&quot;sql&quot;,&quot;ZZZZZZZZZZZZZ&quot;]&amp;skip=0&amp;limit=1000'</code></pre>
<p>Results:</p>
<pre><code>{&quot;rows&quot;:[
{&quot;key&quot;:[&quot;sql&quot;,&quot;anydb-sql&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;dbal&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;ectypes-downstairs&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;fixr&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;fixr-compiled&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;forerunner-postgres-store&quot;],&quot;value&quot;:1}
{&quot;key&quot;:[&quot;sql&quot;,&quot;pg-dal&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;relational&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;sequelize&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;sql-generate&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;sqlbox&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;triplie&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;voltron-postgres-adapter&quot;],&quot;value&quot;:1},
{&quot;key&quot;:[&quot;sql&quot;,&quot;worm&quot;],&quot;value&quot;:1}
]}</code></pre>
<p>The second value in the key array is the name of the package dependent on the <code>sql</code> package.</p>
<p>This of course only will find other published packages, and doesn&#8217;t help find applications, etc. that are using a specific package.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1990</post-id>	</item>
		<item>
		<title>Loading Models in NodeJS</title>
		<link>/blog/index.php/archives/1974</link>
		
		<dc:creator><![CDATA[Aaron]]></dc:creator>
		<pubDate>Mon, 02 Dec 2013 13:40:07 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[NodeJs]]></category>
		<category><![CDATA[npm]]></category>
		<guid isPermaLink="false">/blog/?p=1974</guid>

					<description><![CDATA[I’d answered a question on StackOverflow about where to put “models” in a NodeJS project. I wanted to elaborate on the simple auto loader I use to load a folder full of models (and I use this pattern other places as well). Normally, I create a folder called models: Inside the Models folder, I have [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I’d <a href="http://stackoverflow.com/a/20327684/95190" target="_blank">answered a question</a> on StackOverflow about where to put “models” in a NodeJS project. I wanted to elaborate on the simple auto loader I use to load a folder full of models (and I use this pattern other places as well). Normally, I create a folder called <strong>models</strong>:</p>
<p><a href="blog/wpcontent/uploads/2013/12/image.png"><img loading="lazy" title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; border-left: 0px; display: block; padding-right: 0px" border="0" alt="image" src="blog/wpcontent/uploads/2013/12/image_thumb.png" width="182" height="293" /></a></p>
<p>Inside the Models folder, I have a file called, <strong>models.js</strong>. </p>
<p>Inside another module (like <strong>app.js</strong>), I’ve got a line of code that looks like this:</p>
<pre class="csharpcode">
<span class="kwrd">var</span> models = require(<span class="str">'./models'</span>).initialize(app, services);</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>While the <strong>require</strong> (<a href="http://nodejs.org/api/all.html#all_require" target="_blank">reference</a>) by default looks for a file called <strong>index.js</strong> in the folder <strong>models</strong>, I’ve in this case added a simple <strong>package.json </strong>file with an override:</p>
<pre class="csharpcode">{
    <span class="str">&quot;main&quot;</span>: <span class="str">&quot;./models.js&quot;</span>
}</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>The reason I do this is that in a tabbed source code editor, having several <strong>index.js</strong> files can be confusing to see. So, this allows me to name the file something that is more memorable and understandable at a glance. </p>
<p>Inside of the <strong>models.js</strong> class, I’ve written code to automatically load all of the models (and call an <strong>initialize </strong>function once for each module):</p>
<pre class="csharpcode"><span class="kwrd">var</span> initialize = <span class="kwrd">function</span>(app, services) {
    <span class="kwrd">var</span> models = {};
    <span class="kwrd">var</span> currentFile = path.basename(__filename); <span class="rem">// just file name</span>
    <span class="kwrd">var</span> modelFiles = fs.readdirSync(__dirname);
    <span class="rem">// loop through all of the files in the current directory</span>
    <span class="kwrd">for</span>(<span class="kwrd">var</span> i= 0, len = modelFiles.length; i &lt; len; i++) {
        <span class="rem">// ignore this file (via global NodeJS variable)</span>
        <span class="kwrd">if</span>(modelFiles[i] === currentFile ||
            path.extname(modelFiles[i]).toLowerCase() !== <span class="str">'.js'</span>) {
            <span class="kwrd">continue</span>;  <span class="rem">// skip the current file and anything without a &quot;JS&quot; extension</span>
        }
        <span class="rem">// require it</span>
        <span class="kwrd">var</span> model = require(path.join(__dirname, modelFiles[i]));
        <span class="rem">// call its intialize</span>
        model.initialize(services, models);
    }
    exports.models = models;
    <span class="kwrd">return</span> models;
};

exports.initialize = initialize;</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>The logic is simple enough – grab all of the files in the current path, then loop through each, filtering the current file and any that don’t end with “js”. This logic could be adjusted of course to reflect other coding styles and requirements.</p>
<p>Finally, each module is loaded and then an initialize method is called (admittedly, I could make it more robust by checking for the existence of the <strong>initialize</strong> function before calling it (but in this case, I know each module should be initialized in a particular way).</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1974</post-id>	</item>
		<item>
		<title>Added Away/Home to unofficial-nest-api</title>
		<link>/blog/index.php/archives/1788</link>
		
		<dc:creator><![CDATA[Aaron]]></dc:creator>
		<pubDate>Sun, 30 Dec 2012 23:13:00 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Nest]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[Thermostat]]></category>
		<guid isPermaLink="false">/blog/?p=1788</guid>

					<description><![CDATA[I just finished adding a new simple feature to control the away status for a structure to my unofficial-nest-api published on GitHub and available as a node package (npm). Usage is simple as calling setAway or setHome on the nest instance after authentication and a successful status has been returned (see commented calls below). [javascript] [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I just finished adding a new simple feature to control the away status for a structure to my unofficial-nest-api published on <a href="https://github.com/wiredprairie/unofficial_nodejs_nest">GitHub</a> and available as a node package (<a href="https://npmjs.org/package/unofficial-nest-api">npm</a>).</p>
<p>Usage is simple as calling <strong>setAway </strong>or <strong>setHome</strong> on the nest instance after authentication and a successful status has been returned (see commented calls below).</p>
<p>[javascript]<br />
if (username &amp;&amp; password) {<br />
    username = trimQuotes(username);<br />
    password = trimQuotes(password);<br />
    nest.login(username, password, function (data) {<br />
        if (!data) {<br />
            console.log(&#8216;Login failed.&#8217;);<br />
            process.exit(1);<br />
            return;<br />
        }<br />
        console.log(&#8216;Logged in.&#8217;);<br />
        nest.fetchStatus(function (data) {<br />
            for (var deviceId in data.device) {<br />
                if (data.device.hasOwnProperty(deviceId)) {<br />
                    var device = data.shared[deviceId];<br />
                    console.log(util.format(&quot;%s [%s], Current temperature = %d F target=%d&quot;,<br />
                        device.name, deviceId,<br />
                        nest.ctof(device.current_temperature),<br />
                        nest.ctof(device.target_temperature)));<br />
                }<br />
            }<br />
            subscribe();<br />
            //nest.setAway();<br />
            //nest.setHome();<br />
        });<br />
    });<br />
}<br />
[/javascript]</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1788</post-id>	</item>
		<item>
		<title>Unofficial Nest API for Node JS as an NPM</title>
		<link>/blog/index.php/archives/1784</link>
		
		<dc:creator><![CDATA[Aaron]]></dc:creator>
		<pubDate>Fri, 21 Dec 2012 01:54:36 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Nest]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[Thermostat]]></category>
		<guid isPermaLink="false">/blog/?p=1784</guid>

					<description><![CDATA[Per the request of an anonymous user on Bitbucket, I have: Moved the code for the Nest API to GitHub. While I did have a preference for Bitbucket (free private hosting!!!), I moved it anyway. I also created an npm called the unofficial-nest-api. Enjoy.]]></description>
										<content:encoded><![CDATA[<p>Per the request of an anonymous user on Bitbucket, I have:</p>
<p>Moved the code for the Nest API to <a href="https://github.com/wiredprairie/unofficial_nodejs_nest">GitHub</a>. While I did have a preference for Bitbucket (free private hosting!!!), I moved it anyway. <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="blog/wpcontent/uploads/2012/12/wlEmoticon-smile.png" /></p>
<p>I also created an npm called the <strong><a href="https://npmjs.org/package/unofficial-nest-api">unofficial-nest-api</a>.</strong></p>
<p>Enjoy.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1784</post-id>	</item>
		<item>
		<title>Nest Thermostat API using Node JS and Nest API Update</title>
		<link>/blog/index.php/archives/1754</link>
					<comments>/blog/index.php/archives/1754#comments</comments>
		
		<dc:creator><![CDATA[Aaron]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 01:28:38 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Nest]]></category>
		<category><![CDATA[Node]]></category>
		<guid isPermaLink="false">/blog/?p=1754</guid>

					<description><![CDATA[I’ve been asked by a few people for more details on the API Nest Labs uses for their thermostats, especially regarding setting data (and not just polling). The API uses mostly JSON formatted data POSTed to their web servers. Authentication To authenticate, POST the username and password, encoded as form url-encoded: POST https://home.nest.com/user/login HTTP/1.1 Host: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I’ve been asked by a few people for more details on the API Nest Labs uses for their thermostats, especially regarding setting data (and not just polling).</p>
<p>The API uses mostly JSON formatted data POSTed to their web servers.</p>
<h2>Authentication</h2>
<p>To authenticate, POST the username and password, encoded as form url-encoded:</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">POST https:<span style="color: #008000">//home.nest.com/user/login HTTP/1.1</span>
Host: home.nest.com
Proxy-Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Accept-Language: en-us
Content-Length: {Length}
Accept: */*
Connection: keep-alive
User-Agent: Nest/3.0.1.15 (iOS) os=6.0 platform=iPad3,1

username={email}&amp;password={password}</pre>
</div>
<p>Adjust the email and password, and the content length to fit. You may need to remove the Accept-Encoding header value if your client cannot accept gzip or deflated responses.</p>
<p>The server responds with a healthy set of basic information (in JSON format):</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">{
    <span style="color: #006080">&quot;is_superuser&quot;</span>: <span style="color: #0000ff">false</span>,
    <span style="color: #006080">&quot;is_staff&quot;</span>: <span style="color: #0000ff">false</span>,
    <span style="color: #006080">&quot;urls&quot;</span>: {
        <span style="color: #006080">&quot;transport_url&quot;</span>: <span style="color: #006080">&quot;</span>,
        <span style="color: #006080">&quot;rubyapi_url&quot;</span>: <span style="color: #006080">&quot;https://home.nest.com/&quot;</span>,
        <span style="color: #006080">&quot;weather_url&quot;</span>: <span style="color: #006080">&quot;http://www.wunderground.com/auto/nestlabs/geo/current/i?query=&quot;</span>,
        <span style="color: #006080">&quot;support_url&quot;</span>: <span style="color: #006080">&quot;https://nest.secure.force.com/support/webapp?&quot;</span>
    },
    <span style="color: #006080">&quot;limits&quot;</span>: {
        <span style="color: #006080">&quot;thermostats_per_structure&quot;</span>: 10,
        <span style="color: #006080">&quot;structures&quot;</span>: 2,
        <span style="color: #006080">&quot;thermostats&quot;</span>: 10
    },
    <span style="color: #006080">&quot;access_token&quot;</span>: <span style="color: #006080">&quot;GIANT TOKEN STRING==&quot;</span>,
    <span style="color: #006080">&quot;userid&quot;</span>: <span style="color: #006080">&quot;1234&quot;</span>,
    <span style="color: #006080">&quot;expires_in&quot;</span>: <span style="color: #006080">&quot;Wed, 07-Oct-2012 12:08:00 GMT&quot;</span>,
    <span style="color: #006080">&quot;email&quot;</span>: <span style="color: #006080">&quot;user@example.com&quot;</span>,
    <span style="color: #006080">&quot;user&quot;</span>: <span style="color: #006080">&quot;user.1234&quot;</span>
}</pre>
</div>
<p>There are a few things you’ll need from the response:</p>
<ul>
<li><strong>transport_url</strong> : this is the address for all of the later request that are made. I’d speculate it’s just a specific server in a server farm (likely with server affinity/session) </li>
<li><strong>access_token</strong> : this is the key for all later requests and grants access to the API </li>
<li><strong>userid/user </strong>: a unique user ID </li>
<li><strong>expires_in</strong> : this is the timestamp for when the access token expires </li>
</ul>
<p>I’m not sure why the “limits” are being sent back to the client.</p>
<p>You can obtain the service URLs at any time:</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">POST https:<span style="color: #008000">//home.nest.com/user/service_urls HTTP/1.1</span>
Host: home.nest.com
Authorization: Basic GIANT TOKEN STRING==
Accept-Encoding: gzip, deflate
Accept: */*
Content-Length: 0
Accept-Language: en-us
Connection: keep-alive
Proxy-Connection: keep-alive
User-Agent: Nest/3.0.1.15 (iOS) os=6.0 platform=iPad3,1</pre>
</div>
<p>Just insert an Authorization header with the <strong>access_token</strong> value.</p>
<p>The response:</p>
<pre class="code"><span style="background: white; color: black">{ </span><span style="background: white; color: #a31515">&quot;urls&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;transport_url&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;rubyapi_url&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;https://home.nest.com/&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;weather_url&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;http://www.wunderground.com/auto/nestlabs/geo/current/i?query=&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;support_url&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;https://nest.secure.force.com/support/webapp?&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;limits&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;thermostats_per_structure&quot;</span><span style="background: white; color: black">: 10, </span><span style="background: white; color: #a31515">&quot;structures&quot;</span><span style="background: white; color: black">: 2, </span><span style="background: white; color: #a31515">&quot;thermostats&quot;</span><span style="background: white; color: black">: 10 } }</span></pre>
<p>Nest labs has a special URL at wunderground.com to access the weather.</p>
<p>One of the first requests you might want to send is to get a <strong>complete</strong> picture of the system:</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">GET https:<span style="color: #008000">//{subdomain}.transport.nest.com:443/v2/mobile/#USER.ID# HTTP/1.1</span>
Host: {subdomain}.transport.nest.com:443
Authorization: Basic GIANT TOKEN STRING==
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Connection: keep-alive
X-nl-protocol-version: 1
X-nl-user-id: #USERID#
Proxy-Connection: keep-alive
User-Agent: Nest/3.0.1.15 (iOS) os=6.0 platform=iPad3,1</pre>
</div>
<p>You’ll make the request to the <strong>transport_url</strong> and make sure that the Host, Authorization, and X-nl-user-id header values are set appropriately. The Url now must include though:</p>
<ul>
<li>version </li>
<li>mobile </li>
<li>and the full user id (like user.1234) </li>
</ul>
<p>So, it will look something like: <strong>/v2/mobile/user.1234</strong></p>
<p>It will respond with the mother-load of all JSON payloads. I’ve trimmed the response for my house as I have three thermostats. But the pattern repeats exactly, so it’s easy to extrapolate how the pattern works:</p>
<pre class="code" style="max-height: 800px"><span style="background: white; color: black">{ </span><span style="background: white; color: #a31515">&quot;metadata&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1262653277, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349697004000, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349697004683, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1868790132, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696678000, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349696678701, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1581663504, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696680000, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349696680647, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;track&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 1065037529, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696725390, </span><span style="background: white; color: #a31515">&quot;online&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349696725390, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 981680556, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696726266, </span><span style="background: white; color: #a31515">&quot;online&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349696726266, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 1421919505, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349697004728, </span><span style="background: white; color: #a31515">&quot;online&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;last_connection&quot;</span><span style="background: white; color: black">: 1349697004728, </span><span style="background: white; color: #a31515">&quot;last_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LAST.IP.ADDRESS&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;user_settings&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;#USERID#&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 370836640, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1337481029003, </span><span style="background: white; color: #a31515">&quot;email_verified&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;tos_accepted_version&quot;</span><span style="background: white; color: black">: 1319500800000, </span><span style="background: white; color: #a31515">&quot;receive_marketing_emails&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;receive_nest_emails&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;receive_support_emails&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;max_structures&quot;</span><span style="background: white; color: black">: 2, </span><span style="background: white; color: #a31515">&quot;max_thermostats&quot;</span><span style="background: white; color: black">: 10, </span><span style="background: white; color: #a31515">&quot;max_thermostats_per_structure&quot;</span><span style="background: white; color: black">: 10, </span><span style="background: white; color: #a31515">&quot;tos_minimum_version&quot;</span><span style="background: white; color: black">: 1319500800000, </span><span style="background: white; color: #a31515">&quot;tos_current_version&quot;</span><span style="background: white; color: black">: 1319500800000, </span><span style="background: white; color: #a31515">&quot;lang&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;en_US&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;structure&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;#STRUCTURE-UUID#&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 1797929878, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349689810000, </span><span style="background: white; color: #a31515">&quot;location&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Mount Horeb, WI&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;renovation_date&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;2000&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;country_code&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;US&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;away_timestamp&quot;</span><span style="background: white; color: black">: 1349302501, </span><span style="background: white; color: #a31515">&quot;away&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;house_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;family&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Home&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;postal_code&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;#POSTALCODE#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;creation_time&quot;</span><span style="background: white; color: black">: 1324159145719, </span><span style="background: white; color: #a31515">&quot;num_thermostats&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;devices&quot;</span><span style="background: white; color: black">: [</span><span style="background: white; color: #a31515">&quot;device.SERIALNUM3&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;device.SERIALNUM1&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;device.SERIALNUM2&quot;</span><span style="background: white; color: black">], </span><span style="background: white; color: #a31515">&quot;user&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;user.#USERID#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;away_setter&quot;</span><span style="background: white; color: black">: 1 } }, </span><span style="background: white; color: #a31515">&quot;link&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 2122853931, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1327246591000, </span><span style="background: white; color: #a31515">&quot;structure&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;structure.#STRUCTURE-UUID#&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1703839727, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1324159215000, </span><span style="background: white; color: #a31515">&quot;structure&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;structure.#STRUCTURE-UUID#&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -459415854, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1325967612000, </span><span style="background: white; color: #a31515">&quot;structure&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;structure.#STRUCTURE-UUID#&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;device&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -81037153, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696605000, </span><span style="background: white; color: #a31515">&quot;heatpump_setback_active&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;emer_heat_enable&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;local_ip&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;LOCAL.IP.ADDRESS&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;switch_system_off&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;away_temperature_high&quot;</span><span style="background: white; color: black">: 27.778, </span><span style="background: white; color: #a31515">&quot;temperature_lock_high_temp&quot;</span><span style="background: white; color: black">: 22.222, </span><span style="background: white; color: #a31515">&quot;cooling_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;electric&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_threshold_cool&quot;</span><span style="background: white; color: black">: 0.0, </span><span style="background: white; color: #a31515">&quot;fan_cooling_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;note_codes&quot;</span><span style="background: white; color: black">: [], </span><span style="background: white; color: #a31515">&quot;heater_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;compressor_lockout_leaf&quot;</span><span style="background: white; color: black">: -17.8, </span><span style="background: white; color: #a31515">&quot;has_x3_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_humidity_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_x3_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;alt_heat_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;fan_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;auto&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_x2_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;rssi&quot;</span><span style="background: white; color: black">: 67.0, </span><span style="background: white; color: #a31515">&quot;emer_heat_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heatpump_savings&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;off&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_y2_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;filter_reminder_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;capability_level&quot;</span><span style="background: white; color: black">: 3.0, </span><span style="background: white; color: #a31515">&quot;schedule_learning_reset&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_x2_cool&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_pins&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;W1,Y1,C,Rc,G&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;ob_orientation&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;O&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;range_enable&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;auto_away_enable&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;dual_fuel_breakpoint_override&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;lower_safety_temp_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_fan&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;dehumidifier_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;range_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;nlclient_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;emer_heat_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;electric&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heatpump_ready&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;available_locales&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;en_US,fr_CA,es_US&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;current_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;3.0.1&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;learning_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;slow&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_ob_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_rh_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_alt_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_y1_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;cool&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;humidifier_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;backplate_serial_number&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;#BACKPLATE-SERIALNUMBER1#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_x2_alt_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_x3_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_threshold_heat&quot;</span><span style="background: white; color: black">: 19.336, </span><span style="background: white; color: #a31515">&quot;has_emer_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;learning_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_learning&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;ready&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_aux_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;aux_heat_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;electric&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;backplate_bsl_info&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;BSL&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;alt_heat_x2_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_c_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;power&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;humidifier_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;unknown&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_w2aux_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;country_code&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;US&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_humidity&quot;</span><span style="background: white; color: black">: 35.0, </span><span style="background: white; color: #a31515">&quot;heat_x2_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;lower_safety_temp&quot;</span><span style="background: white; color: black">: 4.444, </span><span style="background: white; color: #a31515">&quot;cooling_x2_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;electric&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;equipment_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_aux_threshold&quot;</span><span style="background: white; color: black">: 10.0, </span><span style="background: white; color: #a31515">&quot;alt_heat_x2_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_comp_threshold&quot;</span><span style="background: white; color: black">: -31.5, </span><span style="background: white; color: #a31515">&quot;learning_days_completed_cool&quot;</span><span style="background: white; color: black">: 116, </span><span style="background: white; color: #a31515">&quot;backplate_bsl_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;1.1&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;current_schedule_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_wires&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Heat,Cool,Fan,Common Wire,Rc&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;TBD&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;pin_g_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;fan&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;switch_preconditioning_control&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;click_sound&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;on&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;aux_heat_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;away_temperature_low_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_comp_threshold_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;preconditioning_ready&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_dehumidifier&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;fan_cooling_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_away_high&quot;</span><span style="background: white; color: black">: 28.88, </span><span style="background: white; color: #a31515">&quot;fan_cooling_readiness&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;ready&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;device_locale&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;en_US&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temperature_scale&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;F&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;error_code&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;preconditioning_active&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;battery_level&quot;</span><span style="background: white; color: black">: 3.93, </span><span style="background: white; color: #a31515">&quot;away_temperature_high_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;learning_days_completed_heat&quot;</span><span style="background: white; color: black">: 149, </span><span style="background: white; color: #a31515">&quot;pin_star_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;none&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;upper_safety_temp_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;preconditioning_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;current_humidity&quot;</span><span style="background: white; color: black">: 45, </span><span style="background: white; color: #a31515">&quot;dual_fuel_breakpoint&quot;</span><span style="background: white; color: black">: -1.0, </span><span style="background: white; color: #a31515">&quot;postal_code&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;#POSTALCODE#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;backplate_mono_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;4.0.5&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;alt_heat_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;aux_lockout_leaf&quot;</span><span style="background: white; color: black">: 10.0, </span><span style="background: white; color: #a31515">&quot;has_heat_pump&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heater_delivery&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;forced-air&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;auto_away_reset&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;away_temperature_low&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;radiant_control_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temperature_lock&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;upper_safety_temp&quot;</span><span style="background: white; color: black">: 35.0, </span><span style="background: white; color: #a31515">&quot;time_to_target_training&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;ready&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;dehumidifier_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;unknown&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_time_confidence&quot;</span><span style="background: white; color: black">: 1.0, </span><span style="background: white; color: #a31515">&quot;temperature_lock_low_temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;pin_w1_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;heat&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;forced_air&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temperature_lock_pin_hash&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_type&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;backplate_mono_info&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;TFE (BP_DVT) 4.0.5 (root@bamboo) 2012-09-18 18:18:23&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;has_dual_fuel&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;learning_time&quot;</span><span style="background: white; color: black">: 2113, </span><span style="background: white; color: #a31515">&quot;creation_time&quot;</span><span style="background: white; color: black">: 1325966794212, </span><span style="background: white; color: #a31515">&quot;has_humidifier&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;learning_days_completed_range&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;leaf_schedule_delta&quot;</span><span style="background: white; color: black">: 1.11, </span><span style="background: white; color: #a31515">&quot;user_brightness&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;auto&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;leaf_away_low&quot;</span><span style="background: white; color: black">: 13.92, </span><span style="background: white; color: #a31515">&quot;pin_rc_description&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;power&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;serial_number&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;mac_address&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;18b43004f391&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_x2_source&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;gas&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;time_to_target&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;backplate_model&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Backplate-1.9&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;model_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Diamond-1.10&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_aux_threshold_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 2134103145, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349695665000, </span><span style="background: white; color: green">/* same as previous */ </span><span style="background: white; color: #a31515">&quot;backplate_model&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Backplate-1.9&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;model_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Diamond-1.10&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_aux_threshold_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1340728480, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349692217000, </span><span style="background: white; color: green">/* same as previous */ </span><span style="background: white; color: #a31515">&quot;backplate_model&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Backplate-1.9&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;model_version&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Diamond-1.10&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;heat_pump_aux_threshold_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;schedule&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1130522241, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349692663000, </span><span style="background: white; color: #a31515">&quot;days&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 74700, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 23400, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 19800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 78300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 74700, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 23400, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 19800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 78300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 74700, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 23400, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 19800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 78300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 74700, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 23400, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 19800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 78300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;6&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 67500, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 18.333, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 28800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 24300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 75600, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;5&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 67500, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 18.333, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 28800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 24300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 75600, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 74700, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 23400, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 19800, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 17.222, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;0&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;touched_by&quot;</span><span style="background: white; color: black">: 1, </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;touched_tzo&quot;</span><span style="background: white; color: black">: -18000, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;continuation&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;touched_at&quot;</span><span style="background: white; color: black">: 1349285499 }, </span><span style="background: white; color: #a31515">&quot;4&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;time&quot;</span><span style="background: white; color: black">: 78300, </span><span style="background: white; color: #a31515">&quot;entry_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;setpoint&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;temp&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot; </span><span style="background: white; color: black">} } }, </span><span style="background: white; color: #a31515">&quot;schedule_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Basement Current Schedule&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;ver&quot;</span><span style="background: white; color: black">: 2 }, </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -462155699, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349674697000, </span><span style="background: white; color: #a31515">&quot;days&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: green">/* SAME AS ABOVE */ </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;schedule_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Second Floor Current Schedule&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;ver&quot;</span><span style="background: white; color: black">: 2 }, </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 2014520777, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349695806000, </span><span style="background: white; color: #a31515">&quot;days&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: green">/* SAME AS ABOVE */ </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;schedule_mode&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;HEAT&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;First Floor Current Schedule&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;ver&quot;</span><span style="background: white; color: black">: 2 } }, </span><span style="background: white; color: #a31515">&quot;shared&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;SERIALNUM3&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -493517056, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696367000, </span><span style="background: white; color: #a31515">&quot;auto_away&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;auto_away_learning&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;training&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_heat_x3_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_alt_heat_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;compressor_lockout_enabled&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_temperature_type&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;heat&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_heater_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_emer_heat_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;can_heat&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;compressor_lockout_timeout&quot;</span><span style="background: white; color: black">: 0, </span><span style="background: white; color: #a31515">&quot;hvac_cool_x2_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_temperature_high&quot;</span><span style="background: white; color: black">: 24.0, </span><span style="background: white; color: #a31515">&quot;hvac_aux_heater_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_heat_x2_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_temperature_low&quot;</span><span style="background: white; color: black">: 20.0, </span><span style="background: white; color: #a31515">&quot;target_temperature&quot;</span><span style="background: white; color: black">: 14.444, </span><span style="background: white; color: #a31515">&quot;hvac_ac_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;hvac_fan_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;target_change_pending&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;Basement&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;current_temperature&quot;</span><span style="background: white; color: black">: 18.11, </span><span style="background: white; color: #a31515">&quot;hvac_alt_heat_x2_state&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;can_cool&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: blue">true </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM1&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1432433268, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696363000 </span><span style="background: white; color: green">/* SAME AS ABOVE */ </span><span style="background: white; color: black">}, </span><span style="background: white; color: #a31515">&quot;SERIALNUM2&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 2060664119, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1349696709000 </span><span style="background: white; color: green">/* SAME AS ABOVE */ </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;user_alert_dialog&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;#USERID#&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: -1852987123, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1327246591000, </span><span style="background: white; color: #a31515">&quot;dialog_data&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;dialog_id&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;confirm-pairing&quot; </span><span style="background: white; color: black">} }, </span><span style="background: white; color: #a31515">&quot;user&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;#USERID#&quot;</span><span style="background: white; color: black">: { </span><span style="background: white; color: #a31515">&quot;$version&quot;</span><span style="background: white; color: black">: 209478897, </span><span style="background: white; color: #a31515">&quot;$timestamp&quot;</span><span style="background: white; color: black">: 1324159145000, </span><span style="background: white; color: #a31515">&quot;name&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;EMAILADDRESS&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;structures&quot;</span><span style="background: white; color: black">: [</span><span style="background: white; color: #a31515">&quot;structure.#STRUCTURE-UUID#&quot;</span><span style="background: white; color: black">] } } }</span></pre>
<h2>Setting a Temperature</h2>
<p>Changing a thermostat’s current set point is easy.</p>
<p>You’ll need the Serial Number (shown as SERIALNUM1 in the JSON above) of the thermostat.</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">POST https:<span style="color: #008000">//275be85a.transport.nest.com:443/v2/put/shared.01AA01AB4611009P HTTP/1.1</span>
Host: 275be85a.transport.nest.com:443
Accept-Language: en-us
User-Agent: Nest/3.0.1.15 (iOS) os=6.0 platform=iPad3,1
X-nl-<span style="color: #0000ff">base</span>-version: 2060664119
Accept: */*
Content-Type: application/json
X-nl-protocol-version: 1
X-nl-user-id: 7236
X-nl-session-id: ios-7236-371385438.528577
Connection: keep-alive
X-nl-merge-payload: <span style="color: #0000ff">true</span>
Authorization: Basic GIANT TOKEN STRING==
Content-Length: 60
Proxy-Connection: keep-alive
Accept-Encoding: gzip, deflate

{<span style="color: #006080">&quot;target_change_pending&quot;</span>:<span style="color: #0000ff">true</span>,<span style="color: #006080">&quot;target_temperature&quot;</span>:16.11111}</pre>
</div>
<p>Set the temperature in Celsius.</p>
<p>There’s also a polling subscription that happens. It’s extremely chatty and from the amount of polling it does, you’d think that the UI was doing live graphing of micro-temperature changes.</p>
<p>Essentially, the polling sends a series of keys, with timestamps, representing the various types of data being requested.</p>
<p>It looks something like this:</p>
<pre class="code"><span style="background: white; color: black">{ </span><span style="background: white; color: #a31515">&quot;keys&quot;</span><span style="background: white; color: black">: [{ </span><span style="background: white; color: #a31515">&quot;key&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;user.#USERID#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;version&quot;</span><span style="background: white; color: black">: 209478897, </span><span style="background: white; color: #a31515">&quot;timestamp&quot;</span><span style="background: white; color: black">: 1324159145000 }, { </span><span style="background: white; color: #a31515">&quot;key&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;user_settings.#USERID#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;version&quot;</span><span style="background: white; color: black">: 370836640, </span><span style="background: white; color: #a31515">&quot;timestamp&quot;</span><span style="background: white; color: black">: 1337481029003 }, { </span><span style="background: white; color: #a31515">&quot;key&quot;</span><span style="background: white; color: black">: </span><span style="background: white; color: #a31515">&quot;user_alert_dialog.#USERID#&quot;</span><span style="background: white; color: black">, </span><span style="background: white; color: #a31515">&quot;version&quot;</span><span style="background: white; color: black">: -1852987123, </span><span style="background: white; color: #a31515">&quot;timestamp&quot;</span><span style="background: white; color: black">: 1327246591000 }, { </span></pre>
<p>It repeats for sections such as “shared”, “message”, “device”, “track”, and more. For my purposes, shared is the winner as it contains the current temperature.</p>
<p>&#160;</p>
<p>Node API</p>
<p>I decided to write a new demonstration application and polish it up a bit, this time using Node.</p>
<p>I’m not going to document the API that I created here (not right now), but here’s a sample of how it can be used:</p>
<div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; height: 611px; font-family: &#39;Courier New&#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 600px; width: 97.5%; background-color: #f4f4f4">
<pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &#39;Courier New&#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4">var username = process.argv[2];
var password = process.argv[3];

<span style="color: #0000ff">if</span> (username &amp;&amp; password) {
    username = trimQuotes(username);
    password = trimQuotes(password);
    nest.login(username, password, function (data) {
        <span style="color: #0000ff">if</span> (!data) {
            console.log(<span style="color: #006080">'Login failed.'</span>);
            process.exit(1);
            <span style="color: #0000ff">return</span>;
        }
        console.log(<span style="color: #006080">'Logged in.'</span>);
        nest.fetchStatus(function (data) {
            <span style="color: #0000ff">for</span> (var deviceId <span style="color: #0000ff">in</span> data.device) {
                <span style="color: #0000ff">if</span> (data.device.hasOwnProperty(deviceId)) {
                    var device = data.shared[deviceId];

                    console.log(util.format(<span style="color: #006080">&quot;%s [%s], Current temperature = %d F target=%d&quot;</span>,
                        device.name, deviceId,
                        nest.ctof(device.current_temperature),
                        nest.ctof(device.target_temperature)));
                }
            }
            subscribe();
        });
    });
}

function subscribe() {
    nest.subscribe(subscribeDone);
}

function subscribeDone(deviceId, data) {
    <span style="color: #0000ff">if</span> (deviceId) {
        console.log(<span style="color: #006080">'Device: '</span> + deviceId)
        console.log(JSON.stringify(data));
    }
    setTimeout(subscribe, 2000);
}</pre>
</div>
<p>The example code runs forever. <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="blog/wpcontent/uploads/2012/10/wlEmoticon-smile1.png" /></p>
<p>I’ve included two methods in the API, “get” and “post” which make it simple to call additional web services that I haven’t yet provided.</p>
<p>Find the code here: <a title="https://github.com/wiredprairie/unofficial_nodejs_nest" href="https://github.com/wiredprairie/unofficial_nodejs_nest">https://github.com/wiredprairie/unofficial_nodejs_nest</a>.</p>
<p>Update: there’s a npm as well now (Dec 20, 2012)</p>
]]></content:encoded>
					
					<wfw:commentRss>/blog/index.php/archives/1754/feed</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1754</post-id>	</item>
	</channel>
</rss>
