luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

Love the plugin - can somebody help to use it for my ADT system? #30

Open TheTherminator opened 6 years ago

TheTherminator commented 6 years ago

Hi Guys,

my biggest compliment for this amazing plugin. I successfully use it to arm and disarm my security system (through voice scripts triggering Alexa lol). When "on_cmd" is triggered a text file is getting created; when "off_cmd" is triggered the text file is deleted. Since ADT is such a closed system, I can't ping it or get any status back - therefore I went with a text file. Now my challenge: How can I set the "state_cmd" check if file exist = ON; not exist = OFF?? Tried it with ls armed.txt >/dev/null 2>&1 && echo $? but that still gives me a "no response" in home kit :(

Thank you so much in advance for your help.

GatoPharaoh commented 6 years ago

Why don't you keep the file as a script and just write a line into it depending on what state your system has. e.g Alarm_ON when it's on and ALARM_OFF when it's off. cmdswitch can the grep for Alarm_ON and determine the state of your system.

TheTherminator commented 6 years ago

Thank you for your reply. Came up with exactly that idea and it works perfect.

knedd commented 6 years ago

Therm,

How exactly did you get homebridge to enable and disable your ADT Pulse alarm? I recently set up a homebridge on a MAC Mini that I am using with HomeKit. I also have ADT Pulse. Are you able to use any other commands? Thanks!

TheTherminator commented 6 years ago

Sorry for the delay.

I have a virtual cod switch which is changing state based on the entry of a text file.

I am arming and disarming my system by running a script arm.sh / disarm.sh (either through pushing that virtual switch in HomeKit or automated).

The arming script is writing a value and n the above mentioned text file and triggers an mp3 file “Alexa ask ADT to arm the system stay”, which then triggers Alexa to arm the system.

Disarming the same, just different mp3 file and different value in the text file.

Needed to get an Echo dot for $40, since ADT is only communicating with Alexa.

Works like a charm.

Best, TT

On Mar 2, 2018, at 13:40, Kevin Nedd notifications@github.com wrote:

Therm,

How exactly did you get homebridge to enable and disable your ADT Pulse alarm? I recently set up a homebridge on a MAC Mini that I am using with HomeKit. I also have ADT Pulse. Are you able to use any other commands? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tanykim commented 6 years ago

@TheTherminator thanks for the answer and an interesting work-around. I haven't tried your method yet, but looks like the way works: 1) The mp3 file is played from your iPhone/iPad, the device that you run the Home app, 2) Alexa-enabled device (in your case, Echo) hears it, 3) Alexa Skill controls ADT system. Is that right?