No announcement yet.

Identifying which echo a command comes from

  • Filter
  • Time
  • Show
Clear All
new posts

    Identifying which echo a command comes from

    So, been playing with Alexa + Node Red and think I finally have my ceiling fans (using Insteon FanLincs) throughout the house working well. I previously hated how the fans were controlled from Alexa - essentially needing to set routines for each and every fan at each speed, and remember exactly how to speak the commands to get it to do what I want.

    Step One: Control the fan through off - low - med - high with standard alexa commands:
    • My command comes from the alexa - home node. It then goes to a Switch that routes the output based on msg.command
    1. TurnOnRequest - Set Fan to Medium Speed
    2. Turn OffRequest - Turn Fan Off
    3. IncrementPercentageRequest - Set Fan to High Speed
    4. DecrementPercentageRequest - Set Fan to Low Speed
    5. Set PercentageRequest - Set fan based on speed via another Switch looking at msg.payload
      1. between 0 and 33 - Set Fan to Low Speed
      2. between 34 and 66 - Set Fan to Medium Speed
      3. between 67 and 100 - Set Fan to High Speed
    The above 'Set Fan to' are triggering HomeSeer events, that way I can not only change the fan, but also update the illuminations on the associated Insteon Keypads. I do the above sequence for every fan in my home, with Alexa Devices called 'Master Fan', 'Family Room Fan', 'Office Fan', etc.

    I can now issue commands such as 'Alexa, Turn Master Fan up', 'Alexa Turn Up Master Fan', 'Alexa Turn Master Fan off', etc. from anywhere in the house and the Master Fan will be controlled.

    Step Two: Simpler Commands based on location.
    • I am using node-red-contrib-alexa-remote2-mattl0 to fetch Alexa Event on Device Activity. I use a change node to copy into flow.source. contains the friendly name of the alexa device. I created another Alexa device called 'The Fan', pass its output through a 1sec delay, then to a switch that looks at flow.source. I use 'contains' in the switch, such that Switch can look for Master Bedroom, even though I have two echo device in my master, setup as a stereo speaker pair. The outputs of this switch route the command that ultimately came from 'The Fan' device, to the logic for the specific fan that is located in the same room as the echo that had the activity.
    I can now issue commands such as 'Alexa, Turn the Fan up', 'Alexa Turn Up the Fan', 'Alexa Turn the Fan off', etc. from anywhere in the house and the fan in the room I'm in will respond to the commands.

    At my old house, I think I set the fan as a light and I could do similar commands for google home without any other changes. Not sure I never tried up/down type commands, however. I'm afraid that I just deleted a bunch of stuff from my old house in HS so I can't confirm my setup.
    - Tom

    Web Site
    YouTube Channel