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

Environments (a.k.a. groups of things) #311

Open
JakeHartnell opened this issue Jan 31, 2017 · 4 comments
Open

Environments (a.k.a. groups of things) #311

JakeHartnell opened this issue Jan 31, 2017 · 4 comments
Milestone

Comments

@JakeHartnell
Copy link
Member

JakeHartnell commented Jan 31, 2017

Environments are simply a collection of things.

An environment such as a grow room or greenhouse might contain the following:

  • temperature sensor
  • heater
  • humidifier
  • light
  • CO2 sensor
  • plants
  • etc.

Environments are ways to group things together.

@apengwin
Copy link
Contributor

Hey @JakeHartnell . I'm starting to take a look at this, and was wondering how environments should be implemented. Are they simply a collection of constants?

@JakeHartnell
Copy link
Member Author

JakeHartnell commented Feb 14, 2017

Are they simply a collection of constants?

Yes.

I think it would be simply be an extension of the thing schema. See: https://github.com/aruntk/grow-graphql-api/blob/master/src/schema/things.js

We could modify it to have something like a contains property which would be a list of subthings! Just an idea.

export const ThingSchema = [`
type subThings {
   // a list of things.
}
scalar Date
type Thing {
  _id: String!
  uuid: String!
  token: String,
  owner: String,
  component: String,
  name : String,
  onlineSince: Boolean,
  contains: subThings,
  properties: Object,
  registeredAt: Date
}
`,
];

Eventually we'll need some UI for grouping things into "Environments".

@JakeHartnell
Copy link
Member Author

We're going to be switching to GraphQL soon #315, I'm currently reading through this: http://graphql.org/learn/queries/

@apengwin
Copy link
Contributor

gotcha. Should the code for environment be defined in Grow.js then?

@JakeHartnell JakeHartnell changed the title Environments Environments (a.k.a. groups of things) Jun 3, 2017
@JakeHartnell JakeHartnell added this to the v0.6 milestone Apr 9, 2018
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

No branches or pull requests

2 participants