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
250
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
310
Jetpack Compose Um novo jeito de construir Views no Android
hussanhijazi
1
240
Encender una cafetera con Micropython, MQTT y Android
hussanhijazi
0
260
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
230
Padrões de Projeto e Qualidade de Software
hussanhijazi
0
220
Other Decks in Programming
See All in Programming
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
190
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
350
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
42 best practices for Symfony, a decade later
tucksaun
1
180
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
760
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
260
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
200
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
Featured
See All Featured
Making Projects Easy
brettharned
116
5.9k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A designer walks into a library…
pauljervisheath
204
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
BBQ
matthewcrist
85
9.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Music & Morning Musume
bryan
46
6.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
4 Signs Your Business is Dying
shpigford
181
21k
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]