SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Automatizando uma casa com baixo
custo usando Google Assitant e NodeJS
Sobre mim
Desenvolvedor há 15 anos,
programo por diversão e
curiosidade desde que era
adolescente. Já me aventurei
em startups nos EUA e
Canadá e recentemente voltei
para o interior do Rio. Sou
MBA em Gerenciamento de
Projetos e graduado em
Ciência da Computação.
"Em 2020, as pessoas não irão usar apps em
seus smartphones. Na realidade, os apps
continuarão existindo, mas não serão
percebidos pelo público. As pessoas vão contar
com os assistentes virtuais para tudo. A era
pós-app está vindo"
Peter Sondergaard
Vice President, Gartner Research
"A interação por teclado evoluiu para o
mouse, que evoluiu para o multitouch
com os celulares e agora nós temos voz
e visão como novas duas modalidades
para interação com o usuário."
Sundar Pichai, CEO do Google
Adicionar leite e arroz na lista de compras.
Jogar um jogo de perguntas e respostas.
Me lembre de jogar o lixo fora todos os dias
às oito da noite.
Quanto é 192 dividido por quatro?
Listar receitas de bolos de chocolate.
Mandar mensagem no WhatsApp para minha
mãe: Vou almoçar aí amanhã.
Adicionar novo evento na minha agenda:
Palestrar no GDG Dev Fest, sábado as 16 horas
Ligar para a minha esposa
Tocar Red Hot Chilli Pepers
INCOMPATIBILIDADE
ENTRE DISPOSITIVOS
ALTO CUSTO DE
DISPOSITIVOS IOT
Automação residencial enfrenta dois grandes
problemas temporários
Problema 1: Incompatibilidade
Problema 2: Preço alto
Sonoff: Versatilidade e compatibilidade
Sonoff: Preço
Certo mas
como isso tudo
se comunica
com o Google
Assistant?
● M2M: Troca de mensagens entre máquinas
● Precisa de pouca banda e hardware extremamente
simples
● Baseado em TCP/IP possui Payload menor que o HTTP
● Tem opção de Login e TLS
Protocolo
INTERNET
Inscreve no tópico
LUZ DA SALA
Publica no tópico
LUZ DA SALA
Mensagem: ON
Publica
Mensagem: ON
SONOFF LIGADO
À LAMPADA
Modelo Pub Sub
MQTT
B R O K E R
Server MQTT usando NodeJS
A partir daí já é
possível controlar
os dispositivos
usando um app de
MQTT qualquer
Exemplos
Brokers
• AWS IoT
• Mosquito
• Mosca
• HiveMQ
• RabbitMQ
Publishers
• Sensores de temperatura
• Sensores de pressão
• Sensores de umidade
• Aplicativos para celulares
• Aplicativos de automação
residencial
Subscribers
• Sonoff
• Arduino
• Raspberry
• Outros
hardwares
MQTT
B R O K E R
Do Google Assistant para o MQTT
HTTP
B R I D G E
MESMO SERVIDOR
Ponte HTTP para MQTT
MQTT
B R O K E R
Publicando vários tópicos ao mesmo
tempo
MQTT
C O M P O S I T E
MESMO SERVIDOR
Composição para apagar todas as luzes
MQTT
B R O K E R
Conectando com dispositivos não compatíveis
com MQTT
MQTT
B R I D G E
INTERNET REDE INTERNA - RASPBERRYPI
Ponte MQTT para HTTP
github.com/afonsof/m
qtt-http-server
Tá, mas eu não
sei ou prefiro
não programar,
e aí?
//Definindo uma luz MQTT no arquivo configurations.yaml
//Definindo uma composição no arquivo automations.yaml
Configurações do HASS.IO
CODIFICAR SEU
PRÓPRIO SERVIDOR
USAR UMA FERRAMENTA
DE AUTOMAÇÃO
• Maior versatilidade
• Menor complexidade
• Você faz o que quiser
• Precisa programar
• Cada integração tem que
ser feita do zero
• Não precisa programar
• Muitas integrações prontas
• Limitações de implementação
• Bugs no pipeline
• Ter que ter 2 instalados um
local e um remoto
Obrigado!
afonso.franca@gmail.com
github.com/afonsof
@afonsof

Mais conteúdo relacionado

Último

Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...
Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...
Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...Dirceu Resende
 
Entrevistas, artigos, livros & citações de Paulo Pagliusi
Entrevistas, artigos, livros & citações de Paulo PagliusiEntrevistas, artigos, livros & citações de Paulo Pagliusi
Entrevistas, artigos, livros & citações de Paulo PagliusiPaulo Pagliusi, PhD, CISM
 
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)Alessandro Almeida
 
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIA
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIAEAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIA
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIAMarcio Venturelli
 
Apostila e caderno de exercicios de WORD
Apostila e caderno de exercicios de  WORDApostila e caderno de exercicios de  WORD
Apostila e caderno de exercicios de WORDRONDINELLYRAMOS1
 
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdf
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdfFrom_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdf
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdfRodolpho Concurde
 
Palestras sobre Cibersegurança em Eventos - Paulo Pagliusi
Palestras sobre Cibersegurança em Eventos - Paulo PagliusiPalestras sobre Cibersegurança em Eventos - Paulo Pagliusi
Palestras sobre Cibersegurança em Eventos - Paulo PagliusiPaulo Pagliusi, PhD, CISM
 

Último (7)

Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...
Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...
Apresentação Power Embedded - Descubra uma nova forma de compartilhar relatór...
 
Entrevistas, artigos, livros & citações de Paulo Pagliusi
Entrevistas, artigos, livros & citações de Paulo PagliusiEntrevistas, artigos, livros & citações de Paulo Pagliusi
Entrevistas, artigos, livros & citações de Paulo Pagliusi
 
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)
[ServiceNow] Upgrade de versão - 2ª edição (Revisada, atualizada e ampliada)
 
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIA
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIAEAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIA
EAD Curso - CIÊNCIA DE DADOS NA INDÚSTTRIA
 
Apostila e caderno de exercicios de WORD
Apostila e caderno de exercicios de  WORDApostila e caderno de exercicios de  WORD
Apostila e caderno de exercicios de WORD
 
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdf
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdfFrom_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdf
From_SEH_Overwrite_with_Egg_Hunter_to_Get_a_Shell_PT-BR.pdf
 
Palestras sobre Cibersegurança em Eventos - Paulo Pagliusi
Palestras sobre Cibersegurança em Eventos - Paulo PagliusiPalestras sobre Cibersegurança em Eventos - Paulo Pagliusi
Palestras sobre Cibersegurança em Eventos - Paulo Pagliusi
 

Destaque

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Destaque (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Aumatizando uma casa com baixo custo usando google assitant e node js

  • 1. Automatizando uma casa com baixo custo usando Google Assitant e NodeJS
  • 2. Sobre mim Desenvolvedor há 15 anos, programo por diversão e curiosidade desde que era adolescente. Já me aventurei em startups nos EUA e Canadá e recentemente voltei para o interior do Rio. Sou MBA em Gerenciamento de Projetos e graduado em Ciência da Computação.
  • 3.
  • 4.
  • 5. "Em 2020, as pessoas não irão usar apps em seus smartphones. Na realidade, os apps continuarão existindo, mas não serão percebidos pelo público. As pessoas vão contar com os assistentes virtuais para tudo. A era pós-app está vindo" Peter Sondergaard Vice President, Gartner Research
  • 6. "A interação por teclado evoluiu para o mouse, que evoluiu para o multitouch com os celulares e agora nós temos voz e visão como novas duas modalidades para interação com o usuário." Sundar Pichai, CEO do Google
  • 7. Adicionar leite e arroz na lista de compras. Jogar um jogo de perguntas e respostas. Me lembre de jogar o lixo fora todos os dias às oito da noite.
  • 8. Quanto é 192 dividido por quatro? Listar receitas de bolos de chocolate. Mandar mensagem no WhatsApp para minha mãe: Vou almoçar aí amanhã.
  • 9. Adicionar novo evento na minha agenda: Palestrar no GDG Dev Fest, sábado as 16 horas Ligar para a minha esposa Tocar Red Hot Chilli Pepers
  • 10. INCOMPATIBILIDADE ENTRE DISPOSITIVOS ALTO CUSTO DE DISPOSITIVOS IOT Automação residencial enfrenta dois grandes problemas temporários
  • 13. Sonoff: Versatilidade e compatibilidade
  • 15. Certo mas como isso tudo se comunica com o Google Assistant?
  • 16. ● M2M: Troca de mensagens entre máquinas ● Precisa de pouca banda e hardware extremamente simples ● Baseado em TCP/IP possui Payload menor que o HTTP ● Tem opção de Login e TLS Protocolo
  • 17. INTERNET Inscreve no tópico LUZ DA SALA Publica no tópico LUZ DA SALA Mensagem: ON Publica Mensagem: ON SONOFF LIGADO À LAMPADA Modelo Pub Sub MQTT B R O K E R
  • 19. A partir daí já é possível controlar os dispositivos usando um app de MQTT qualquer
  • 20. Exemplos Brokers • AWS IoT • Mosquito • Mosca • HiveMQ • RabbitMQ Publishers • Sensores de temperatura • Sensores de pressão • Sensores de umidade • Aplicativos para celulares • Aplicativos de automação residencial Subscribers • Sonoff • Arduino • Raspberry • Outros hardwares
  • 21. MQTT B R O K E R Do Google Assistant para o MQTT HTTP B R I D G E MESMO SERVIDOR
  • 23. MQTT B R O K E R Publicando vários tópicos ao mesmo tempo MQTT C O M P O S I T E MESMO SERVIDOR
  • 24. Composição para apagar todas as luzes
  • 25. MQTT B R O K E R Conectando com dispositivos não compatíveis com MQTT MQTT B R I D G E INTERNET REDE INTERNA - RASPBERRYPI
  • 28. Tá, mas eu não sei ou prefiro não programar, e aí?
  • 29.
  • 30. //Definindo uma luz MQTT no arquivo configurations.yaml //Definindo uma composição no arquivo automations.yaml Configurações do HASS.IO
  • 31. CODIFICAR SEU PRÓPRIO SERVIDOR USAR UMA FERRAMENTA DE AUTOMAÇÃO
  • 32. • Maior versatilidade • Menor complexidade • Você faz o que quiser • Precisa programar • Cada integração tem que ser feita do zero • Não precisa programar • Muitas integrações prontas • Limitações de implementação • Bugs no pipeline • Ter que ter 2 instalados um local e um remoto