This section is under development
GitHub : https://github.com/growboxguy/Gbox420/tree/master/ESPHome
This section is under development
GitHub : https://github.com/growboxguy/Gbox420/tree/master/ESPHome
The new generation of Gbox420 Hempy module, which runs on Pico Raspberry W with the help of Home Assistant and ESPHome.
Goals:
Port the Hempy module to Raspberry Pi Pico W with ESPHome and Home Assistant OS ✅
Develop an ESPHome component for Hempy Bucket watering logic ✅
Enable direct Wi-Fi communication with Home Assistant via ESPHome (no MQTT dependency) ✅
Utilize a single weight platform to monitor bucket weight and calculate water drainage into the waste reservoir ✅
Wireless updates, after the initial upload via USB (factory.uf2 ✅
Self hosted webpage for monitoring and controlling ESPHome's web_server is not supported on the PicoW (so far) ❌
Supports pumpless mode: a manual watering fallback when the pump fails. In DRY mode, the module emits three beeps to indicate a problem, followed by beeps corresponding to the bucket number. During manual watering the module beeps when the Wet weight is reached ✅
Testing ✅
Documentation (in progress)
Pico W vs Arduino Nano R3 main differences:
132 times more SRAM (264KB vs 2KB)
Flash (2MB vs 32KB)
No EEPROM : ESPHome can use the built-in flash to store user-configurable values between reboots.
Lower I/O pin voltage (3.3V vs 5V) - Most components support 3.3V, the AC power sensor and relays could be problematic. Will need to use logic level shifters.
26 GPIO pins (16 PWM, 3 Analog) vs 22 GPIO pins (6 PWM, 6 Analog)
Raspberry Pi Pico W
2 Mb flash26 × multi-function GPIO pins: 3 x Analog pins,Go to Settings > Automations & Scenes in Home Assistant.
Click + Add Automation, then choose Start with an Empty Automation.
Switch to YAML mode and paste the YAML code below: https://github.com/growboxguy/Gbox420/blob/master/ESPHome/hempyAutomation.yaml
(optional) If you have the Home Assistant companion app install on your mobile device, locate the following line in the YAML automation:
notify.mobile_app_MOBILENAME #Update MOBILENAME to the device name that has HA Companion app installed
and change the MOBILENAME part to the name of your phone as listed in Home Assistant\Settings\Devices & Services\ Devices tab
Save and activate the automation.
Samples of Home Assistant companion app notification with action buttons, and Home Assistant system notification:
set up your Gbox420 dashboard in Home Assistant:
Go to Settings in Home Assistant.
Select Dashboards.
Click + ADD DASHBOARD.
Choose New dashboard from scratch.
Enter Gbox420 as the dashboard name.
Save and switch to the new dashboard
Click Edit Dashboard in the top-right corner.
Select the three dots menu and choose Raw configuration editor.
Paste the contents from https://github.com/growboxguy/Gbox420/blob/master/ESPHome/hempyDashboard.yaml
Save your changes.
Important Note
The dashboard relies on the following HACS addons:
Multiple Entity RowHome Assistant Community+2GitHub+2GitHub+2
slider-entity-rowHome Assistant Community+8GitHub+8GitHub+8
Number BoxHome Assistant Community+2GitHub+2Home Assistant Community+2
Due to using these addons, whenever editing the dashboard or a card, use the SHOW CODE EDITOR button and edit the YAML file directly:
Install Python and ESPHome:
Check if phyton is installed:
python --version
if not: Install it from the Python website, select "Add Python to PATH" and "Run as admin" during the installation, and restart once done.
Check if the Python package manager is installed:
pip --version
if not: Verify PATH variable exists C:\Users\USERPROFILE\AppData\Local\Programs\Python\Python313\
Install esphome:
pip install esphome
Change passwords:
Rename secrets_hempy.yaml to secrets.yaml (or merge into existing secrets.yaml) and update WiFi SSID, WiFi password, Encryption key, and OTA passwords.
Build image:
In a terminal open the folder where you have downloaded https://github.com/growboxguy/Gbox420/tree/master/ESPHome
Compile the esphome image:
esphome compile hempy.yaml
Note: By default, the compiler will download the hempy component from the Hempy GitHub repository.
If you need to modify the watering logic inside __init__.py, hempy.cpp, or hempy.h, you must change the external_components section in hempy.yaml to load the component from a local components folder instead of GitHub.
The first time uploading you need to:
Connect the Pico W to the PC while holding the Boot Select Button and verify it shows up as a storage device
Locate the freshly compiled firmware.uf2 image under the config\esphome\build\.pioenvs folder
Upload firmware.uf2 to the Pico W storage device
Once the esphome firmware is running, you can upload new versions using:
esphome upload hempy.yaml
You can verify the ESPHome firmware by accessing the logs generated by the Pico W by running the following command:
esphome logs hempy.yaml