ESP32 BLE Client for the Weber iGrill_mini, iGrillv2, iGrillv202 and iGrillv3 Devices
This will connect to an iGrill deivce and then publish the temperatures of the probes and the iGrill Device battery level to MQTT for use in Home Automation systems.
- ESP32_iGrill
- Arduino IDE Setup
- Clone and Flash
- Initial Configuration
- Home Assistant Information
- MQTT Information
- Troubleshooting
- iGrill Client Development Status
- Contributions
- Open Arduino IDE
- Click File → Preferences
- Add
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
to the Additional Board Manager URLs. - Click OK
- From the toolbar select Tools → Board "Currently_Selected_Board" → Boards Manager...
- In the Boards Manager Dialog Window Search for esp32
- After a few seconds you should see esp32 by Espressif Systems
- Select the version you want to install (tested with 1.0.5-rc6)
- Click Install
We need to change from the default parition scheme, becuase we utilize both Wifi Manager and Bluetooth libraries. The combination of both are too large for the default partition scheme.
- Open the Libray Manager
- Click Tools → Manage Libraries...
- Search for and install the following libraries
If you have not yet completed the Arduino IDE setup steps or have chosen to skip these steps, ensure you have the correct partition size selected and all the libraries necessary already installed.
- Open the termnial and cd to your Arduino project folder
cd ~/Ardunio
- Clone this repo
git clone https://github.com/1mckenna/esp32_iGrill.git
- Make any Advanced Configuration Changes
After flashing the ESP Device the first time the device will automatically enter configuration mode.
When the device is in configuarion mode it will start a wireless access point named, iGrillClient_esp32ChipID and the Blue LED will stay solid blue.
Wifi SSID Name | Wifi Password |
---|---|
iGrillClient_esp32ChipID | igrill_client |
Setting | Default Value | Comment |
---|---|---|
SSID Name | blank | Primary Wifi Network Name (required) |
SSID Password | blank | Primary Wifi Network Password (required) |
SSID1 Name | blank | Secondary Wifi Network Name If you only want to connect the device to a single network you can leave this blank |
SSID1 Password | blank | Secondary Wifi Network Password If you only want to connect the device to a single network you can leave this blank |
MQTT_SERVER | 127.0.0.1 | Change to your MQTT Broker IP |
MQTT_SERVERPORT | 1883 | Change to your MQTT Broker Port |
MQTT_USERNAME | mqtt | Change to your MQTT Username |
MQTT_PASSWORD | password | Change to your MQTT User Password |
MQTT_BASETOPIC | igrill | Change to your desired base MQTT Topic If you are using Home Assistant and want to take advantage of MQTT Autodiscovery you need to set this to your mqtt autodiscoervy prefix. (Home Assistant Default: homeassistant) |
- Put the device in configuration mode (Press the reset button 2x in quick succession). The blue LED will stay solid once configururation mode has been entered.
- Scan for the new iGrillClient Configuration Wireless network
- Connect to the device using the password igrill_client
- Once you have connected you will be brought to the Main configuration page.
- You should now be at the main configuration page.
Note: Use of a hidden SSID is supported only when using ESP_WifiManager v1.74+ and checking the "Don't use MultiWifi" checkbox on configuration page.
- Discovered networks will show up in the area noted by the green box.
- By selecting a discovered network it will autopopulate that name into the SSID field.
- If you only have one network you can leave SSID1 and its corresponding password field blank
- Populate the missing MQTT Information
- Choose Imperial or Metric Units for Degrees (make sure to match the setting on your iGrill device)
- Configure IP Settings
After you have configured the esp32_iGrill Client and have it connected to the same MQTT Broker as your Home Assistant instance the device should automatically appear.
Below are some images of a sample Home Assistant Dashboard for the iGrill. (Dashboard based off the work of stogs and Jerrit in this thread)
All the configs needed to setup the dashboard have been placed in the ha_example_config directory.
The only thing you should have to change in the ALL the files below is the mac address shown to match your iGrill device.
- Copy the contents of ha_example_config/automations/igrill.yaml into your automations.yaml
- Copy the contents of ha_example_config/sensors/igrill.yaml into your configuration.yaml or your sensors.yaml
- Copy the contents of ha_example_config/input_numbers/igrill.yaml into your configuration.yaml or input_numbers.yaml
- Copy the contents of ha_example_config/lovelace-ui-igrill.yaml into your lovelace-ui.yaml or copy the contents to the clipboard, put your Home Assistant Dashboard into Edit Mode, then open the Raw Configuration editor and paste in the contents.
- You can replace the ESP32 used to talk to the iGrill without needing to make any changes on the Home Assistant side. This is why we use the iGrill MAC in the MQTT topics instead of relying on the ESP32 Device MAC.
- The Battery Level shown for the device in Home Assistant
- The value is the last known battery_level recieved via MQTT
- Will have its value persist throughout restarts of Home Assistant as it and the configuration topics have the retain flag set
MQTT Topic | Value(s) |
---|---|
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/status | online: MQTT Connected offline: MQTT Disconnected |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/systeminfo | System Information about iGrill BLE Client Device (iGrill Device Name, ESP32 Chip ID, Uptime, Wifi Network, Wifi Signal Strength, IP Address) |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_1 | Temperature Value of Probe 1 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_2 | Temperature Value of Probe 2 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_3 | Temperature Value of Probe 3 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_4 | Temperature Value of Probe 4 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/battery_level | Battery Level of the iGrill Device |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/propane_level | Propane Level of the iGrill Device (v3 only) |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_1/config | MQTT Autoconfiguration Settings for Probe 1 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_2/config | MQTT Autoconfiguration Settings for Probe 2 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_3/config | MQTT Autoconfiguration Settings for Probe 3 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_4/config | MQTT Autoconfiguration Settings for Probe 4 |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/battery_level/config | MQTT Autoconfiguration Settings for Battery Level |
MQTT_BASETOPIC/sensor/igrill_iGrillMAC/propane_level/config | MQTT Autoconfiguration Settings for Propane Level (v3 only) |
By default we only set the retain flag on the below topics as you may want to know their status while the iGrill is not in use.
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/battery_level
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/propane_level (iGrillv3 Only)
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/battery_level/config
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_1/config
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_2/config
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_3/config
- MQTT_BASETOPIC/sensor/igrill_iGrillMAC/probe_4/config
Optionally, if you wish to also retain the last seen temperature value as well you can do this via setting MQTT_RETAIN_TEMP true
in your config.h.
- The device is in Configuration Mode after flashing
- Don't Worry you havent lost your configuration
- This can happen due to the reset of the board after flashing getting detected as a second press of the reset button. Just press the reset button on hte board once to reboot the device out of configuration mode.
- I cannot connect to the iGrill Device
- iGrill Devices can only be connected to a single device at a time. For best results unpair the iGrill from all phones/tablets that it has been conncetd to in the past.
- Home Assistant is not showing the correct temperatures but the temperature shown on the device is correct.
- Make sure the Use Metric Degrees setting in the configuration portal matches the setting on your iGrill device.
If you are running into an issue and want to increase the verbosity of the logging that can be done via the following two settings in config.h
_WIFIMGR_LOGLEVEL_
(Default: 1)- Use from 0 to 4. Higher number, more debugging messages and memory usage.
IGRILL_DEBUG_LVL
(Default: 1)- Level 0: Print only Basic Info
- Level 1: Level 0 + Print BLE Connection Info (Default)
- Level 2: Level 1 + Print everything including temp/batt/propane callbacks (Only Recommended for troubleshooting BLE issues)
- AutoDiscover iGrill Devices
- Support for iGrill_mini
- Support for iGrillv2
- Support for iGrillv202 (Newer iGrillv2 Model)
- Support for iGrillv3 (NEW: Propane Level Sensor Support)
- Connect and Authenticate to the iGrill Device
- Read iGrill Device Firmware Version
- Read Battery Level
- Read Temperature Probes
- Detect Temperature Probe Disconnection
- Reconnect on Device Disconnection
- LED Status on ESP
- Wifi
- MQTT Connection
- MQTT Auto Discovery
- Web Setup Interface for Wifi/MQTT
- beed2112 → MQTT Design Consult / Massive Amounts of Testing
- dev-strom → Bug Fixes / Addition of option to disable MultiWifi
- jysaloma → iGrill Mini Support Testing
- Bluhme1 → MQTT_TEMP_RETAIN Enhancement Request/Testing
- eth0up → iGrillv3 Propane Level Enhancement Request/Testing
- mwolter805 → iGrillv202 Model Support Testng