Jump to content

Using groups in Alexa smart home


bmercier

Recommended Posts

Posted

The echo app allows you to create groups of devices. This can be useful if you want to turn on or turn off multiple devices at once.

 

However, the recommended way would be to handle groups at the ISY level, either through the use of scenes, programs, or even state variables (Yes, state variables are now supported).

 

The problem with Alexa groups is that whenever you turn on/turn off a group, Alexa will send multiple command individually that end up being queued for the ISY. You will notice that if you have large groups, all devices will be turned on or turned off one after the other, but that takes some time to complete.

 

Handling groups natively on the ISY will speed up the process.

 

Also, it's worth noting that when you use large groups, timeout errors in ISY portal are generated which are monitored by UDI and Amazon. They are expected when groups are used, but still, it's better not to have them.

 

Benoit.

  • Like 1
  • 2 months later...
Posted

The echo app allows you to create groups of devices. This can be useful if you want to turn on or turn off multiple devices at once.

 

However, the recommended way would be to handle groups at the ISY level, either through the use of scenes, programs, or even state variables (Yes, state variables are now supported).

 

The problem with Alexa groups is that whenever you turn on/turn off a group, Alexa will send multiple command individually that end up being queued for the ISY. You will notice that if you have large groups, all devices will be turned on or turned off one after the other, but that takes some time to complete.

 

Handling groups natively on the ISY will speed up the process.

 

Also, it's worth noting that when you use large groups, timeout errors in ISY portal are generated which are monitored by UDI and Amazon. They are expected when groups are used, but still, it's better not to have them.

 

Benoit.

Hey Benoit,

 

Do you have a recommendation for the best way of accomplishing this?  I have a few sets of living room can lights I would like to group together and dim to various levels.  I have been using the device groups within the Alexa app and noticed the delays you're speaking of.  I'm some what of a newbie to ISY and my only thought was to create an scene for each dimmer level (i.e. 10%,20%,30%,etc).  Only issue I see with that is the spoken context.  I would no longer be asking Alexa to dim the lights to 20%, I would not being saying "Alexa, turn on 20%."

 

Curious to hear your thoughts.  I would like to keep things as natural sounding as possible so others are able to quickly pick up on the commands.

 

Thank you,

Brandon

Posted

Hey Benoit,

 

Do you have a recommendation for the best way of accomplishing this?  I have a few sets of living room can lights I would like to group together and dim to various levels.  I have been using the device groups within the Alexa app and noticed the delays you're speaking of.  I'm some what of a newbie to ISY and my only thought was to create an scene for each dimmer level (i.e. 10%,20%,30%,etc).  Only issue I see with that is the spoken context.  I would no longer be asking Alexa to dim the lights to 20%, I would not being saying "Alexa, turn on 20%."

 

Curious to hear your thoughts.  I would like to keep things as natural sounding as possible so others are able to quickly pick up on the commands.

 

Thank you,

Brandon

 

It's a tricky one. In order to avoid groups, your alternatives are ISY scenes, programs or state variables.

 

A scene would be the easiest. You can do things like dim or brighten. However, you can't set it to a specific percentage.

 

What you could do is use a state var as a container to your percentage. In ISY Portal, you can assign a spoken to a state variable. On ISY, you could have a program that reacts to the state variable, and adjust the level of lights accordingly.

 

Alexa turn on <my spoken> to <x> percent

 

Will set your state var to the value x.

 

Your program will take the value and set the lights accordingly.

 

Benoit.

Posted

It's a tricky one. In order to avoid groups, your alternatives are ISY scenes, programs or state variables.

 

A scene would be the easiest. You can do things like dim or brighten. However, you can't set it to a specific percentage.

 

What you could do is use a state var as a container to your percentage. In ISY Portal, you can assign a spoken to a state variable. On ISY, you could have a program that reacts to the state variable, and adjust the level of lights accordingly.

 

Alexa turn on <my spoken> to <x> percent

 

Will set your state var to the value x.

 

Your program will take the value and set the lights accordingly.

 

Benoit.

Thanks for taking the time to respond.  I understand the gist of what you're saying, but I'm not quite skilled enough to script it all out.  I'm still very new to the ISY platform.  Appreciate the insight.  I at least know where the problem lies. 

Posted

Using the terms dim and brighten in programs may cause some unexpected result. Scenes already respond to those terms. There's also the problem if the lights are at, say, 20%. and you ask Alexa to brighten them to 30%. But, if the lights are at 40%, then you would want to dim them to 30%. I don't believe that Alexa can handle having both brighten to 30 and dim to 30.

Posted (edited)

Using the terms dim and brighten in programs may cause some unexpected result. Scenes already respond to those terms. There's also the problem if the lights are at, say, 20%. and you ask Alexa to brighten them to 30%. But, if the lights are at 40%, then you would want to dim them to 30%. I don't believe that Alexa can handle having both brighten to 30 and dim to 30.

 

Hello Stu, My apologies if I was not clear, I was not suggesting any of this. Brighten to X and Dim to X works, but it's the same as saying turn on to x. It sets to an absolute value. So of course absolute values does not work with scenes.

 

The solution proposed is to set a state variable to the intended dim level, then use a program to set that level to the devices that we want.

 

More details here for brandon:

1. Create a state variable in admin console (Programs->Variables->State)

2. In ISY Portal, Select tools->Connectivity->Amazon Echo, click on Add Variable, and choose a spoken for your variable. Optionnally, you could set a turn on value to 100. That will be the dim level use if you just "Turn on" without specifying a value.

3. Then create a program like this:

 
If
        $MyState is not 1000,00000000
 
Then
        Set 'MyDevice1' On '$MyState %'
        Set 'MyDevice2' On '$MyState %'
        Set 'MyDevice3' On '$MyState %'
 
Else
   - No Actions - (To add one, press 'Action')
 

The program will trigger each time the state var is change, and will always evaluate to true (Dim level will never be 1000%). In the then statement, you basically set the dim level of your devices to the same value as the state variable. TIP: In the admin console, when you are on the line to your device, click twice on the arrow just below the percent box.

 

Note: I believe this requires firmware level 5.x

 

Benoit.

Edited by bmercier
Posted (edited)

I have found that you can also trigger a program with a state variable change by using:

 

if

   $MyState is $MyState

 

This allows you to trigger without having to use some mythical number.

Edited by andyf0
  • Like 1
Posted

Hello Stu, My apologies if I was not clear, I was not suggesting any of this. Brighten to X and Dim to X works, but it's the same as saying turn on to x. It sets to an absolute value. So of course absolute values does not work with scenes.

 

Hi Benoit, the apology is unneeded, but appreciated. I was referring to the use of both brighten dim as voice control to set the same level (e.g., 20%) from two directions (e.g., 10% and 30%) as suggested by brandon0921.

  • 4 months later...
Posted

I like the simplicity of the program by bmercer above - but how would you also set controller/responder buttons in a keypad link to illuminate anytime the master or slave dimmers are above 0%?

 

I am running 5.0.10 and have tried various ways to accomplish this - but have not had any luck so far.

Posted

I like the simplicity of the program by bmercer above - but how would you also set controller/responder buttons in a keypad link to illuminate anytime the master or slave dimmers are above 0%?

 

I am running 5.0.10 and have tried various ways to accomplish this - but have not had any luck so far.

You cannot send direct Insteon messages to non-primary KPL buttons. You must put each button into a scene (as a responder - to create scene responder records) and then turn the scene on or off from your program to light or extinguish the KPL button as you need.

  • 1 month later...
Posted (edited)

Hi,

 

I'm running into a strange problem controlling lights programmatically as mentioned above. I can turn lights on and off, as well as set the desired level, all via Alexa. Pretty cool. However, if a scene/light is turned on, either via local control or via ISY, I am unable to turn off that scene/light via Alexa without first turning it on again via Alexa. It's not a comm issue as I can turn off the scene via Alexa if it was originally turned on by her.

 

Below is a sample scene. Any insight is welcome as I'm about ready to go back to using scenes even though I'll miss being able to set the brightness level. All of this is on 5.0.10. I should also mention I've tried "If $sMasterSuiteLights is $sMasterSuiteLights" with the same results.

 

Thanks!

If
        $sMasterSuiteLights is not 100000000
 
Then
        Set '2nd Floor / Master Suite / Devices / Master Suite Lights' On '$sMasterSuiteLights %'
        Set '2nd Floor / Master Suite / Devices / Master Suite Lamps' On '$sMasterSuiteLights %'
        Set '2nd Floor / Master Suite / Devices / Master Suite KP Lights' On '$sMasterSuiteLights %'
 
Else
   - No Actions - (To add one, press 'Action')

Edited by Rob
Posted

What you posted is not a scene, it's a program that runs three separate scenes. Based on the program, the response you are getting, that is, turning the three scenes on but not off is as expected. The Alexa app will never turn those scenes off.

 

That because when Alexa controls a program, On runs Then and Off runs Else.

 

Simply add the three scenes to Else with a state of Off--or place all three scenes in an Alexa group.

  • Like 2
Posted

What you posted is not a scene, it's a program that runs three separate scenes. Based on the program, the response you are getting, that is, turning the three scenes on but not off is as expected. The Alexa app will never turn those scenes off.

 

That because when Alexa controls a program, On runs Then and Off runs Else.

 

Simply add the three scenes to Else with a state of Off--or place all three scenes in an Alexa group.

 

 

What you posted is not a scene, it's a program that runs three separate scenes. Based on the program, the response you are getting, that is, turning the three scenes on but not off is as expected. The Alexa app will never turn those scenes off.

 

That because when Alexa controls a program, On runs Then and Off runs Else.

 

Simply add the three scenes to Else with a state of Off--or place all three scenes in an Alexa group.

 

Hi Stusviews,

 

Thanks for the reply. I'm aware that's a program. What I unsuccessfully tried to describe is that I'm using that program in lieu of a scene in order to be able to set light levels using a state variable (Alexa, set the master suite lights to 50%). If I turn that program On via Alexa, I am able to turn it Off via Alexa. If I turn the lights On via some other method (local control via the switch, part of some other scene, or from another program), I am unable to turn them Off via Alexa without first turning that program On or adjusting the light level via Alexa.

 

That being said, I've narrowed the issue to my state variable. When I turn the program On or adjust the level, the state variable is >0 (makes sense). When I turn the same lights On via anything other than Alexa, the state variable is 0 (also makes sense, as that variable is only set from Alexa). If I then manually adjust the state variable to >0 via the admin console, I'm able to turn the lights Off by Alexa. Otherwise, no go.

 

I also tried your suggestion of turning the devices Off via the Else statement to no avail. 

 

I'll continue to pursue this as I'm sure it'll end up being something simple.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...