Did you know you can use InfluxDB to monitor your BBQ and to ensure the tastiest results? Join this meetup to learn two different approaches to using a time series database to monitor a BBQ or a smoker. Learn how Will Cooke uses Python, MQTT, Telegraf and InfluxDB 2.0 to monitor his smoker and to gain insight into temperature changes, the stall, and other important stats about his brisket. Scott Anderson will demonstrate how he uses a FireBoard wireless thermometer, Telegraf and InfluxDB 2.0 to continuously work towards the perfect smoke.
22. 22
● Low power
○ Maximum 50% power usage of normal Bluetooth, usually a
lot less
● Low speed
○ Theoretical Max 2Mbps, usually a lot less
● Lower range
○ Claims < 100 meters, usually a lot less
○ Simplified modulation scheme
● Well supported under Linux
● Fairly standard architecture
Bluetooth Low Energy
24. 24
Python code
CREDENTIALS_MESSAGE = bytearray.fromhex("21 07 06 05 04 03 02 01 b8 22 00 00 00 00 00")
REALTIME_DATA_ENABLE = bytearray.fromhex("0B 01 00 00 00 00")
UNITS_FAHRENHEIT = bytearray.fromhex("02 01 00 00 00 00")
UNITS_CELSIUS = bytearray.fromhex("02 00 00 00 00 00")
BATTERY_LEVEL = bytearray.fromhex("08 24 00 00 00 00")
# iBBQ static service
MAIN_SERVICE = 0xFFF0 # Service which provides the characteristics
CCCD_UUID = 0x2902
# iBBQ static characteristics
SETTINGS_RESULTS = 0xFFF1
PAIR_UUID = 0xFFF2
HISTORY_UUID = 0xFFF3 # Don't know how this works, here for completeness
REALTIMEDATA_UUID = 0xFFF4
CMD_UUID = 0xFFF5
# Static hex little endian ones and zeros
ON = bytearray.fromhex("01 00")
OFF = bytearray.fromhex("00 00")
25. 25
Transports
● Line Protocol
○ DIY
● InfluxDB Client Libraries
○ Clients for most languages
○ Someone has done a lot of the hard work for you
● Telegraf
○ No code option
○ Queuing
○ Pre processing
○ Plugin driven
○ Ready made binaries
○ Already using it
26. 26
MQTT
● Brokers
○ Mosquitto
● Client Libraries
○ Every platform and every language
○ Python - Paho MQTT
● Telegraf
○ No code option
○ Already using it!
27. 27
MQTT
● Message Queuing Telemetry Transport
○ pub/sub model
○ Doesn’t actually queue
● Works well on low powered devices
○ Simple protocol = low CPU & memory footprint
● Hierarchy of topics
○ bbq/temperature/1
○ bbq/temperature/2
○ bbq/temperature/3
○ home/sensors/bathroom
○ home/sensors/#
● Payloads
○ bbq/temperature/1 - 106
○ home/sensors/bathroom - {“humidity”:65, “temperature”:25,
“fan_running”:true}
32. 32
Features & Future Plans
● https://github.com/8none1/pybq
○ Contributions welcome!
● Currently working:
○ Reporting temperatures
○ Reporting battery levels
○ Automatically connect to thermometer and start logging
● Alerts
○ Send instant messenger alerts when certain thresholds are hit
○ Leverage Influx Cloud 2 tasks and alerts
● Low Power Mode
○ Only poll the temperature every minute?
● More ribs
54. 54
Other things on my punch list
● Forecasting
○ Estimate remaining cook time
● Enhanced visualizations
○ Status-determined visualization color schemes
● More notifications
○ “Done” alert
○ “Cooling” alert