Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

LeskoIam/esp8266Huemotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

esp8266Huemotion

Used instead of very expensive Hue motion sensor. It's basicly a D1 mini, which breaks out pins from ESP8266 WiFi module and adds some periphery to enable USB serial communication.

Operation

It uses PIR sensor attached to pin D1 (arduino library maps this pin to pin 5) to detect motion and turn on specified Hue light bulb if all conditions are met. These conditions are:

  • It's night time. This is determined based on if specified light bulb is on or off. State of the light bulb is checked and updated every set number of minutes ("lights_check_delay").
  • If motion is detected. Specified light bulb is turned on for set amount of time ("motion_detected_delay"). Motion is still detected and updated when light is turned on, this means light is turned off only after no motion is detected for set delay.

The circuit

Deep sleep

If enabled, you can put module to sleep while "lights_check_delay" is active. It can conserve a lot of power and is specialy useful when module is powered with batteries. This is controlled with "use_deep_sleep" variable.

Minor hardware modification is also necessary. Connect D0 pin to RST pin. This connection is used to wake up the module after sleep period is over.

Settings

Look for code in "####" block at the begining of code.

  • Mandatory

    • ssid - wifi network name
    • password - wifi password
    • bridge_ip, port - Hue bridge ip and port
    • user - Hue bridge username
    • light - number of controlled light
  • Optional

    • motion_detected_delay
    • lights_check_delay
    • hue_on - command send to Hue bridge when turning on the light
    • hue_off - command send to Hue bridge when turning off the light

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%