October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Bettesworth Construction
Assist

Integrating Google Gemini with Home Assistant and Raspberry Pi Pico W

Use Home Assistant as the bridge between Google Gemini and a Raspberry Pi Pico W. This guide covers ESPHome setup, entity exposure, Assist voice control, security, and troubleshooting.

By Bettesworth Construction Team 8 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google Gemini should not run directly on a Raspberry Pi Pico W. The reliable design is to let Home Assistant connect Gemini to the Assist API, while the Pico W runs ESPHome and exposes its sensors, LEDs, switches, or other hardware as Home Assistant entities.

User voice or text
      ↓
Home Assistant Assist
      ↓
Google Gemini conversation agent
      ↓
Home Assistant Assist API
      ↓
ESPHome native API
      ↓
Raspberry Pi Pico W hardware

In this arrangement, Gemini is the conversational layer, Home Assistant is the automation and permission layer, and the Pico W is the hardware layer. That separation keeps the API key off the microcontroller and makes it possible to restrict which devices Gemini can operate.

What this integration actually connects

A Pico W is a wireless RP2040 microcontroller, not a Linux computer. It has 2.4-GHz 802.11n Wi-Fi, 2 MB of flash, 264 KB of SRAM, and GPIO pins for sensors and low-voltage electronics. It does not run Home Assistant or host a Gemini model. See the official Pico documentation and Pico-series documentation.

Home Assistant’s Google Gemini integration is also different from Google’s separate Gemini for Home experience for Google Home and Nest products. This guide concerns Google Gemini configured as a Home Assistant conversation agent, not the Google Home platform. More information about Gemini for Home is available from Google Support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Freenove Raspberry Pi Pico 2 W Board Pre-Soldered Header, Dual Arm Cortex-M33 and Dual Hazard3 RISC-V Microcontroller, Development Board, Tutorial Example Projects
  • Latest Version: Higher core clock speed, double memory, more powerful Arm cores, optional RISC-V cores (compared to the 1 series) (This W version has onboard wireless LAN and Bluetooth)
  • Switchable Cores: Allows users to choose between dual industry-standard Arm Cortex-M33 cores and dual open-hardware Hazard3 cores
  • Compatibility: Delivers a significant performance boost, while retaining software- and hardware-compatible with the 1 series
  • Detailed Tutorial: Provides step-by-step guide with MicroPython, C and Processing (Java) Code (The download link can be found on the product box) (No paper tutorial)
  • Example Projects: Each project has schematics, wiring diagrams, complete code and detailed explanations (Need extra items)

What you need

  • A Home Assistant installation on a supported Raspberry Pi, Home Assistant Green, virtual machine, NAS, or other supported host.
  • A Raspberry Pi Pico W or Pico WH.
  • A USB data cable, not a charge-only cable.
  • A sensor, button, LED, relay module, or other suitable low-voltage hardware.
  • Reliable 2.4-GHz Wi-Fi.
  • ESPHome, installed as the Home Assistant add-on or through its command-line tools.
  • A Google Gemini API key and a Google account or region supported by Google’s current API availability.

Use proper voltage levels, current limits, isolation, enclosures, and fusing. Never connect a mains load directly to a Pico GPIO pin. A relay module must be appropriate for the load and installed safely; mains work should be performed by a qualified person.

Choose the connection method

Recommended: ESPHome native API

For a new Pico W/Home Assistant project, use ESPHome’s current RP2 platform and its native Home Assistant API. This gives Home Assistant real-time device communication and straightforward entity discovery with less custom networking code.

The current platform key is rp2, and the Pico W board identifier is rpipicow. The older rp2040: key is a deprecated alias in the documented transition period; use rp2: for new configurations.

When MicroPython makes more sense

MicroPython may be preferable if you already have firmware, need unusual peripherals, require custom buffering, or need networking that ESPHome does not provide. A possible design is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Pico W running MicroPython
        ↓
MQTT broker or HTTP endpoint
        ↓
Home Assistant entities
        ↓
Gemini through Home Assistant

This is not the default ESPHome path. ESPHome’s current MQTT documentation lists several platforms but does not list RP2. A custom MicroPython solution also requires careful decisions about authentication, TLS, topic design, retained state, availability, discovery, reconnects, watchdogs, and firmware updates.

Approach Best for Main trade-off
ESPHome native API New Pico W/Home Assistant projects Simplest integration, but component coverage differs from ESP32
MicroPython plus MQTT Existing custom firmware Flexible, but adds a broker and reliability work
MicroPython plus HTTP Simple occasional uploads or commands More polling and state-synchronization concerns
ESP32 Projects needing mature ESPHome components Requires different hardware and pin assignments

Flash ESPHome to the Pico W

Create pico-w.yaml with a minimal configuration:

esphome:
  name: pico-w
  friendly_name: Pico W

rp2:
  board: rpipicow

logger:

api:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "Pico-W Fallback"
    password: !secret pico_fallback_password

captive_portal:

Do not add an old platform_version override unless a specific compatibility issue requires it. The current ESPHome documentation says it is no longer required and may cause compilation problems.

Optional onboard LED

For a simple, low-risk first test, add:

output:
  - platform: gpio
    pin: GPIO25
    id: onboard_led_output

light:
  - platform: binary
    name: "Pico W LED"
    output: onboard_led_output

Check GPIO assignments against your particular board and circuit. The onboard LED and pin arrangement can differ on compatible boards or clones.

Rank #2
waveshare Pre-Soldered Raspberry Pi Pico W Microcontroller Board Basic Kit,Built-in WiFi,Supports 2.4/5 GHZ Wi-Fi 4,Based On RP2040 Dual-Core Processor
  • 【Raspberry Pi Pico W with pre-soldered header】a tiny, fast, and versatile microcontroller board.Built Using RP2040 Microcontroller Chip Designed By Raspberry Pi
  • 【Built-In Wi-Fi】Onboard Infineon CYW43439 Wireless Chip, Supports 2.4/5 GHZ Wi-Fi 4
  • 【Dual-Core Arm Processor】Dual-Core Arm Cortex M0+ Processor, Flexible Clock Running Up To 133 MHz
  • 【C/C++, MicroPython Support】Comprehensive SDK, Dev Resources, Tutorials To Help You Easily Get Started
  • 【26 × Multi-Function GPIO Pins】Configurable Pin Function, Allows Flexible Development And Integration

Validate, compile, upload, and view logs

With the ESPHome command-line tools, run:

esphome config pico-w.yaml
esphome compile pico-w.yaml
esphome upload pico-w.yaml
esphome logs pico-w.yaml

Alternatively, esphome run pico-w.yaml validates, compiles, uploads, and starts logs as appropriate for the selected device.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the first USB flash:

  1. Hold the Pico W BOOTSEL button.
  2. Connect the board to the computer with USB.
  3. Release BOOTSEL when the mass-storage drive appears.
  4. Allow ESPHome to upload the firmware when prompted.

Raspberry Pi documents the Pico-series USB and BOOTSEL process in its MicroPython documentation.

Add the Pico W to Home Assistant

Once the board joins Wi-Fi:

  1. Open Settings → Devices & services.
  2. Look for the discovered ESPHome device.
  3. Select Configure, or add the ESPHome integration manually.
  4. If discovery fails, enter the Pico W hostname or IP address.
  5. Confirm that the LED, sensor, switch, or other entities appear.

Home Assistant communicates with ESPHome devices through the native API. See the Home Assistant ESPHome integration documentation.

Give each entity a clear name and assign it to an area. Names such as Workshop Temperature, Greenhouse Fan, Desk Relay, and Pico W LED are easier to interpret than switch_1.

Configure Google Gemini

Create an API key

Use Google AI Studio’s API-key page. Home Assistant’s official integration requires a Gemini API key.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not place the key in Pico firmware, ESPHome YAML committed to source control, browser-side JavaScript, public repositories, screenshots, or shared configuration files. Store it through Home Assistant’s integration configuration or secret-management mechanism.

Add the integration

  1. Open Home Assistant.
  2. Go to Settings → Devices & services.
  3. Select Add Integration.
  4. Search for Google Gemini.
  5. Follow the setup flow and paste the API key.
  6. Select the desired conversation agent and available options.

Labels can change between Home Assistant releases, but Google Gemini is the stable integration name. The official setup and capability details are in Home Assistant’s Google Gemini integration documentation.

Rank #3
Freenove Raspberry Pi Pico W Board Pre-Soldered Header, Dual-core Arm Cortex-M0+ Microcontroller, Development Board, Python C Java Code, Tutorial Example Projects
  • Raspberry Pi Pico W: A tiny, fast, and versatile board built using dual-core Arm Cortex-M0+ processor with wireless LAN and Bluetooth (Comes with pinout card and stickers)
  • Detailed Tutorial: Provides step-by-step guide with MicroPython, C and Processing (Java) Code (The download link can be found on the product box) (No paper tutorial)
  • Example Projects: Each project has schematics, wiring diagrams, complete code and detailed explanations (Need extra items)
  • Easy to Use: Just connect the board to your computer (installed IDE) with the USB cable to program it
  • Get Support: Our technical support team is always ready to answer your questions

Do not hard-code a model name from an old tutorial. Model availability and retirement dates change. Google’s pricing documentation records current model and billing information, including the shutdown of Gemini 2.0 Flash on June 1, 2026. Choose a model currently offered by the Home Assistant integration and Google documentation.

Expose only safe Pico entities

Gemini controls Home Assistant through the Assist API. It can work only with entities that are available and deliberately exposed to the voice assistant.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open Home Assistant’s voice-assistant or exposed-entities settings.
  2. Expose only the Pico-backed entities Gemini needs.
  3. Give each exposed entity a unique, natural name.
  4. Assign the entity to the correct area.
  5. Remove entities that Gemini does not need.

Good first entities include a temperature sensor and an onboard LED. Be cautious with garage doors, locks, alarms, heaters, security cameras, private sensors, and whole-house power controls. For higher-risk equipment, use deterministic automations, physical interlocks, and confirmation steps rather than relying on model interpretation.

Test in a safe order

Use Home Assistant’s Assist text interface before adding microphones or speech synthesis. Text testing isolates API-key, permissions, interpretation, and device-communication problems.

  1. Ask: What is the temperature in the workshop?
  2. Ask: Turn on the Pico W LED.
  3. Ask: Turn off the Pico W LED.
  4. Try a similarly simple command using another low-risk exposed entity.
  5. Temporarily make the Pico unavailable and confirm that Home Assistant reports the failure instead of pretending the device changed state.

A successful control request follows this path: Gemini interprets the request, Home Assistant resolves the entity, Home Assistant calls the supported entity service, ESPHome sends the command to the Pico W, and the GPIO or sensor state is updated.

Add voice only after text works

  1. Create or edit an Assist pipeline.
  2. Select Google Gemini as the conversation agent.
  3. Choose speech-to-text and text-to-speech providers if required.
  4. Select the pipeline for the intended device or dashboard.
  5. Test with short, unambiguous commands.

The Gemini integration can provide conversation, speech-to-text, and text-to-speech capabilities, but available options depend on current Home Assistant and Google integration versions. The Pico W itself is not a complete voice assistant: it lacks the processing, microphone/audio stack, and operating environment normally needed for a robust voice pipeline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Gemini answers but cannot control anything

  • Check that the entity is exposed to the voice assistant.
  • Confirm that the Gemini agent is assigned to the active Assist pipeline.
  • Give the entity a unique name and area.
  • Verify that the entity works from the Home Assistant dashboard.
  • Check Assist conversation or debug output.
  • Confirm that the requested action is supported by the entity.

The Pico entity is unavailable

  • Check Pico power, USB connection, Wi-Fi credentials, and DHCP lease.
  • Review esphome logs pico-w.yaml.
  • Confirm that Home Assistant and the Pico can communicate locally.
  • Check native API connectivity, VLAN rules, and firewalls.
  • Look for repeated reboots or unstable power.
  • Try the device IP address instead of its hostname.

Wi-Fi does not work

The Pico W uses 2.4-GHz Wi-Fi, not 5 GHz. Check the SSID, password, signal, antenna placement, captive portals, enterprise Wi-Fi, VLAN isolation, and board selection. If credentials are wrong, use the configured fallback access point where appropriate.

Rank #4
SunFounder Raspberry Pi Pico W Ultimate Starter Kit with Online Tutorials, RoHS Compliant, 450+ Items, 117 Projects, MicroPython, C/C++ (Compatible with Arduino IDE)
  • IoT Starter Kit for Beginners: The SunFounder Raspberry Pi Pico W Ultimate Starter Kit offers a rich IoT learning experience for beginners aged 8+. With 450+ components, 117 projects, and expert-led video lessons, this kit makes learning microcontroller programming and IoT engaging and accessible, RoHS Compliant
  • Expert-Guided Video Lessons: This kit includes 27 video tutorials by the renowned educator, Paul McWhorter. His engaging style simplifies complex concepts, ensuring an effective learning experience in microcontroller programming
  • Wide Range of Hardware: The kit includes a diverse array of components like sensors, actuators, LEDs, LCDs, and more, enabling you to experiment and create a variety of projects with the Raspberry Pi Pico W
  • Supports Multiple Languages: The kit offers versatility with support for three programming languages - MicroPython, C/C++, and Piper Make, providing a diverse programming learning experience
  • Dedicated Support: Benefit from our ongoing assistance, including a community forum and timely technical help for a seamless learning experience

Also verify that the board is a genuine Pico W or a supported compatible board. ESPHome warns that some clones use a different ESP radio module instead of the expected CYW43439 and may not work with the RP2 platform.

A configuration breaks after an upgrade

Check the platform declaration first. New configurations should use:

rp2:
  board: rpipicow

Replace the older rp2040: declaration unless you have a specific reason to retain a deprecated alias.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Gemini hits limits or becomes unavailable

Google offers free and paid Gemini API tiers. Limits, eligibility, pricing, model availability, and data-use terms vary by region, model, account, modality, and tools. Google’s billing documentation and pricing documentation are the authoritative places to check current conditions. Costs can depend on request count, input and output tokens, voice/audio use, selected models, and optional tools such as search grounding.

Security, privacy, and reliability

Gemini is a cloud service, so requests may leave the local network. Home Assistant notes that free-plan prompts and responses may be used for product improvement, while paid plans have different data-use terms. Do not make an absolute privacy assumption; review Google’s current terms for your account and plan.

  • Expose the minimum number of entities.
  • Avoid sensitive entity names and unnecessary room or occupancy details.
  • Keep API credentials out of firmware and public files.
  • Monitor API usage and configure budget controls where available.
  • Use local Home Assistant automations for essential behavior.
  • Design heaters, motors, doors, and electrical equipment to fail safely if Wi-Fi, Home Assistant, or Gemini is unavailable.
  • Use hardware interlocks and suitable electrical protection for physical equipment.

Gemini should enhance the control interface, not replace deterministic automations or safety systems. Home Assistant remains the place to enforce permissions and reliable rules; the Pico W should perform narrowly defined hardware tasks.

Frequently Asked Questions

Can Gemini run directly on a Raspberry Pi Pico W?

Not as the normal or recommended design. Run Gemini through Home Assistant and use the Pico W as an ESPHome-connected hardware device.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do I need Home Assistant Cloud for this integration?

No. The official Home Assistant Gemini integration requires a Google Gemini API key. Home Assistant Cloud is a separate, optional service.

Is MQTT the best way to connect a Pico W to Home Assistant?

For a new ESPHome Pico W project, use ESPHome’s native API. MQTT is more appropriate when an existing MicroPython application or custom protocol requires it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Site Office

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.