Page 2 of 2

Re: Alexa device types

PostPosted: Fri Jul 02, 2021 1:06 pm
by ryanbuckner
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)

Re: Alexa device types

PostPosted: Fri Jul 02, 2021 1:40 pm
by jay (support)
If you want one for each door, then you wouldn't want to control them both in the same script, right?

Re: Alexa device types

PostPosted: Fri Jul 02, 2021 7:31 pm
by ryanbuckner
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

Re: Alexa device types

PostPosted: Thu Jul 08, 2021 6:20 pm
by ryanbuckner
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.

Re: Alexa device types

PostPosted: Fri Jul 09, 2021 10:52 am
by ryanbuckner
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