( thanks for the shout. I haven’t read all the code solutions, as text to speech doesn’t work well with code.)
As far as what the OP is asking for, I’m not aware that the home automation side of the ADT/smartthings device is notified if the security side alarms. I think that’s the issue here. If I’m understanding it.
There are many different ways to trigger an alarm on the security side. The panic button can do it. I think there’s an option on the panel itself that can do it. One of the motion or contact sensors being triggered can do it. The smoke sensor or CO2 sensor triggering can do it. There may even be additional ways.
If, as I suspect, the home automation side does not get Notified when the alarm goes off, then we have to capture it either from the original trigger event or from the notification to the user’s smart phone. Or maybe from an acoustic sensor which hears the panel’s siren.
If the trigger event is one of the contact or motion sensors, it’s easy, because those specific device models also show up as sensors on the home automation side. So you can create home automation rule that says “if the motion sensor detects motion, turn on the pocket socket.“ So essentially you end up with one rule on the security side and one rule on the home automation side, but each triggered by the same sensor going off.
But I don’t know if the smoke detector and CO2 detector also show up on the home automation side or not. I just haven’t heard one way or the other. I don’t know if the panic button can trigger a home automation rule. And I’m pretty sure that just using the panel will not trigger a home automation rule.
But when the panel sounds, regardless of the triggering event, it can be set to send a notification to the account holder’s phone. So my first thought was that we could capture that notification and turn it into the “if” for a home automation rule. It’s just that’s a whole lot easier with an android phone than it is with an iPhone. Which is why asked if the OP has an android phone.
Even with an iPhone, you may be able to route it through IFTTT and do it that way, but that would add some additional lag. Plus more cloud. ( same issue if you use an acoustic sensor like the Leo)
But all of this complexity is happening because of the original issue, which is that I don’t think the security side tells the home automation side if an alert is occurring. Maybe I’m wrong on that and the siren on the panel itself shows as a device on home automation side, but I thought it didn’t.
Hopefully someone who actually has the system can tell us more in this regard.