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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Houssan A. Hijazi
January 08, 2019
Programming
0
300
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
380
Jetpack Compose Um novo jeito de construir Views no Android
hussanhijazi
1
320
Encender una cafetera con Micropython, MQTT y Android
hussanhijazi
0
320
Prototipando com RaspberryPi e Node-RED
hussanhijazi
0
260
MVVM com RxJava com Kotlin
hussanhijazi
0
270
Kotlin A nova linguagem oficial do Android
hussanhijazi
0
280
Desenvolvimento ágil
hussanhijazi
0
270
Android: Por onde começar?
hussanhijazi
0
290
Padrões de Projeto e Qualidade de Software
hussanhijazi
0
290
Other Decks in Programming
See All in Programming
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
990
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
0
620
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.3k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.7k
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
100
文字コードの話
qnighy
44
17k
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
200
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
160
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
820
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
470
Six Lessons from altMBA
skipperchong
29
4.2k
It's Worth the Effort
3n
188
29k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Crafting Experiences
bethany
1
81
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
310
From π to Pie charts
rasagy
0
150
30 Presentation Tips
portentint
PRO
1
250
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
170
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]