Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MQTT com café ou vice-versa
Search
Houssan A. Hijazi
January 08, 2019
Programming
0
260
MQTT com café ou vice-versa
Houssan A. Hijazi
January 08, 2019
Tweet
Share
More Decks by Houssan A. Hijazi
See All by Houssan A. Hijazi
Ligando uma cafeteira com Micropython, Mqtt e Android
hussanhijazi
0
320
Jetpack Compose Um novo jeito de construir Views no Android
hussanhijazi
1
250
Encender una cafetera con Micropython, MQTT y Android
hussanhijazi
0
270
Prototipando com RaspberryPi e Node-RED
hussanhijazi
0
210
MVVM com RxJava com Kotlin
hussanhijazi
0
210
Kotlin A nova linguagem oficial do Android
hussanhijazi
0
240
Desenvolvimento ágil
hussanhijazi
0
220
Android: Por onde começar?
hussanhijazi
0
240
Padrões de Projeto e Qualidade de Software
hussanhijazi
0
230
Other Decks in Programming
See All in Programming
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
180
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
600
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
710
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.4k
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
14
2.5k
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.1k
HTML/CSS超絶浅い説明
yuki0329
0
200
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
선언형 UI에서의 상태관리
l2hyunwoo
0
270
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
960
Featured
See All Featured
Statistics for Hackers
jakevdp
797
220k
Designing Experiences People Love
moore
139
23k
The Language of Interfaces
destraynor
156
24k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Documentation Writing (for coders)
carmenintech
67
4.5k
Code Review Best Practice
trishagee
65
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Embracing the Ebb and Flow
colly
84
4.5k
Why Our Code Smells
bkeepers
PRO
335
57k
Transcript
MQTT com café ou vice-versa
Quem? • André Queiroz -
[email protected]
◦ Analista de suporte
◦ 7 anos experiência com Arduino ◦ 1 ano experiência com RaspberryPi ◦ Santista
Quem? • Houssan Ali Hijazi -
[email protected]
◦ Organizador GDG
Foz do Iguaçu ◦ Desenvolvedor Android na Ignus Digital - https://ignusdigital.com/ ◦ http://www.lojasparaguai.com.br/ ◦ http://www.desaparecidosbr.org/ ◦ http://www.dolarpy.com.br/ ◦ Santista
MQTT Message Queue Telemetry Transport
História • Projeto IBM, final dos anos 90 • Criadores:
Andy Stanford-Clark (IBM) e Arlen Nipper (Cirrus Link)
Definição • MQTT (Message Queue Telemetry Transport) • É um
protocolo de rede M2M que trabalha no top da pilha TCP/IP. • Alternativa para Comunicação entre Máquinas
Características • É um protocolo leve para redes com largura
de banda limitada e alta latência • Paradigma PUB/SUB • Broker (Middleware) • Assíncrono • Consome poucos recursos dos dispositivos (Bateria, Processamento, Largura de Banda) • Altamente escalável • Fácil Implementação
Quem usa ? • IBM • Facebook • Eclipse Foundation
• Intel • Bosh • Siemens • Ubuntu • Mosquitto • Mais em: https://iot.eclipse.org/working-group/#members
Broker Subscriber Publisher Subscriber Subscriber Subscribe a topic Publish data
topic Send msg to clients Arquitetura MQTT Publisher Publisher
Hardware / Projeto • Arduino ESP8266 • Rele - Acionamento
mecânico • Cafeteira
Projeto Unifilar 5v (CC) 5v (CC) 110/220 (AC) GPIO: D2
Código Arduino • PubSubClient • ESP8266WiFi
Código Arduino
Projeto Broker Publish message ON/OFF to topic gdgfoz/coffeeiot Send message
ON/OFF to topic gdgfoz/coffeeiot Subscribe topic gdgfoz/coffeeiot Script: Python, Java, Kotlin, Ruby, Javascript etc…
MQTT Python • Paho library • pip install paho-mqtt
Script On/Off Python
Script On/Off Python
Rodar por crontab do linux • Linguagem: Python, Java, Kotlin,
Ruby, Javascript etc… • Criar script • Adicionar ao cron do linux • Rodar num horário específico • E se acordar mais cedo ou mais tarde ? • E se for feriado?
Android
Projeto Broker Publish message ON/OFF to topic gdgfoz/coffeeiot Send message
ON/OFF to topic gdgfoz/coffeeiot Subscribe topic gdgfoz/coffeeiot
Código Android • Kotlin • Paho library
None
Tá, e o café?
Códigos • https://github.com/hussanhijazi/mqtt-coffee-arduino • https://github.com/hussanhijazi/mqtt-coffee-python • https://github.com/hussanhijazi/mqtt-android
Contatos • Houssan Ali Hijazi -
[email protected]
• André Queiroz
-
[email protected]