├── .gitignore
├── front
├── components
│ └── data-sensors
│ │ ├── .gitignore
│ │ ├── demo
│ │ ├── Thumbs.db
│ │ ├── lightbulb.png
│ │ ├── temperature-maaterial.png
│ │ └── index.html
│ │ ├── index.html
│ │ ├── bower.json
│ │ ├── test
│ │ └── data-sensors_test.html
│ │ ├── README.md
│ │ └── data-sensors.html
└── landing
│ ├── manifest.json
│ ├── bower.json
│ ├── src
│ └── landing-smart-home
│ │ └── landing-smart-home.html
│ ├── README.md
│ ├── test
│ └── landing-smart-home
│ │ └── landing-smart-home_test.html
│ └── index.html
├── Readme.md
└── SensorsModule
├── Led
└── LedTemperature.ino
└── dht22
└── exampledht.ino
/.gitignore:
--------------------------------------------------------------------------------
1 | bower_components
2 |
--------------------------------------------------------------------------------
/front/components/data-sensors/.gitignore:
--------------------------------------------------------------------------------
1 | bower_components
2 |
--------------------------------------------------------------------------------
/front/components/data-sensors/demo/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Borjagodoy/LittleSmartHomeSensor/HEAD/front/components/data-sensors/demo/Thumbs.db
--------------------------------------------------------------------------------
/front/components/data-sensors/demo/lightbulb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Borjagodoy/LittleSmartHomeSensor/HEAD/front/components/data-sensors/demo/lightbulb.png
--------------------------------------------------------------------------------
/front/landing/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "landing-smart-home",
3 | "short_name": "landing-smart-home",
4 | "start_url": "/",
5 | "display": "standalone"
6 | }
7 |
--------------------------------------------------------------------------------
/front/components/data-sensors/demo/temperature-maaterial.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Borjagodoy/LittleSmartHomeSensor/HEAD/front/components/data-sensors/demo/temperature-maaterial.png
--------------------------------------------------------------------------------
/front/components/data-sensors/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | data-sensors
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/front/landing/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "landing-smart-home",
3 | "main": "index.html",
4 | "dependencies": {
5 | "polymer": "Polymer/polymer#^1.4.0",
6 | "app-layout": "PolymerElements/app-layout#^0.10.4"
7 | },
8 | "devDependencies": {
9 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
10 | "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
11 | "web-component-tester": "^4.0.0",
12 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | LittleSmartHome
2 | ===================
3 |
4 |
5 | This project born for create a smart Home by all people. We share the necesary code to do your house smart with a little cost.
6 |
7 | ----------
8 |
9 |
10 | Folders
11 | -------------
12 |
13 | **SensorsModule**
14 | In this folder yout can find the code in C++ or python of diferents sensors for yout Node MCU board
15 |
16 | **Front**
17 | Have Polymer components and demo Examples de apps for use the sensors from our apps or webSites and landing page of project.
18 |
--------------------------------------------------------------------------------
/front/landing/src/landing-smart-home/landing-smart-home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 | Hello [[prop1]]
11 |
12 |
13 |
27 |
28 |
--------------------------------------------------------------------------------
/front/components/data-sensors/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "data-sensors",
3 | "description": "data-sensors",
4 | "main": "data-sensors.html",
5 | "dependencies": {
6 | "polymer": "Polymer/polymer#^1.4.0",
7 | "polymerfire": "firebase/polymerfire#^0.10.2",
8 | "app-color-card": " https://github.com/the-control-group/app-color-card.git#*",
9 | "paper-material": "PolymerElements/paper-material#^1.0.6",
10 | "iron-icon": "PolymerElements/iron-icon#^1.0.12",
11 | "paper-button": "PolymerElements/paper-button#^1.0.14",
12 | "paper-toggle-button": "PolymerElements/paper-toggle-button#^1.2.1"
13 | },
14 | "devDependencies": {
15 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
16 | "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
17 | "web-component-tester": "^4.0.0",
18 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/front/components/data-sensors/test/data-sensors_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | data-sensors test
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/front/landing/README.md:
--------------------------------------------------------------------------------
1 | # \
2 |
3 |
4 |
5 | ## Install the Polymer-CLI
6 |
7 | First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your application locally.
8 |
9 | ## Viewing Your Application
10 |
11 | ```
12 | $ polymer serve
13 | ```
14 |
15 | ## Building Your Application
16 |
17 | ```
18 | $ polymer build
19 | ```
20 |
21 | This will create a `build/` folder with `bundled/` and `unbundled/` sub-folders
22 | containing a bundled (Vulcanized) and unbundled builds, both run through HTML,
23 | CSS, and JS optimizers.
24 |
25 | You can serve the built versions by giving `polymer serve` a folder to serve
26 | from:
27 |
28 | ```
29 | $ polymer serve build/bundled
30 | ```
31 |
32 | ## Running Tests
33 |
34 | ```
35 | $ polymer test
36 | ```
37 |
38 | Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
39 |
--------------------------------------------------------------------------------
/front/components/data-sensors/README.md:
--------------------------------------------------------------------------------
1 | # \
2 |
3 | data-sensors
4 |
5 | ## Install the Polymer-CLI
6 |
7 | First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your application locally.
8 |
9 | ## Viewing Your Application
10 |
11 | ```
12 | $ polymer serve
13 | ```
14 |
15 | ## Building Your Application
16 |
17 | ```
18 | $ polymer build
19 | ```
20 |
21 | This will create a `build/` folder with `bundled/` and `unbundled/` sub-folders
22 | containing a bundled (Vulcanized) and unbundled builds, both run through HTML,
23 | CSS, and JS optimizers.
24 |
25 | You can serve the built versions by giving `polymer serve` a folder to serve
26 | from:
27 |
28 | ```
29 | $ polymer serve build/bundled
30 | ```
31 |
32 | ## Running Tests
33 |
34 | ```
35 | $ polymer test
36 | ```
37 |
38 | Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
39 |
--------------------------------------------------------------------------------
/front/landing/test/landing-smart-home/landing-smart-home_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | landing-smart-home test
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/SensorsModule/Led/LedTemperature.ino:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include
4 | #include
5 |
6 | // Set these to run example.
7 | #define FIREBASE_HOST "YOUR_HOST"
8 | #define FIREBASE_AUTH "Your_Pass_Auth_Firebase"
9 | #define WIFI_SSID "yout_SSID"
10 | #define WIFI_PASSWORD "Your_password_wifi"
11 |
12 | const int ledPin = 15;
13 |
14 | void setup() {
15 | Serial.begin(9600);
16 |
17 | pinMode(ledPin, OUTPUT);
18 | pinMode(14, OUTPUT);
19 | pinMode(13, OUTPUT);
20 | pinMode(12, OUTPUT);
21 | // connect to wifi.
22 | WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
23 | Serial.print("connecting");
24 | while (WiFi.status() != WL_CONNECTED) {
25 | Serial.print(".");
26 | delay(500);
27 | }
28 | Serial.println();
29 | Serial.print("connected: ");
30 | Serial.println(WiFi.localIP());
31 |
32 | Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
33 | Firebase.set("LedTemperature", 0);
34 |
35 | }
36 |
37 |
38 | void loop() {
39 | if(Firebase.getInt("temperature")>28){
40 | digitalWrite(15, 1);
41 | digitalWrite(13, 1);
42 | Firebase.set("LedTemperature",1);
43 | }
44 | else{
45 | digitalWrite(15, 0);
46 | digitalWrite(13, 0);
47 | Firebase.set("LedTemperature",0);
48 | }
49 |
50 | delay(200);
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/SensorsModule/dht22/exampledht.ino:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "DHT.h"
4 |
5 | #define DHTPIN D2 // Pin donde está conectado el sensor
6 | #include
7 |
8 | //#define DHTTYPE DHT11 // Descomentar si se usa el DHT 11
9 | #define DHTTYPE DHT22 // Sensor DHT22
10 | #include
11 |
12 | // Set these to run example.
13 | #define FIREBASE_HOST "YOUR_HOST"
14 | #define FIREBASE_AUTH "Your_Pass_Auth_Firebase"
15 | #define WIFI_SSID "yout_SSID"
16 | #define WIFI_PASSWORD "Your_password_wifi"
17 |
18 |
19 | DHT dht(DHTPIN, DHTTYPE);
20 |
21 | void setup() {
22 | Serial.begin(9600);
23 | Serial.println("Iniciando...");
24 | dht.begin();
25 | // connect to wifi.
26 | WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
27 | Serial.print("connecting");
28 | while (WiFi.status() != WL_CONNECTED) {
29 | Serial.print(".");
30 | delay(500);
31 | }
32 | Serial.println();
33 | Serial.print("connected: ");
34 | Serial.println(WiFi.localIP());
35 |
36 | Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
37 | Firebase.set("temperature", 0);
38 | Firebase.set("humedad", 0);
39 | }
40 | void loop() {
41 | delay(2000);
42 | float h = dht.readHumidity(); //Leemos la Humedad
43 | float t = dht.readTemperature(); //Leemos la temperatura en grados Celsius
44 | float f = dht.readTemperature(true); //Leemos la temperatura en grados Fahrenheit
45 | //--------Enviamos las lecturas por el puerto serial-------------
46 | Serial.print("Humedad ");
47 | Serial.print(h);
48 | Firebase.setInt("humedad", h);
49 | Serial.print(" %t");
50 | Serial.print("Temperatura: ");
51 | Firebase.setInt("temperature", t);
52 | Serial.print(t);
53 | Serial.print(" *C ");
54 | Serial.print(f);
55 | Serial.println(" *F");
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/front/components/data-sensors/demo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | data-sensors demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
Basic data-sensors Demo
24 |
25 |
26 |
34 |
40 |
41 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/front/components/data-sensors/data-sensors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
58 |
62 |
63 | {{title}}
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
{{dataSensor}}{{metric}}
74 |
75 |
76 |
77 |
78 |
79 |
122 |
123 |
--------------------------------------------------------------------------------
/front/landing/index.html:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | app-box demo using the document scroll
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
149 |
150 |
151 |
152 |
153 |
154 | POLYMER
155 |
156 |
157 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | Built for Speed
171 | Polymer 1.0 replaces the shadow DOM polyfill with a lightweight shim, uses a new, faster data-binding system, and significantly reduces code size.
172 |
173 |
174 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 | For Modern Browsers
187 | Polymer is built from the ground up for modern browsers, using the latest web platform APIs. Polyfills provide support on evergreen browsers for APIs that aren't universal yet.
188 |
189 |
192 |
193 |
194 |
195 |
196 |
197 |
198 | Using Web Components
199 | Polymer leverages web components, a new set of standards designed to provide reusable components for the web.
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | Create your own elements
208 | The Polymer library makes it easy to create your own powerful elements. Give your element some markup and properties, and then use it on a site. Polymer provides useful features like templating and data binding to reduce the amount of boilerplate you need to write.
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------