chilitechno / SiriProxy-NestLearningThermostat

SiriProxy plugin to connect to Nest (based on SiriProxy-Thermostat)
54 stars 12 forks source link

Multiple Thermostats #5

Open GadgetAddict opened 11 years ago

GadgetAddict commented 11 years ago

I have central heat and air, and the plugin worked right away; but only for the upstairs nest. I have four nests and if I say away or home, it will set all of them, but I cannot modify any specific nest, just the office. I think it is because it's the first one that appears in the list when it connects to nest.

Warning: I am not a programmer, but I pick up things well. If you can point me to where I could modify or add something; that would be amazing.

elvisimprsntr commented 11 years ago

I don't believe this plugin supports multiple Nests, but my guess is that all your Nests are linked to the same Nest account, thus when you set away mode, it does for all Nests tied to the single account.

chilitechno commented 11 years ago

You'd need to modify the plugin to support multiple nests

set the office nest to away. 

Basically need to look at the devices collection within the structures collection.

Structures = all the different locations (home, vacation home, etc). Devices = all the devices at a single structure.

My code only gets the first device of the first structure.

structure_id = statusResult["user"][user_id]["structures"][0].split('.')[1]
device_serial_id = statusResult["structure"][structure_id]["devices"][0].split('.')[1]

You'd have to modify the code to enumerate all the structures to collect their names (Home, Vacation Home, etc) and the enumerate all the device names (Living Room, Office, Basement, etc).

And then modify the code to handle multiple structures and multiple devices.

set the office nest to away
set the basement nest of the vacation home to away

etc.

GadgetAddict commented 11 years ago

So I have 1 structure, and 4 devices. I got the device id's by looking at the output from "get status" because it showed them all (in console) I've actually been looking at your line of code, because of your comments about the number of thermostats.. but I don't know how to say, this device 01AAB-etc is office, 01AAB2, downstairs.

Embarrassed, I'm not sure what I'm looking at, I'm just comparing code and trying to "play it by ear" which is how I learned the piano and everything else.

So, if there was a way to define the thermostats.. would I then have to modify every function as well... like add code to set temp, show status, set away, turn off... so that it knew to cross reference the device list? if that was not coherent, you can e-slap me.

GadgetAddict commented 11 years ago

So I found this guy with three nests and since understanding raw code is not my forte, I wanted to know if you'd be willing to see how he accomplished it or give me how you would go about it, and give me a snippet or example, so I can mimick it and try and get it working.

Have a great day. Michael K.

On Jun 18, 2013, at 3:23 PM, Chris Burris notifications@github.com wrote:

You'd need to modify the plugin to support multiple nests

set the office nest to away. Basically need to look at the devices collection within the structures collection.

Structures = all the different locations (home, vacation home, etc). Devices = all the devices at a single structure.

My code only gets the first device of the first structure.

structure_id = statusResult["user"][user_id]["structures"][0].split('.')[1] device_serial_id = statusResult["structure"][structure_id]["devices"][0].split('.')[1] You'd have to modify the code to enumerate all the structures to collect their names (Home, Vacation Home, etc) and the enumerate all the device names (Living Room, Office, Basement, etc).

And then modify the code to handle multiple structures and multiple devices.

set the office nest to away set the basement nest of the vacation home to away etc.

— Reply to this email directly or view it on GitHub.

GadgetAddict commented 11 years ago

http://www.wiredprairie.us/blog/index.php/archives/1754

Have a great day, Michael K.

On Jun 18, 2013, at 3:23 PM, Chris Burris notifications@github.com wrote:

You'd need to modify the plugin to support multiple nests

set the office nest to away. Basically need to look at the devices collection within the structures collection.

Structures = all the different locations (home, vacation home, etc). Devices = all the devices at a single structure.

My code only gets the first device of the first structure.

structure_id = statusResult["user"][user_id]["structures"][0].split('.')[1] device_serial_id = statusResult["structure"][structure_id]["devices"][0].split('.')[1] You'd have to modify the code to enumerate all the structures to collect their names (Home, Vacation Home, etc) and the enumerate all the device names (Living Room, Office, Basement, etc).

And then modify the code to handle multiple structures and multiple devices.

set the office nest to away set the basement nest of the vacation home to away etc.

— Reply to this email directly or view it on GitHub.