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
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
360
Jetpack Compose Um novo jeito de construir Views no Android
hussanhijazi
1
290
Encender una cafetera con Micropython, MQTT y Android
hussanhijazi
0
310
Prototipando com RaspberryPi e Node-RED
hussanhijazi
0
250
MVVM com RxJava com Kotlin
hussanhijazi
0
260
Kotlin A nova linguagem oficial do Android
hussanhijazi
0
270
Desenvolvimento ágil
hussanhijazi
0
250
Android: Por onde começar?
hussanhijazi
0
280
Padrões de Projeto e Qualidade de Software
hussanhijazi
0
270
Other Decks in Programming
See All in Programming
なぜGoのジェネリクスはこの形なのか? - Featherweight Goが明かす設計の核心
qualiarts
0
240
CSC305 Lecture 10
javiergs
PRO
0
220
Flutterで分数(Fraction)を表示する方法
koukimiura
0
140
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.6k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
950
contribution to astral-sh/uv
shunsock
0
510
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
33k
SODA - FACT BOOK(JP)
sodainc
1
8.6k
CSC305 Lecture 09
javiergs
PRO
0
310
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.1k
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
110
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
Building Applications with DynamoDB
mza
96
6.7k
Code Reviewing Like a Champion
maltzj
526
40k
Context Engineering - Making Every Token Count
addyosmani
8
300
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
Being A Developer After 40
akosma
91
590k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Optimizing for Happiness
mojombo
379
70k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
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]