EchoPhotonBridge (community library)

Summary

Name Value
Name EchoPhotonBridge
Version 0.7.5
Installs 6403
License Attribution-NonCommercial-ShareAlike 4.0 International CC BY-NC-SA 4.0
Author Jeremy Proffitt proffitt.jeremy@gmail.com
URL https://github.com/JeremyProffitt/EchoPhotonBridge
Repository https://github.com/JeremyProffitt/EchoPhotonBridge
Download .tar.gz
All Versions 0.7.5, 0.7.4, 0.7.3, 0.7.2, 0.7.1, 0.7.0, 0.6.0, 0.5.5, 0.5.2, 0.5.0

Interface Your Photon to Amazon Echo/Alexa Home Automation Its Simple. An Alexa Skill interfaces to a Library on the Particle device which abstracts away all the calls and communication required to implement Amazon Home Automation Skills. So now you can concentrate on bringing your devices to life instead of writting Lambdas, oAuth Servers and interfaces. Thanks to ScruffR for pointers and assistance!

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

EchoPhotonBridge

How it works

It's Simple. An Alexa Skill interfaces to a Library on the Particle device which abstracts away all the calls and communication required to implement Amazon Home Automation Skills. So now you can concentrate on bringing your devices to life instead of writting Lambdas, oAuth Servers and interfaces.

What does that really mean? Simple. You link your Particle.IO account to your Amazon Alexa account, then when you make a device that includes home automation, you simply say, "Alexa, Discover Devices" and it will find your device. And this interface supports a wide range of controls, not just on and off.

Using the EchoPhotonBridge, you'll be able to use phrases like: Alexa, Turn Photon Light On, Alexa, Make Photon Light Red, Alexa, Lock File Cabinet, Alexa, what is the temperture of the blanket

What can it do?

The EchoPhotonBridge supports

  • Turn On & Off (like a Light or Fan)
  • Change a Device's Color (like a Light)
  • Set, Increase or Decrease a Percentage on a Device (like a Light Dimmer or Fan Speed)
  • Set, Increase or Decrease a Target Temperature (like for a Thermostat)
  • Ask for the Current Temperature of a Device (like how cold a room is)
  • Ask for the Target Temperature of a Device (like what the Thermostat is set to)
  • Lock a Device (like a door lock) - Alexa does not support unlocking
  • Ask for the Status of a Lock (locked or unlocked)
  • Set, Increase or Decrease a Color Temperature (like a light bulb)
What you need?
  • Purchase a Particle Photon when you get it, Create a Particle IO Account then add your Photon to your Account using your smart phone.
  • Program your Photon, in the Particle.io IDE, click on Libraries, search for EchoPhotonBridge and click on EchoPhotonBridge, then under examples, choose your what example to try. Then flash your device.
  • Add the Photon Smart Home Bridge Alexa Skill to your Amazon Echo. You will be asked for your Particle.IO Bridge login, so login - this will give the skill access to your devices. The bridge will scan your particle account for devices running the EchoPhotonBridge Library and interface them to Amazon.
  • Ask "Alexa Discover Devices" to trigger scanning for new devices and find your new Photon.
Got a Code Example?

You just define the name of the device and attach a function to call - it's easy - how easy? 5 Lines of code easy!

//Line 1 - Add the EchoPhontonBridge Library to your code
#include "EchoPhotonBridge.h"
//Line 2 - Create a new EchoPhotonBridge instance
EchoPhotonBridge epb;

//Line 3 - Create a function to call when you tell Alexa to turn something on or off
int functionOnOff(int device, bool onOff, String rawParameters) {
//Line 4 - Do something when you turn something on or off, like turn on a light.
digitalWrite(D7, (onOff) ? HIGH : LOW);
}

void setup() {
pinMode(D7, OUTPUT);
//Line 5 - This line adds "Photon Light" to your Alexa,
//         when you say "Alexa Photon Light On" the functionOnOff is called.
epb.addEchoDeviceV2OnOff("Photon Light", &functionOnOff);  //Line 5 - Add the Photon Light to your Alexa.
}

void loop() {
}
Need More Code?

Check out the examples!

Need Help?

The Particle IO Bridge is available free. Should you need assistance, our suggestion is to visit the Particle.IO Community Site. Should you require professional assistance at our standard hourly rate, please feel free to contact Jeremy directly using the contact form on the home page.

If you found a bug, please document it and open an issue on github.

Demo Video

EchoPhotonBridge

License

Attribution-NonCommercial-ShareAlike 4.0 International CC BY-NC-SA 4.0

Browse Library Files