Reference: DIY USB Examples

You can create your own external triggers using Arduino, ESP32, Raspberry Pi, or other similar DIY hardware. The setup needs to be made per the below details:

Your DIY hardware must either:

  1. Have its own power source separate from Sidekick so that it is powered on and running all the time to monitor the incoming power.
    1. The Sidekick USB A port must be connected to your hardware to be monitored for 5V power.
    2. When your DIY board detects power coming from the USB A port, you can perform any function of your choosing.
    3. When your DIY board detects that power from the USB A port has stopped (alert snoozed/stopped), you can perform another function.
  2. Run on USB A, 5V, 1 Amp or less and automatically perform your dedicated functions when powered on.
    1. Plug your external hardware into Sidekick's USB A port.
    2. If your hardware connects to WiFi, bluetooth, or has other delayed startup functions, you should only use the first DIY option above to ensure the alert function you have programmed runs immediately.

Example: ESP32 3.3V Setup Voltage divider wiring and example code for ESP32 boards

🧰 What you need:

  • ESP32 board (like a DevKitC or NodeMCU-ESP32)
  • USB-A cable with exposed 5V (red) and GND (black) wires
  • Two resistors for voltage divider (e.g., 10kΩ + 20kΩ → drops 5V to ~3.3V)
  • Breadboard and jumper wires

🔌 Wiring

USB Wire | Connect to

Red (5V) | Voltage divider → ESP32 GPIO (e.g., GPIO 18)

Black (GND) | ESP32 GND

Voltage divider setup:

USB 5V → [20kΩ] → GPIO 18
           ↓
        [10kΩ] → GND

This drops 5V down to ~3.3V safely.

✅ Example Code (ESP32, digital read)

const int usbPowerPin = 18;  // GPIO18 gets the divided signal
bool lastState = LOW;

void setup() {
  pinMode(usbPowerPin, INPUT);
  Serial.begin(115200);
}

void loop() {
  bool currentState = digitalRead(usbPowerPin);
  if (currentState != lastState) {
    if (currentState == HIGH) {
      Serial.println("USB Power ON");
      // YOUR ALERT START CODE GOES HERE
    } else {
      Serial.println("USB Power OFF");
      // YOUR ALERT STOP CODE GOES HERE
    }
    lastState = currentState;
  }
  delay(100); // debounce / polling delay
}

⚠️ Important:

  • Do NOT connect 5V directly to ESP32 pins — always drop it to ≤3.3V.
  • ESP32 pins are usually labeled GPIO on your board — you can pick most, but avoid strapping pins (like GPIO0, GPIO2, GPIO15).
  • Use Serial.begin(115200) — ESP32 typically uses higher serial baud rates than Arduino Uno.
Example: Arduino 5V Setup Direct 5V input wiring and example code for Arduino boards

🧰 What you need:

  • Arduino Uno (or similar)
  • USB-A cable with the 5V (red) and GND (black) wires exposed
  • Connect the 5V wire to an Arduino digital pin (or analog for voltage measurement)
  • Optionally use a resistor divider if needed

✅ Simple Example Code

This version monitors the 5V USB line connected to digital pin 2:

const int usbPowerPin = 2;  // USB 5V line connected here
bool lastState = LOW;

void setup() {
  pinMode(usbPowerPin, INPUT);
  Serial.begin(9600);
}

void loop() {
  bool currentState = digitalRead(usbPowerPin);
  if (currentState != lastState) {
    if (currentState == HIGH) {
      Serial.println("USB Power ON");
      // YOUR ALERT START CODE GOES HERE
    } else {
      Serial.println("USB Power OFF");
      // YOUR ALERT STOP CODE GOES HERE
    }
    lastState = currentState;
  }
  delay(100); // debounce / polling delay
}

Wiring

  • USB 5V (usually red)Pin 2
  • USB GND (usually black)GND on Arduino

⚠️ Important: Ensure the USB power doesn't exceed 5V. If you're unsure, use a voltage divider (e.g., 10kΩ and 10kΩ) to cut voltage in half and measure with an analog pin.

Example DIY Integrations Apple HomeKit, Google Home, Home Assistant, relays, motors, and more

This is a list of examples found online for integrating various devices with Arduino, ESP32, etc. We have not tested any of these examples.

Apple HomeKit Integration Native HomeKit via HAP library using ESP32 or ESP8266

HomeKit (via HAP library)

Requires ESP32 or ESP8266. Native HomeKit support using the Arduino-HomeKit-ESP8266 or HomeSpan libraries.

Example Projects:

Google Home Integration (via Google Assistant) Connect via IFTTT, Firebase, or MQTT bridge

Arduino doesn't integrate directly with Google Home, but you can use platforms like IFTTT, Firebase, or MQTT to bridge them.

1. Arduino + IFTTT + Google Assistant

Trigger Arduino via voice commands through IFTTT webhooks.

Example Projects:

  • Control Arduino Using Google Assistant via IFTTT
  • IFTTT + ESP8266 Example

2. Google Firebase + ESP8266/ESP32

Use Firebase Realtime Database to sync with Google Assistant/Apps Script.

Example Tutorial:

  • Firebase-Controlled Home Automation
Home Assistant Integration MQTT, HTTP, or ESPHome — best DIY smart home integration

Best DIY smart home platform for Arduino integration. Communicates via MQTT, HTTP, or ESPHome.

1. Arduino with MQTT and Home Assistant

Publish/subscribe messages to control or read Arduino devices.

Example Projects:

2. ESPHome (recommended for ESP32/ESP8266)

Zero-code firmware builder that talks to Home Assistant. Add switches, sensors, lights directly via YAML.

Example Projects:

Relays (to control AC devices) Trigger lamps, fans, or appliances via relay module

Trigger high-voltage devices like lamps, fans, or appliances.

Example Code:

  • Relay Module Control
  • Arduino Relay Tutorial (CircuitDigest)
Motors (DC, Servo, Stepper) DC, servo, and stepper motor control examples

For movement in robotics, automation, etc.

Example Code:

  • DC Motor
  • Servo Motor
  • Stepper Motor
Solenoids Electromagnetic lock or push/pull mechanism examples

Electromagnetic lock or push/pull mechanisms.

Example Code:

  • Solenoid Lock Control
Internet Services (via WiFi/Ethernet) Trigger IFTTT webhooks, emails, or cloud automations

Trigger a web request, IFTTT, or cloud automation.

Example Code:

  • Send Data to IFTTT
  • Send Email or Notifications
Servo-controlled Mechanisms Lockboxes, robotic arms, door locks

Lockboxes, robotic arms, door locks.

Example Code:

  • Servo Door Lock Project
Home Automation (IR, RF, etc.) Control TV, lights, or other RF/IR devices

Control TV, lights, or other RF/IR devices.

Example Code:

  • IR Remote Control
  • 433MHz RF Remote Control
LCD/OLED Displays Show text or graphics on LCD or OLED screens

Show text or graphics.

Example Code:

  • 16x2 LCD with I2C
  • OLED Display
Sirens Trigger a siren for alerts or security

Trigger a siren for alerts or security systems.

Example Code:

  • Siren with Arduino
Cameras (Trigger or Use with ESP32) Image capture or video streaming with ESP32-CAM

Trigger capture or stream images.

Example Code:

Phone Calls/Texts Send SMS or make calls via Twilio and ESP32

✅ What You'll Need

  • ESP32 or ESP8266 (for Wi-Fi capability)
  • Twilio account (Sign up free). Get your: Account SID, Auth Token, Twilio phone number, and a phone number to receive messages or calls.

📱 Send SMS with ESP32 + Twilio

Example Tutorial:

Apr 11, 2026

Not finding what you're looking for? Contact Us Directly