Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,183 changes: 7,183 additions & 0 deletions docs/assets/apollo_starterkit_housing_var2.step

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/esphome-device-builder-light-turn-off-action.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/esphome-device-builder-light-turn-on-action.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/esphome-device-builder-motion-sensor-trigger.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/rgb-module-case-front.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/rgb-module-case-rear.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ESPHome Device Builder has a new GUI for building <a href="https://esphome.io/au
<div class="annotate" markdown>

- Under **Actions**, click **+ Add action**.
- In the **Add action** dialog, stay on the **By target** tab and choose **Light → Toggle** under the RGB LED group.
- In the **Add action** dialog, stay on the **By target** tab and scroll down towards the bottom, then choose **Light → Toggle** under the RGB LED group.
- On the new action, click the **ID** dropdown and select **RGB LEDs**. (1)

</div>
Expand Down Expand Up @@ -94,8 +94,6 @@ With the device back online, press the button on the Button module. You should h

The same trigger-then-action pattern works for every automation you'll build in Device Builder. Swap the trigger (motion, temperature crossing a threshold, a schedule) or the action (turn on, dim, play a buzzer tone) and you have a new automation.

#### Next Steps

<a href="../../tutorials/light-effects/" class="md-button md-button--primary"><img src="/assets/esphome-logo.svg" /> Next - Light Effects</a>

--8<-- "_snippets/community-help.md"
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: Turn On a Light with Motion
description: >-
Build an ESPHome Device Builder automation: the Motion module turns on the LED
& Buzzer module's RGB light whenever it detects movement.
Build an ESPHome Device Builder automation: the Motion module turns the LED
& Buzzer module's RGB light on when it detects movement and off when motion
stops.
---
# Turn On a Light with Motion

<span class="difficulty lvl-1">Difficulty: Level 1</span>

This tutorial uses the Motion module and the LED & Buzzer module connected to the ESP32-C6. When the PIR sensor detects movement, the RGB light turns on. It's the same trigger-then-action pattern as the [Button Controlled LEDs](button-controlled-leds.md) automation, swapping the button trigger for a motion trigger.
This tutorial uses the Motion module and the LED & Buzzer module connected to the ESP32-C6. When the PIR sensor detects movement, the RGB light turns on, and when the movement stops, the light turns back off. It's the same trigger-then-action pattern as the [Button Controlled LEDs](button-controlled-leds.md) automation, swapping the button trigger for a motion trigger.

!!! note "Before you start"

Expand All @@ -20,7 +21,9 @@ This tutorial uses the Motion module and the LED & Buzzer module connected to th

## Build the automation

ESPHome Device Builder has a GUI for building <a href="https://esphome.io/automations/" target="_blank" rel="noreferrer nofollow noopener">automations</a>, so you can wire a trigger to an action without hand-writing YAML. The trigger is the *when*, the thing that makes it fire. The action is the *then do*, what happens when it fires.
ESPHome Device Builder has a GUI for building <a href="https://esphome.io/automations/" target="_blank" rel="noreferrer nofollow noopener">automations</a>, so you can wire a trigger to an action without hand-writing YAML. The trigger is the *when*, the thing that makes it fire. The action is the *then do*, what happens when it fires. You'll build two automations on the same Motion module: one that turns the lights on when motion is detected, and one that turns them off when motion stops.

#### Turn the lights on

1. Open your starter kit device in ESPHome Device Builder and click **Edit**. If you need a refresher on the editor, see the [Device Builder Tour](../learning-the-basics/device-builder-tour.md#editor).
2. In the editor's left pane, expand the **Automations** dropdown and click **Add Automation**.
Expand All @@ -33,21 +36,21 @@ ESPHome Device Builder has a GUI for building <a href="https://esphome.io/automa

- **What should this automation react to?** → **A configured component**
- **Which configured component?** → **Motion Module (binary_sensor.gpio)**
- **Which trigger?** → **Binary Sensor → On Click** (1)
- **Which trigger?** → **Binary Sensor → On Press** (1)

</div>

1. **On Click** fires the moment the sensor detects motion. The dropdown also offers **On Release** (the moment motion stops) and **On State** for other occupancy behaviors. You'll use **On Release** in the optional step below to turn the light back off.
1. **On Press** fires the moment the sensor detects motion. The dropdown also offers **On Release** (the moment motion stops) and **On State** for other occupancy behaviors. You'll use **On Release** in the next section to turn the lights back off.

![](../../../assets/esphome-device-builder-motion-sensor-trigger.gif)

4. Click **Continue**. You land on the **Binary Sensor → On Click** editor with the **Target** already set to your Motion module.
4. Click **Continue**. You land on the **Binary Sensor → On Press** editor with the **Target** already set to your Motion module.
5. Set up the action:

<div class="annotate" markdown>

- Under **Actions**, click **+ Add action**.
- In the **Add action** dialog, stay on the **By target** tab and choose **Light → Turn On** under the RGB LED group.
- In the **Add action** dialog, stay on the **By target** tab and scroll down towards the bottom, then choose **Light → Turn On** under the RGB LED group.
- On the new action, click the **ID** dropdown and select **RGB LEDs**. (1)

</div>
Expand All @@ -67,44 +70,33 @@ ESPHome Device Builder has a GUI for building <a href="https://esphome.io/automa
pin: 3
device_class: motion
id: motion_module
on_press:
on_press: # (1)!
then:
- light.turn_on: rgb_leds
```

See [Device Builder Tour → YAML editor (right)](../learning-the-basics/device-builder-tour.md#yaml-editor-right) for the full breakdown of the YAML pane.

## Install the firmware

Your automation is saved in Device Builder, but the device is still running its old firmware. Compile and install the new code to push the change.

1. Click **Save** in the bottom right of the editor.
2. Click **Install**, then pick **On the Network** to push the new firmware over Wi-Fi.
3. Wait for the compile and flash to finish. The device reboots once the install is done.

![](../../../assets/esphome-device-builder-install-button-component.gif)
1. `on_press` is the YAML name for the **On Press** trigger you picked in the GUI.

## Test the automation

With the device back online, wave your hand in front of the PIR sensor. The RGB light turns on as soon as motion is detected.

!!! tip "Give the Motion sensor a moment to settle"
See [Device Builder Tour → YAML editor (right)](../learning-the-basics/device-builder-tour.md#yaml-editor-right) for the full breakdown of the YAML pane.

PIR sensors need a brief warm-up after powering on, usually 5 to 10 seconds, before their readings stabilize. If the light triggers right after boot with nothing moving, give the sensor a moment.
#### Turn the lights off

## Optional: turn the light off when motion stops
Right now the lights turn on with motion but never turn off. Add a second trigger to the same Motion module so the lights switch off once motion clears.

Right now the light turns on with motion but never turns off. Add a second trigger to the same Motion module so the light switches off once motion clears.
<div class="annotate" markdown>

1. Add another automation, this time choosing **Binary Sensor → On Release** as the trigger for the Motion module.
1. Add another automation, this time choosing **Binary Sensor → On Release** as the trigger for the Motion module. (1)

![](../../../assets/esphome-device-builder-motion-sensor-on-release.gif)

2. Give it a **Light → Turn Off** action targeting **RGB LEDs**.
2. Give it a **Light → Turn Off** action targeting **RGB LEDs**. (2)

![](../../../assets/esphome-device-builder-light-turn-off-action.gif)

3. **Save** and **Install** again.
</div>

1. PIR sensors hold their "motion detected" state for a few seconds after movement stops, so **On Release** fires shortly after the room goes still, not the instant you stop moving.
2. As before, the **ID** dropdown only needs changing if your device also has an **Onboard RGB LED** component configured. If **RGB LEDs** is the only light, it's already selected.

??? note "What the GUI built in YAML"

Expand All @@ -117,16 +109,35 @@ Right now the light turns on with motion but never turns off. Add a second trigg
pin: 3
device_class: motion
id: motion_module
on_press:
on_press: # (1)!
then:
- light.turn_on: rgb_leds
on_release:
on_release: # (2)!
then:
- light.turn_off: rgb_leds
```

1. The **On Press** trigger from the first automation.
2. `on_release` is the YAML name for the **On Release** trigger, firing when the sensor stops reporting motion.

## Install the firmware

Your automation is saved in Device Builder, but the device is still running its old firmware. Compile and install the new code to push the change.

1. Click **Save** in the bottom right of the editor.
2. Click **Install**, then pick **On the Network** to push the new firmware over Wi-Fi.
3. Wait for the compile and flash to finish. The device reboots once the install is done.

![](../../../assets/esphome-device-builder-install-firmware-motion-sensor.gif)

## Test the automations

!!! success "You've built a motion-activated light!"

Same trigger-then-action pattern, new trigger. Swap the action (play a buzzer tune, dim the light, send a notification) or the trigger (a button, a temperature threshold, a schedule) and you have a new automation.

With the device back online, wave your hand in front of the PIR sensor. The RGB light turns on as soon as motion is detected, then turns off shortly after the sensor stops seeing movement. If the light triggers right after boot with nothing moving, give the sensor a moment. PIR sensors need a brief warm-up after powering on, usually 5 to 10 seconds, before their readings stabilize.

<a href="../temp-reactive-leds/" class="md-button md-button--primary"><img src="/assets/esphome-logo.svg" /> Next - Temp-Reactive LEDs</a>

--8<-- "_snippets/community-help.md"
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ESPHome Device Builder has a GUI for building <a href="https://esphome.io/automa
<div class="annotate" markdown>

- Under **Actions**, click **+ Add action**.
- In the **Add action** dialog, stay on the **By target** tab and choose **Light → Turn On** under the RGB LED group.
- In the **Add action** dialog, stay on the **By target** tab and scroll down towards the bottom, then choose **Light → Turn On** under the RGB LED group.
- On the new action, click the **ID** dropdown and select **RGB LEDs**. (1)
- Toggle on **Red**, **Green**, and **Blue** controls. Set **Red** `0%`, **Green** `0%`, **Blue** `100%`.

Expand Down Expand Up @@ -160,8 +160,6 @@ Open the Comfortable and Hot triggers in the GUI and edit the **Above** / **Belo

Same trigger-then-action pattern, new trigger type. Next, bring it into Home Assistant so the readings show up alongside the rest of your kit.

#### Next Steps

<a href="../../tutorials/connect-to-home-assistant/" class="md-button md-button--primary"><img src="/assets/esphome-logo.svg" /> Next - Connect to Home Assistant</a>


Expand Down
26 changes: 26 additions & 0 deletions docs/products/ESPHome-Starter-Kit/community-corner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Community Corner
description: >-
Creations from the Apollo community for the ESPHome Starter Kit, including
3D-printable cases, automations, and mods.
---
# Community Corner

The Community Corner is dedicated to sharing some really great projects created by the community. It could be anything: a 3D-printed case, a clever automation, a cool use case, you name it. Post your build on our forums, Discord, or Reddit and we'll see if it's worthy of being displayed for the masses.

[Join our Discord :simple-discord:](https://link.apolloautomation.com/discord){ .md-button .md-button--discord }
[Community Forum :material-forum:](https://forum.apolloautomation.com/){ .md-button .md-button--primary }

## 3D Prints

### LED & Buzzer Module Case

*Created by @_cadster on Discord*

A printable housing for the LED & Buzzer module. Print one and give your notification module a finished look on a desk or shelf. It also has a slot in the back for a ribbon cable to attach another module, such as the button!

[Download the .STEP file :material-download:](../../assets/apollo_starterkit_housing_var2.step){ .md-button .md-button--primary }

![](../../assets/rgb-module-case-front.jpeg)

![](../../assets/rgb-module-case-rear.jpeg)
6 changes: 3 additions & 3 deletions docs/products/ESPHome-Starter-Kit/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ description: Frequently asked questions about the ESPHome Starter Kit, ESPHome D

6\. **Can the kit run on battery power?**

* The main board is powered by USB-C today. It also has built-in support for a rechargeable LiPo battery, which is planned as a future module so the kit can be deployed cable-free around the home. The battery is not available yet.
* The ESP32-C6 is powered by USB-C today. It also has built-in support for a rechargeable LiPo battery, which is planned as a future module so the kit can be deployed cable-free around the home. The battery is not available yet.

7\. **What is the ESPHome Desktop app?**

* ESPHome Desktop is the free, open source desktop version of the ESPHome Device Builder. It runs on Mac, Windows, and Linux. For the first time, new users no longer need to install Home Assistant first, set up a Raspberry Pi, or run a server to use ESPHome. Download it, plug in the kit, and a guided setup walks you through the rest. Open <a href="https://desktop.esphome.io" target="_blank" rel="noreferrer nofollow noopener">desktop.esphome.io</a> to download the latest release for your operating system, then follow [First Steps](setup/first-steps.md) to set up your first device. For a deeper look at how ESPHome and the app fit together, see [Explaining ESPHome](learning-the-basics/explaining-esphome.md).

8\. **What can I build with it?**

* By the end of the included learning path, you will have built four working devices: a [motion sensor](modules/motion-module.md), an [environment monitor](modules/temperature-humidity-module.md) (temperature and humidity), a [button trigger](modules/button-module.md), and a [notification light](modules/rgb-buzzer-module.md). Two modules can run on the main board at the same time, turning the kit into a multi-purpose sensor for any room. Beyond the lessons, every skill carries straight into the <a href="https://esphome.io/" target="_blank" rel="noreferrer nofollow noopener">wider ESPHome ecosystem</a>.
* By the end of the included learning path, you will have built four working devices: a [motion sensor](modules/motion-module.md), an [environment monitor](modules/temperature-humidity-module.md) (temperature and humidity), a [button trigger](modules/button-module.md), and a [notification light](modules/rgb-buzzer-module.md). Two modules can run on the ESP32-C6 at the same time, turning the kit into a multi-purpose sensor for any room. Beyond the lessons, every skill carries straight into the <a href="https://esphome.io/" target="_blank" rel="noreferrer nofollow noopener">wider ESPHome ecosystem</a>.

9\. **What happens when I am "done" learning?**

Expand All @@ -60,7 +60,7 @@ description: Frequently asked questions about the ESPHome Starter Kit, ESPHome D

14\. **Why a ribbon cable instead of a breadboard?**

* Breadboards and jumper wires are the most common source of frustration for new builders: loose connections, wrong pins, wires that pop out. The ESPHome Starter Kit uses a single FPC (flexible printed circuit) ribbon cable that connects each module to the main board in seconds. Every connection is identical, foolproof, and reliable. Components snap together and stay together.
* Breadboards and jumper wires are the most common source of frustration for new builders: loose connections, wrong pins, wires that pop out. The ESPHome Starter Kit uses a single FPC (flexible printed circuit) ribbon cable that connects each module to the ESP32-C6 in seconds. Every connection is identical, foolproof, and reliable. Components snap together and stay together.

15\. **Why the ESP32-C6 chip?**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Apollo ships the rail enabled and set to come back on after a reboot, so the kit
- **Restore mode.** Controls what happens to the rail when the device powers back on after losing power. The Apollo default is **restore the last state, default to on**, so a power blip won't leave your modules dark. Other options like "always on" or "always off" are available if you want a specific boot behavior.
- **Hide it from Home Assistant.** By default the rail shows up as a controllable switch entity in HA, handy for power-cycling a flaky module from an automation. If you'd rather it not clutter your dashboard, mark it `internal: true` under the advanced settings.
- **Icon and name.** Cosmetic, but you can rename the entity or change its icon if "Accessory Power Rail" isn't how you want it to appear in HA.
- **GPIO pin.** Informational, not something you should change. The pin is fixed in hardware on the ESPHome Starter Kit board, so editing it will just stop the rail from working.
- **GPIO pin.** Informational, not something you should change. The pin is fixed in hardware on the ESP32-C6, so editing it will just stop the rail from working.

#### How It Works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ description: A short overview of what ESPHome is, how the Device Builder app fit
---
# Explaining ESPHome

ESPHome is the open-source firmware project that powers your Apollo ESPHome Starter Kit. You describe what is connected to your board (a button, a sensor, an LED) and ESPHome runs on the device, exposes those parts to Home Assistant, and accepts updates over the network.
ESPHome is the open-source firmware project that powers your Apollo ESPHome Starter Kit. You describe what is connected to your ESP32-C6 (a button, a sensor, an LED) and ESPHome runs on the device, exposes those parts to Home Assistant, and accepts updates over the network.

You do not need to write any code to use it. For the Starter Kit, the **ESPHome Device Builder** app handles it.

## ESPHome vs Device Builder

These two names get used interchangeably, but they are different pieces:

- **ESPHome** is the software that runs on your device after it has been flashed. It is what makes your board talk to Home Assistant, expose its sensors and controls, and accept wireless updates.
- **ESPHome** is the software that runs on your device after it has been flashed. It is what makes your ESP32-C6 talk to Home Assistant, expose its sensors and controls, and accept wireless updates.
- **ESPHome Device Builder** is the app where you set everything up. Pick the components you want (button, LED, sensor, etc.), click **Install**, and the Builder compiles the firmware and flashes it to your device. Run it as a desktop app on Windows, Mac, or Linux, or install it as a Home Assistant app.

For the Starter Kit, you will spend almost all your time in the Device Builder.
Expand Down
Loading