Hi Bruck,
No worries, I think I understand what you are asking. I have 3-4 devices in my house that work the way you've described, actually I have one with a motion sensor that is almost identical in functionality.
What you want can be easily achieved in a gazillion ways so I'll try to give you a more detailed explanation and some examples.
Firstly, Alexa doesn't have an API interface where you can target directly (from the outside world) some device you have in the Alexa app but that is not a problem at all :-)
The way you need to go about it is by thinking slightly differently and instead of trying to use the ChipChop Actions to accomplish everything you just need to combine them with Alexa routines (there is actually a sort of example in the ChipChop tutorial under Virtual Triggers)
So here is how it works:
1. You need to expose to Alexa one device to act as a "routine trigger" (i.e link it with Alexa). The easiest is if that device has an ON/OFF, motion or touch component
2. You create two Alexa routines so when that device on/off component changes the routines will switch on/off some other device that is available in your Alexa
That's pretty much it!
Example 1
- Link your motion sensor directly with Alexa and make sure to expose the motion sensor "component" so Alexa can see it (the device itself is just a shell, everything works on components)
- Create an Alexa routine when the motion is detected to switch that power plug ON
- Create another routine that does the reverse (not detected >> off)
- You can still use the Action to control the other ESP through ChipChop, both the Action and the routine will happen simultaneously
Basically, because we have linked the motion ESP to Alexa, ChipChop will inform your Alexa every time when the state of the ESP "motion sensor component" changes, it all happens in the background and in parallel
Example 2
- Create a Virtual Trigger in ChipChop and link it with Alexa
- Create an Alexa routine when the Virtual Trigger goes "DETECTED" to switch that power plug ON
- Create another routine that does the reverse (not_detected >> off)
- Add to the ChipChop Action that controls the other ESP to also change the virtual trigger to DETECTED/NOT_DETECTED
Again, as we have linked the virtual trigger with Alexa, ChipChop will also inform your Alexa every time when the state has changed which will in turn trigger the routine within Alexa, which will then switch the other plug.
That's it, it's pretty simple and I would say maybe option 2 with virtual triggers is a bit more flexible as it doesn't depend on the ESP. Technically you can also fire the same virtual trigger through a different action to achieve the same behaviour.
An example would be a door bell where the motion sensor is one esp and the button is a completely different esp, by sharing the same virtual trigger (through different actions) they can for example fire a chime/sound box in the house that is connected to Alexa.
Hope this get's you on the right track and let me know if you need more info
tc
G