Alexa device types

Posted on
Fri Jul 02, 2021 1:06 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Alexa device types

I was planning to create two devices, one for each door. I have sensors that know if the door is open or closed, so here's my current logic for closing:

Code: Select all
left_garage = indigo.variables[1470346067].value
right_garage = indigo.variables[1731578180].value

if left_garage == 'true':
   indigo.actionGroup.execute(589155825)
if right_garage == 'true':
   indigo.actionGroup.execute(1460987012)

Posted on
Fri Jul 02, 2021 1:40 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa device types

If you want one for each door, then you wouldn't want to control them both in the same script, right?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 02, 2021 7:31 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Alexa device types

jay (support) wrote:
If you want one for each door, then you wouldn't want to control them both in the same script, right?


Right That script was an example

Posted on
Thu Jul 08, 2021 6:20 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Alexa device types

I was able to get the a virtual "Left Garage Door" to be recognized as a Garage Door Controller. I can open (with pin) and close the garage door using Alexa, open the left garage door or Alexa, close the garage door

One thing I'm having trouble with is still is the status. I have the status variable in the virtual device listed as isLeftGarageDoorOpen and the value of that variable is currently "true", which according to the documentation "If the value of the variable becomes “on” (or “true”, “open”, “1”, “yes”, “enabled”), we set the state of the virtual device to on. If the variable becomes “off” (or “false”, “closed”, “0”, “no”, “disabled”), then we set the state to off.". I can see in the Indigo client that the state of the virtual device is "on".

All good so far....

When I ask Alexa, is the Left Garage Door open?, she replies : Checking, hang on. The Left Garage Door is closed.

I assume I can just flip the status variable but this seems backwards and I'm reusing an existing variable so I'd need to create 2 new ones.

Posted on
Fri Jul 09, 2021 10:52 am
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Alexa device types

ryanbuckner wrote:
I was able to get the a virtual "Left Garage Door" to be recognized as a Garage Door Controller. I can open (with pin) and close the garage door using Alexa, open the left garage door or Alexa, close the garage door

One thing I'm having trouble with is still is the status. I have the status variable in the virtual device listed as isLeftGarageDoorOpen and the value of that variable is currently "true", which according to the documentation "If the value of the variable becomes “on” (or “true”, “open”, “1”, “yes”, “enabled”), we set the state of the virtual device to on. If the variable becomes “off” (or “false”, “closed”, “0”, “no”, “disabled”), then we set the state to off.". I can see in the Indigo client that the state of the virtual device is "on".

All good so far....

When I ask Alexa, is the Left Garage Door open?, she replies : Checking, hang on. The Left Garage Door is closed.

I assume I can just flip the status variable but this seems backwards and I'm reusing an existing variable so I'd need to create 2 new ones.


UPDATE:

I reversed everything and it appears to be working.

Virtual Device - Left Garage Door:

- On Group: Action Group that closes Garage Door #1 - python that checks to see if it's already closed first. If so, does nothing
- Off Group: Action Group that opens Garage Door #1 - python that checks to see if it's already open first. If so, does nothing
- Toggle Group: Not Used
- Status Variable: Variable that holds the status of ON or OFF based on the sensor state of Garage Door #1
- Status Group - Action group that checks door sensors and sets the status variable above

Who is online

Users browsing this forum: No registered users and 3 guests