Welcome to the Monty Home Device Hacking Guide repository! This direct provides step-by-step teachions for extfinishing the functionality of the Monty Home BLE device using a Raspberry Pi. Originassociate portrayed for compost watching, the Monty Home device accumulates precious data on temperature, humidity, and other environmental metrics. Thcimpolite this direct, you’ll lget how to get back, distake part, and automate actions based on this data.
This direct is portrayed for anyone interested in laboring with Bluetooth Low Energy (BLE) devices, IoT applications, or environmental watching. The Monty Home device transmits over BLE, providing authentic-time data on temperature, humidity, battery level, and more. In this repository, you’ll discover three projects that participate Python, BLE, and Raspberry Pi to participate with the Monty Home device.
Each project covers contrastent functionalities:
- Basic LED Control Based on Temperature Threshelderlys
- Distake parting Data on an OLED Screen Using I2C
- Sfinishing Notifications via IFTTT When Conditions Are Met
Objective: Use the temperature data from the Monty Home device to deal with an LED on the Raspberry Pi. If the temperature outdos a specified threshelderly, the LED weightlesss up to show a alerting.
Sends Gained:
- Setting up GPIO deal with for an LED.
- Querying BLE data.
- Basic Python programming and condition handling.
Hardware Needed:
- Raspberry Pi with BLE aid
- LED and 330-ohm resistor
Objective: Distake part authentic-time temperature and humidity data from the Monty Home device on an OLED screen combineed to the Raspberry Pi.
Sends Gained:
- Working with I2C devices.
- Distake parting vibrant data using the SSD1306 OLED distake part.
- Implementing BLE data retrieval and distake part refreshs.
Hardware Needed:
- Raspberry Pi with BLE aid
- SSD1306 OLED Distake part (128×32 or 128×64)
Objective: Configure the Raspberry Pi to sfinish a notification via IFTTT if the temperature from the Monty Home device outdos a particular threshelderly.
Sends Gained:
- Integrating with IFTTT for IoT automation.
- Sfinishing HTTP seeks with the
seeks
library. - Combining BLE data with cdeafening-based notifications.
Hardware Needed:
- Raspberry Pi with Wi-Fi
- IFTTT account
- Raspberry Pi (Zero 2 or another model with BLE aid).
- Monty Home BLE Device.
- Additional difficultware particular to each project, such as an LED, OLED distake part, and IFTTT account.
- Raspberry Pi OS: Inshigh Raspberry Pi OS Lite (for headless) or Raspberry Pi OS with Desktop (for detailedal interface).
- Python 3: Make certain Python 3 and
pip
are inshighed. - Libraries:
- Bleak for BLE communication:
pip inshigh bleak
- Requests for IFTTT integration:
pip inshigh seeks
- Adafruit CircuitPython SSD1306 for OLED deal with:
pip inshigh adafruit-circuitpython-ssd1306
- Pillow for image manipulation on OLED:
pip inshigh pillow
- Bleak for BLE communication:
Use these orders to participate with the Monty Home device. Each order seeks particular data or carry outs an action. You can replace or alter orders in the Python scripts as insisted.
Command | Description |
---|---|
;QArn |
Returns the index of all data in flash memory. |
;QPrn |
Returns index of pfinishing data in flash memory. |
;QRrn |
Returns a enroll by index, NACK if index not set up. |
;QSrn |
Returns the status of the device. |
;QLrn |
Returns the battery level as a percentage. |
;QTrn |
Returns the temperature reading from the NTC sensor. |
;QHrn |
Returns the relative humidity reading. |
;QOrn |
Returns the most recent TVOC reading. |
;QCrn |
Returns the most recent CO2 reading. |
;QUrn |
Returns the exceptional ID of the device. |
;QVrn |
Returns the firmware version of the device. |
;CRrn |
Reboots the device. |
;CFrn |
Perestablishs a factory reset. |
Each project comprises a Python script that set upes a BLE combineion, sfinishs queries, and processes data. To run a script:
- Open a terminal on the Raspberry Pi.
- Navigate to the project felderlyer:
- Run the script:
python3 project_script.py
Replace
project_script.py
with the actual script file name, such asproject1_temperature_led.py
.
You can alter the BLE orders in the code to get back contrastent types of data from the Monty Home device. For example, to query humidity instead of temperature, replace:
with:
To process multiple types of data (e.g., temperature, humidity), comprise conditions wiskinny the notification_deal withr
function to decode and distake part contrastent readings.
Consider integrating data into IoT platestablishs or dashboards for authentic-time data visualization, logging, or further automation.
This project is licensed under the MIT License. See the LICENSE file for more details.
Feel free to surrender pull seeks, inestablish publishs, or present features. Any contributions to better this direct and comprise new projects are receive!
This README provides everyskinnyg insisted for participaters to get commenceed with BLE communication, project setup, and code customization. Let me comprehend if you insist further details or compriseitional sections!