Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Multiple Structure and Device support #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fuelxc
Copy link

@fuelxc fuelxc commented Mar 20, 2014

Added models Structure and Device.
Allows for multiples of each and setters can be called on nest/structure and will affect all the children
Do to the new models I added in a flag for initializing structures.

Refactored a bit of the initialization of Nest in order to help this refreshing.

Looking to go get a smoke alarm to so that we can subclass devices into thermostat and smoke alarm. Might consider changing the namespace at that time off of NestThermostat to Nest and changing Nest to Account

Eric Harrison added 2 commits March 20, 2014 13:08
…loading of structures/devices as those are not as likely to change
@fuelxc
Copy link
Author

fuelxc commented Mar 20, 2014

(tests are included)

@ericboehs
Copy link
Owner

@stevenpetryk I'd love to see this merged. It needs some love especially with the new changes you've intro'd.

@stevenpetryk
Copy link
Collaborator

TODO: make it work with smoke detectors

Is that outside the scope of this gem? I mean, this is the only gem I can find designed for interacting with Nest at all, and it WOULD be nice for it to work with Nest Protect, but the name of the gem is nest_thermostat. Maybe, in the grand scheme of things, it would be better to wrap the Nest API in a separate gem, and then have nest_thermostat and nest_protect be more like plugins for that gem? It would allow for modularity in the even that Nest releases more products.

@ericboehs
Copy link
Owner

I think we'll make separate gems for that. I plan on getting a nest protect in the next 2-3 months. A core api gem could be good too.

@fuelxc
Copy link
Author

fuelxc commented Dec 18, 2014

i can fix the merge if you guys like and remove the todo. I was planning on getting nest protect as well to implement

@stevenpetryk
Copy link
Collaborator

Just FYI, if you're registered as a Nest developer (it's free), you can add a fake device to your account using the Nest Developer Chrome plugin. That's what I've been doing, since I don't actually have a Nest thermostat.

@fuelxc
Copy link
Author

fuelxc commented Dec 18, 2014

Oh nice, cheers forthat

@stevenpetryk
Copy link
Collaborator

Also, @ericboehs, this was mentioned in passing by @fuelxc, but I'm a huge fan of changing the namespace to Nest and separating the current Nest class into Structure and Device classes. Perhaps Device could contain code relating to any device (ID, name, IP Address, location, etc.), and Thermostat could be a subclasse of it. This would help greatly with adding support for Nest Protect. Maybe a milestone would be a good idea?

@ericboehs
Copy link
Owner

That sounds like a great idea. Feel free to add off topic comments in gitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants