CommonGarden / Grow-IoT

Software packages for smart growing environments.
http://commongarden.org/
Other
25 stars 6 forks source link

Run Grow-IoT instance on Raspberry pi #387

Open JakeHartnell opened 6 years ago

JakeHartnell commented 6 years ago

While it's nice to be able to connect multiple pi's to a Grow-IoT instance, it would be nicer still if Grow-IoT could be hosted on the device itself.

Currently, this isn't working though. Hopefully Meteor will support ARM architectures soon... or #365 happens. : )

pi@rpitbr3w:~/Grow-IoT $ $HOME/meteor/meteor && sudo node ../Grow.js/examples/rasp-pi/bioreactor.js 
=> Running Meteor from a checkout -- overrides project version (Meteor 1.5.1)
[[[[[ ~/Grow-IoT ]]]]]                        

=> Started proxy.                             
=> Started MongoDB.                           
=> Errors prevented startup:                  

   While selecting package versions:
   error: No version of meteor-base satisfies all constraints: @1.1.0, @=1.0.4
   Constraints on package "meteor-base":
   * meteor-base@1.1.0 <- top level
   * meteor-base@=1.0.4 <- top level

   No version of mongo satisfies all constraints: @1.1.19, @=1.1.9_1
   Constraints on package "mongo":
   * mongo@1.1.19 <- top level
   * mongo@=1.1.9_1 <- top level

   No version of session satisfies all constraints: @1.1.7, @=1.1.6
   Constraints on package "session":
   * session@1.1.7 <- top level
   * session@=1.1.6 <- top level

   No version of tracker satisfies all constraints: @1.1.3, @=1.0.14
   Constraints on package "tracker":
   * tracker@1.1.3 <- top level
   * tracker@=1.0.14 <- top level
   * tracker@1.0.11 <- ground:db 2.0.0-rc.7
   * tracker@1.0.10-beta.16 <- react-meteor-data 0.2.6-beta.16
   * tracker@1.0.7 <- ostrio:files 1.3.14

   No version of es5-shim satisfies all constraints: @4.6.15, @=4.5.12_1
   Constraints on package "es5-shim":
   * es5-shim@4.6.15 <- top level
   * es5-shim@=4.5.12_1 <- top level

   No version of ecmascript satisfies all constraints: @0.8.1, @=0.4.6_1
   Constraints on package "ecmascript":
   * ecmascript@0.8.1 <- top level
   * ecmascript@=0.4.6_1 <- top level
   * ecmascript@0.8.1 <- shell-server 0.2.4
   * ecmascript@0.4.1 <- ground:db 2.0.0-rc.7
   * ecmascript@0.4.0-beta.16 <- react-meteor-data 0.2.6-beta.16
   * ecmascript@0.8.0 <- dynamic-import 0.1.1

   No version of accounts-base satisfies all constraints: @1.3.1, @=1.2.8
   Constraints on package "accounts-base":
   * accounts-base@1.3.1 <- top level
   * accounts-base@=1.2.8 <- top level

   No version of accounts-password satisfies all constraints: @1.4.0, @=1.1.11
   Constraints on package "accounts-password":
   * accounts-password@1.4.0 <- top level
   * accounts-password@=1.1.11 <- top level

   No version of http satisfies all constraints: @1.2.12, @=1.1.7
   Constraints on package "http":
   * http@1.2.12 <- top level
   * http@=1.1.7 <- top level
   * http@1.0.8 <- ostrio:cookies 2.0.1 <- ostrio:files 1.3.14

   No version of force-ssl satisfies all constraints: @1.0.14, @=1.0.12
   Constraints on package "force-ssl":
   * force-ssl@1.0.14 <- top level
   * force-ssl@=1.0.12 <- top level

   No version of npm-bcrypt satisfies all constraints: @0.9.3, @=0.8.6_1
   Constraints on package "npm-bcrypt":
   * npm-bcrypt@0.9.3 <- top level
   * npm-bcrypt@=0.8.6_1 <- top level

   No version of check satisfies all constraints: @1.2.5, @=1.2.3
   Constraints on package "check":
   * check@1.2.5 <- top level
   * check@=1.2.3 <- top level
   * check@1.0.5 <- ostrio:files 1.3.14
   * check@1.2.5 <- dynamic-import 0.1.1

   No version of reactive-var satisfies all constraints: @1.0.11, @=1.0.10
   Constraints on package "reactive-var":
   * reactive-var@1.0.11 <- top level
   * reactive-var@=1.0.10 <- top level
   * reactive-var@1.0.3 <- useful:connectivity 2.0.0
   * reactive-var@1.0.7 <- ground:db 2.0.0-rc.7
   * reactive-var@1.0.5 <- ostrio:files 1.3.14

=> Your application has errors. Waiting for file change.
aruntk commented 6 years ago

There is this fork for meteor on ARM devices https://github.com/4commerce-technologies-AG/meteor. But it is outdated. stuck at v1.3. Lead developer said that they'll be releasing v1.5 https://github.com/4commerce-technologies-AG/meteor/issues/65

JakeHartnell commented 6 years ago

Lead developer said that they'll be releasing v1.5 4commerce-technologies-AG/meteor#65

Cool, we shall wait on that then.

JakeHartnell commented 6 years ago

365 and #417 are relevant to this.

dowliang commented 6 years ago

I ran into this exact problem as well. I am wondering whether there is any alternative to this. We have a project that we would like to use grow IoT for it.

JakeHartnell commented 6 years ago

@dowliang, you can use Grow.js to create a device driver for Raspberry Pi. Here's an example: https://github.com/CommonGarden/Grow-Hub

More Raspberry Pi examples are located in the .examples directory: https://github.com/CommonGarden/Grow-IoT/tree/development/.examples/rasp-pi

Grow-IoT can run in the Cloud (such as AWS or Meteor Galaxy) or on a local x86 based computer. We run an instance on https://grow.commongarden.org

For development purposes you can run Grow-IoT server on your computer and connect the Raspberry pi to it. In summary:

You can create a custom UI component for your device by:

  1. Make a new CustomComponent.jsx file in imports/things/ or yarn add package-name
  2. Open imports/things/index.js in a text editor of your choice and import your new component. Example: import CustomComponent from './CustomComponent'
  3. Lastly, add the CustomComponent to the exported components object.

Feel free to ask follow up questions.

JakeHartnell commented 6 years ago

@dowliang, here's a simpler example I made with better instructions for Raspberry pi setup: https://github.com/CommonGarden/BasicRaspberryPiExample

Pull requests or suggestions for improving documentation are welcome.

dowliang commented 6 years ago

Thanks, Jake.

This is very helpful.

Tony

On Fri, Nov 17, 2017 at 9:03 PM, Jake Hartnell notifications@github.com wrote:

@dowliang https://github.com/dowliang, here's a simpler example I made with better instructions for Raspberry pi setup: https://github.com/ CommonGarden/BasicRaspberryPiExample

Pull requests or suggestions for improving documentation are welcome.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CommonGarden/Grow-IoT/issues/387#issuecomment-345413802, or mute the thread https://github.com/notifications/unsubscribe-auth/AQXuEcHbEZuiG0f36ybjTEZcisuAZogAks5s3kj2gaJpZM4O8KOO .