- Um toque de um botão que liga / desliga toda a iluminação de uma determinada sala; não apenas uma luz.
- Toque duas vezes no mesmo botão para desligar tudo (iluminação, aparelhos eletrônicos, dispositivos, etc.) na sala.
- As luzes piscam na sua garagem quando alguém toca a campainha.
- Quando a porta da garagem se abre depois de escurecer, as luzes ligam-se automaticamente, conduzindo à sua porta.
- Sensores de movimento em áreas-chave podem sinalizar ao sistema de automação para desligar as luzes quando uma sala estiver vazia por um período de tempo.
- A iluminação da paisagem pode ligar-se automaticamente ao pôr-do-sol e desligar novamente ao nascer do sol.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Restaurando banco de dados..." | |
RED='\033[0;31m' | |
GRE='\033[0;32m' | |
NC='\033[0m' | |
DATABASE="" | |
FILE_FULL="" |
// Criar arquivo boot
sudo vim /etc/systemd/system/boot-splashscreen.service
sudo vim /etc/systemd/system/powerdown-image.service
sudo vim /etc/systemd/system/unplug-image.service
// Instalar lib
sudo apt-get install fim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
import { AutenticacaoServiceProvider } from '../../providers/autenticacao-service/autenticacao-service'; | |
@IonicPage() | |
@Component({ | |
selector: 'page-pagina2', | |
templateUrl: 'pagina2.html', | |
}) | |
export class Pagina2Page { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { NavController, AlertController } from 'ionic-angular'; | |
import { AutenticacaoServiceProvider } from '../../providers/autenticacao-service/autenticacao-service'; | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html' | |
}) | |
export class HomePage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-header> | |
<ion-navbar> | |
<ion-title> | |
Auth App | |
</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> | |
<h2 *ngIf="isAuthenticated()" text-center>O usuário está logado!</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class AutenticacaoServiceProvider { | |
private isLoggedIn = false; | |
constructor() { } | |
login(): void { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { ErrorHandler, NgModule } from '@angular/core'; | |
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; | |
import { SplashScreen } from '@ionic-native/splash-screen'; | |
import { StatusBar } from '@ionic-native/status-bar'; | |
import { MyApp } from './app.component'; | |
import { HomePage } from '../pages/home/home'; | |
import { AutenticacaoServiceProvider } from '../providers/autenticacao-service/autenticacao-service'; |