Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmotea authored Aug 7, 2017
1 parent 7b44588 commit e75db95
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This project emulates a Philips Hue Bridge that is able to control Hue lights (u
- ~~control IKEA Trådfri lights from HUE applications~~
- ~~Create ESP8266 bridge device to add MI Lights to Hue Bridge emulator.~~
- On/Off control for other home devices using virtual lights
- Alarm (email notification + eps8266 horn)
- Alarm (~~email notification~~ + eps8266 horn)

## Working futures:
- Control lights (all functions)
Expand All @@ -25,7 +25,6 @@ This project emulates a Philips Hue Bridge that is able to control Hue lights (u

## Not working:
- Home & Away futures (require remote api that is not public)
- Schedules with random time (no application use this)


## HUE LIGHTS
Expand Down Expand Up @@ -79,11 +78,15 @@ On sensor power on there will be a GET request sent to bridge , ex: http://{brid
## MOTION SENSOR:

#### How is working:
Exactly like switches the sensor will be registered on power on with GET request http://{bridgeIP}/switch?mac=xx:xx:xx:xx:xx:xx&devicetype=ZLLPresence and configuration will be done from Hue application. ESP8266 will wake up from deep sleep on every PIR output change (negative to positive or positive to negative) and at every 10 minutes to send light sensor data. GPIO5 pin is used to read if wake up was triggered because new motion was detected or if there is no motion anymore. Request example: http://{bridgeIP}/switch?mac=xx:xx:xx:xx:xx:xx&lightlevel=46900&dark=false&daylight=true&presence=true. Is important to choose a low power PIR that can run on batteries for many months and that is able to keep positive output for at last 5 seconds when triggered. The PIR used in my example is HC-SR501, most common used in DIY projects. To increase the battery life i remove the voltage regulator to 3.3V because this become useless on batteries. Photoresistor used by me has a range 33Kohm - 1Kohm. GPIO4 will output +3V only when light level is measured to lower power consumption.
IMPORTANT: Some PIR sensors trigger lot of false positive because of RF interferences with ESP8266. You can try to put a couple of layers of aluminum foil between the PIR and the ESP8266. I recommend to use a PIR that is able to detect such interferences (maybe wireless pir's have this future by default)
Exactly like switches the sensor will be registered on power on with GET request http://{bridgeIP}/switch?mac=xx:xx:xx:xx:xx:xx&devicetype=ZLLPresence and configuration will be done from Hue application. ESP8266 will wake up from deep sleep on every PIR positive signal on GPIO5 pin and at every 20 minutes to send light sensor data. Request example: http://{bridgeIP}/switch?mac=xx:xx:xx:xx:xx:xx&lightlevel=46900&dark=false&daylight=true&presence=true. Is important to choose a low power PIR that can run on batteries for many months. The PIR used in my example is HC-SR501, most common used in DIY projects. To increase the battery life i remove the voltage regulator to 3.3V because this become useless on batteries. GPIO4 will output +3V only when light level is measured to lower power consumption.

## ALARM
Is possible to receive email notification when one motion sensor is triggered while alarm is active. To configure the alarm you must first edit the file alarm_config.json and add your smtp credentials. On first execution HueEmulator.py will send a test email and if this is successful sent a new virtual light named "Alarm" will be automatically created. You will need to create a dummy room to control this virtual light. Turn this light on/off to enable/disable the alarm.

[![Youtube Demo](https://img.youtube.com/vi/c6MsG3oIehY/0.jpg)](https://www.youtube.com/watch?v=c6MsG3oIehY)

I push updates fast so if you want to notified just add this repo to watch

Contributions are welcomed

Credits:
Expand Down

0 comments on commit e75db95

Please sign in to comment.