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
290
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
350
Jetpack Compose Um novo jeito de construir Views no Android
hussanhijazi
1
290
Encender una cafetera con Micropython, MQTT y Android
hussanhijazi
0
300
Prototipando com RaspberryPi e Node-RED
hussanhijazi
0
240
MVVM com RxJava com Kotlin
hussanhijazi
0
250
Kotlin A nova linguagem oficial do Android
hussanhijazi
0
270
Desenvolvimento ágil
hussanhijazi
0
240
Android: Por onde começar?
hussanhijazi
0
260
Padrões de Projeto e Qualidade de Software
hussanhijazi
0
250
Other Decks in Programming
See All in Programming
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.4k
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
12
6.7k
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
460
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
980
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
180
Deep Dive into ~/.claude/projects
hiragram
14
11k
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
5
650
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
160
Hack Claude Code with Claude Code
choplin
6
2.4k
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
22
9k
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
200
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
15
5.3k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
The Language of Interfaces
destraynor
158
25k
Building an army of robots
kneath
306
45k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Thoughts on Productivity
jonyablonski
69
4.7k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
Optimizing for Happiness
mojombo
379
70k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
How STYLIGHT went responsive
nonsquared
100
5.6k
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]