0

I have a Philips Hue light dimmable bulb for a night light and a regular floor lamp connected to a Belkin Mini WeMo smart plug. I have added both as devices in the Alexa app and can control them individually, or together as part of a group. But I need their states to be mutually exlusive, i.e. when I say "switch on night light", I want the Hue light bulb to turn on and the WeMo controlled floor lamp to turn off. And vice versa. This sounds like a typical "scene", but the Alexa App does not seem to facilitate such an option. What is a good way to achieve this type of control?

Graham Chiu
  • 4,856
  • 1
  • 23
  • 41
Web User
  • 7,438
  • 14
  • 64
  • 92
  • Since this doesn't seem to be directly related to *programming* a solution, I think it's probably off-topic for Stack Overflow. However, home automation is on-topic at [Internet of Things](http://iot.stackexchange.com/) and your question would probably be accepted there. – Aurora0001 Mar 04 '17 at 09:34

2 Answers2

0

There is a great example and write up here about how to control a WEMO device using an ESP8266. It includes code for your perusal and writing your own control.

Hope it helps.

bob
  • 688
  • 8
  • 15
-1

Both the Philips Hue Bridge and the Wemo have an API. You can create a Hue Bridge Emulator, and create a virtual bulb there with a unique name. When Echo sends the command to turn on your virtual bulb, you can then turn one bulb off, and the other one on. And when you tell Echo to turn the bulb off, you reverse the process.

I'm using my own Hue emulator to control my lights and my PC.

Simpler though might be just to setup a web server, and accept calls from IFTTT triggered by Echo. Your web server in the CGI script you write can then send commands to the WeMo light, and the Hue bridge.

So, for example, once you've registered a username on the Hue bridge, you can turn it on like this

PUT /api/username/lights/2/state

where "2" is the ID for the bulb in question, and send the JSON payload of

{{"on":true}}

I believe Wemo uses a REST api

Graham Chiu
  • 4,856
  • 1
  • 23
  • 41
  • Do you have any code on GitHub to create a Hue Bridge Emulator? Also, does this email creating a custom Alexa skill to communicate with the virtual bulb? – Web User Mar 09 '17 at 08:13
  • https://github.com/gchiu/Rebol-Hue-Bridge/tree/master/renc .. email? I'm not using any custom skills. – Graham Chiu Mar 09 '17 at 08:54