[OBSOLETE] Smart Alarm is here

Happy to be able to contribute - I love this app!

Coming soon - have your selected lights blink “SOS” in Morse Code for a specified period of time. For me, blinking my driveway lights might just attract a neighbor’s attention.

Hopefully I can complete this over the weekend…

1 Like

Hey Smart Alarm Users!

I’ve implemented a couple of new features in Smart Alarm. Hope you’ll like it. :smile:

Version 1.1.3. Released 2014-09-14

  • You can now use remote control, such as Aeon Labs Minimote, to arm and
    disarm Smart Alarm, as well as trigger panic alarm.
  • When alarm is set off, Smart Alarm can now execute ‘Hello, Home’ action in
    addition to turning on sirens and light switches
  • Added ‘Arm Away’, 'Arm Stay and ‘Disarm’ control panel buttons (iOS only).
  • Modified Setup Menu work flow and some help text.

2 Likes

It’s looking like SOS flashing isn’t going to happen - I’ve tried 3 different switches, and none of them respond reliably enough to make the pattern recognizable. I’m still trying, but please, don’t hold your breath :smile:

That said, I WILL be integrating my Home on Code Unlock Too with Smart Alarm, so that the Mayday code also sets off the alarm…coming soon to a Smart Thing near you!!!

1 Like

@geko @storageanarchy, I really do appreciate all that you do. This will help me as well. I am helping others in my area who are disabled, and this gives them additional security and ability to call for help if needed. Excellent work!

3 Likes

If you enable logging and send me PM with logs, I’ll have a look.

Smart Alarm Version 1.2 is available.

Version 1.2.0. Released 2014-09-18

  • Implemented REST endpoints to arm, disarm and trigger panic alarm with HTTP
    GET requests.
  • Added configuration setting to select home ‘Mode’ for disarming alarm.
  • Exit and entry delays can now be configured for 15, 30, 45 or 60 seconds.
  • Fixed an issue with broken SmartThings runIn() API.

Please note, when installing or updating the app, you have to go to the App Settings in the IDE and enable OAuth at the bottom of the settings page.

Using REST API

Smart Alarm provides REST API endpoints to allow any web client to arm, disarm and trigger panic alarm using HTTP GET request. This feature can be used to integrate Smart Alarm into variety of Web dashboards and remote control web apps.

BASE_URL/armaway  - Arms Smart Alarm in Away node
BASE_URL/armstay  - Arms Smart Alarm in Stay mode
BASE_URL/disarm   - Disarms SmartAlarm
BASE_URL/panic    - Triggers panic alarm
BASE_URL/status   - Returns current status

The BASE_URL is https://graph.api.smartthings.com/api/smartapps/installations/APP_ID, where APP_ID is the installed Smart App ID.

The REST API requires Access Token. You can obtain the access token using SmartThings OAuth2 workflow, however as a convenience, Smart Alarm creates the token for you. You can find your app’s base URL and access token in the SmartThings IDE.

Go to My Locations and click on the “smartapps” link for your Location. Then find “Smart Alarm” in the list of Installed SmartApps. Right-click on the “Smart Alarm” and select “Open Link in New Window”. Scroll down to the “Application State” section. There you’ll see “accessToken” and “restEndpoint”. Save those values and plug them in into your web app.

5 Likes

I’m getting errors in the app on the iPhone. Things like “not authorized to perform the selected operation”. Log errors:

error java.lang.NullPointerException: Cannot get property ‘clientId’ on null object @ line 1001

java.lang.NumberFormatException: For input string: “false” @ line 401

Sorry, forgot to mention, you have to go to the App Settings in the IDE and enable OAuth at the bottom of the settings page.

Thanks. That worked. And I also had to select a exit and entry delay otherwise it would throw the line 401 error. FYI - the link for the small icon is wrong. I fixed that as well in the code.

REST Alarm will be integrated into my Home on Code Unlock Too later today…

I’m having an issue similar to what @rayzurbock reported here. I configured an entry delay. Then removed it, however the entry delay is still in effect after removing it. I uninstalled and reinstalled, but it seems that the alarm comes with a default 30 second entry delay. Even if I set the entry delay at 0 seconds. The smart alarm won’t fire for nearly a minute. I don’t think this is related to delays in ST’s cloud because I have sonos labs apps that are executing based off the same motion event that are happening immediately.

It’s a bug. Fixed it in Version 1.2.1. Please update the app. If it still doesn’t work, I recommend re-installing the app. I’ve ran into a case where for whatever reason SmartThings would not update my app after I hit “Done” and no error messages in the log files. I could only resolve it by re-installing the app.

thanks. I updated, but WAF requires testing to wait until tomorrow when she isn’t home. I will report back then.

I just tested Smart Alarm with Utilitech siren and it works. Have you got yours working?

I’m getting an error when trying to install 1.2.1. I uninstalled the previous version but whenever I try to install this one I get an error saying: There was a problem installing your SmartApp.

Any ideas?

Edit to add: I’m running on Android.

Yes, you need to enable OAuth in the app properties (in IDE).

Lemme guess… that’s probably somewhere in the instructions, isn’t it? And I’m just one of those idiot users who doesn’t read instructions. :wink:

Version 1.2.1 works perfectly for me now. Also my siren is the utilitech siren and it works fine. Thanks geko for the great app!

1 Like

I’ve modded smart alarm to include @625alex 's pushbullet widget. I will try to get instructions based on alex’s instructions and the code into github tonight. The idea behind this is to have a widget that shows mode. So I have set the panelStatus notification to run the message Json. For me this is all going back to having a central tablet that works as a “security panel” like you would have for ADT. I am using a basic android setup and then widgets that use tasker http gets to send changes to the mode through virtual switches (I need to cut these over to your API). I also have a tasker task to lock the screen. So upon arriving home you unlock the screen and then disarm. When you leave the home or stay in for the night you set the appropriate mode and lock the screen. With the push bullet widget (which is mostly for WAF) the panel shows the current state for the alarm.