SimpliSafe Alarm Integration (cloud to cloud)

Nothing to do with ST, but Simplisafe now officially “Works with Nest”! If you have the interactive plan and login to manage your account from your browser, you can connect to your Nest account. It will change your Nest home/away based on your Simplisafe status and also read your thermostat temperature readings (don’t see a real benefit here yet), as well as verify your zip code from Nest matches your Simplisafe zip code (not sure of benefit here either). I tested this and it worked perfect and put my Nests into away mode immediately when I put my Simplisafe into away mode.

This is exciting news for Simplisafe customers. I have been previously using ST presence to change my Nest home/away status but that hasn’t been the most reliable since ST presence bugs and unsupported Nest devices has been inconsistent throughout the past 2 years. I will always choose officially supported ways over unsupported ST ways. Let’s now hope Simplisafe is working on IFTTT and Amazon Echo integration next.

1 Like

I’ve found this super useful after replacing my alarm with SimpliSafe this week. Nice job on building a great device type!!

I’ve put a smartapp together to to be able to change my simplisafe alarm state based on the smartthings mode. It works well. I have three instances of the app for each simplisafe state. Hopefully others find this useful:


 /**
 *  SimpliSafe Alarm State
 *
 *  Copyright 2015
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 */
definition(
	name: "SimpliSafe Alarm State",
	namespace: "foxxyben",
	author: "Ben Fox",
	description: "Automatically sets the SimpliSafe alarm state based on the Smartthings mode.",
	category: "My Apps",
	iconUrl: "https://pbs.twimg.com/profile_images/594250179215241217/LOjVA4Yf.jpg",
	iconX2Url: "https://pbs.twimg.com/profile_images/594250179215241217/LOjVA4Yf.jpg"
)

preferences {
	page(name: "selectProgram", title: "SimpliSafe Alarm State", install: false, uninstall: true,
		nextPage: "Notifications") {
		section("Use this Alarm...") {
			input "simpliSafeAlarm", "capability.alarm", multiple: false, required: true
		}
section("Change to this arming state...") {
			input "alarmState","enum", options: ["Away", "Home", "Off"], required: true
		}
		section("When SmartThings changes to this mode... [optional]") {
    input "smartthingsMode","mode",multiple:true, required: false
		}
	}
page(name: "Notifications", title: "Notifications Options", install: true, uninstall: true) {
		section("Notifications") {
			input "sendPushMessage", "enum", title: "Send a push notification?", metadata: [values: ["Yes", "No"]], 
    		required: false
			input "phone", "phone", title: "Send a Text Message?", required: false
		}
section([mobileOnly:true]) {
			label title: "Assign a name", required: false
		}
	}
}

def installed() {
	subscribe(location, changeMode)
	subscribe(app, changeMode)
}

def updated() {
	unsubscribe()
	subscribe(location, changeMode)
	subscribe(app, changeMode)
}

def changeMode(evt) {
def currentState = simpliSafeAlarm.currentState("alarm")
log.debug "Current SimpliSafe state is: ${currentState.value}"
if ( alarmState.toLowerCase() == currentState.value.toLowerCase() ) {
log.debug "No alarm state change needed"
}
if ( alarmState.toLowerCase() != currentState.value.toLowerCase() ) {
def message
Boolean foundMode=false        
smartthingsMode.each {
    if (it==location.mode) {
        foundMode=true            
    }            
}        

if ((smartthingsMode != null) && (!foundMode)) {
    log.debug "changeMode>location.mode= $location.mode, smartthingsMode=${smartthingsMode},foundMode=${foundMode}, not doing anything"
    return			
}

if (alarmState=="Home") {
    simpliSafeAlarm.home()
    message = "SimpliSafe is Armed HOME"
}

if (alarmState=="Away") {
    simpliSafeAlarm.away()
    message = "SimpliSafe is Armed AWAY"
}

if (alarmState=="Off") {
    simpliSafeAlarm.off()
    message = "SimpliSafe is DISARMED"
}

send(message)
}
}
private send(msg) {
	if (sendPushMessage != "No") {
		log.debug("sending push message")
		sendPush(msg)
	}
	if (phone) {
		log.debug("sending text message")
		sendSms(phone, msg)
	}

	log.debug msg
}

Thank you, Thank you, Thanks you!!! I’ve been wanting this for the longest time!!! This means total integration between ST and Simplisafe! The only thing better would be removal of double hardware on my doors and windows at this point which no smartapp will resolve. Tagging @smart since I know he was possibly interested in using Simplisafe. Between this and the Nest/Simplisafe integration, it’s been a good week!!

My ADT contract expires in January and was looking for options. Thx. Will compare and see how it looks! Thanks a lot and happy holidays!

Not sure if I will “gain” anything by switching?

2 Likes

Happy Holidays to you also!

Money. Isn’t ADT like $50 a month? SimpliSafe is half that. True, you will have to buy new hardware, but over 5 years, it should be saving you money. ADT Pulse has been promising IFTTT integration for over a year now and nothing. I’ve been disappointed in Simplisafe’s lack of innovation, but now with the brilliant ST community, it’s not as much of as an issue for me.

1 Like

Buddy, in case you missed this thread, you cannot go wrong with Abode. If you look for a solid security system that is flexible and modern, look no further. I cannot be happier with my decision to get on board with them.

1 Like

Yes, definitely check them out also. If I was to start a brand new system right now, I would strongly consider Abode also. One thing that concerns me though is they aren’t proven yet and are brand new. Doesn’t mean they will fail, but it does have to be considered in your decision.

1 Like

Hi @foxxyben, I noticed one issue with your smartapp. It is not checking the current state of your Simplisafe status before setting it and therefore is making unnecessary changes to SimpliSafe. For example, I set the smartapp to turn off SimpliSafe in my Home and Home (night) modes so when I come home from being away day or night, my SimpliSafe alarm is turned off. However, when I am home and sunset hits and changes my mode to Home (night), it turns off my SimpliSafe alarm even though it’s already off. I would image a quick check to see the current status and if it’s already at the desired state, to exit and do nothing would fix the issue?

@SBDOBRESCU @Mbhforum Can I simply use the SHM? :wink: :wink:

2 Likes

Just as a general reminder to everyone - be very careful when interfacing with SS. The device type leverages and unofficial API and abusing it could cause unwanted attention that may result in it getting blocked.

3 Likes

Good idea @Mbhforum ! I only have 3 smartthings modes, so any time my mode changes, so does simplisafe. I definitely see where this could be a problem for other folks though.

I’ve gone ahead and updated my post (post 102) to first check the SimpliSafe alarm state and only makes the change if it will be different. Let me know how that works for you.

Just tested and it worked perfect! Awesome work. You should consider moving the code to github and setting up a repo for Github sync updates so it’s easy for people to update their code. Thx again and happy holidays! Now I don’t have to hear my wife every night “did you put the alarm on?”!!!

1 Like

Ask and you shall recieve!! Github available here:

https://github.com/foxxyben/smartthings/blob/master/smartapps/foxxyben/simpliSafeAlarmState.src/simpliSafeAlarmState.groovy

Thanks. Looks like a sync won’t work because you have to to name your source code .src not .smartapp. Once you rename it I can retest again.

Done. Let me know if it works any better.

I think the issue now is you need to put a sub directory under smartapps called foxxyben and then stick the .src directory under there. This is how the other github repo’s are I am syncing with are structured.

Maybe 3rd times a charm (or is the 4th? I lost count).

Strange, as I still get an error when I try to sync. There is no description so it’s hard to tell what is wrong. Your repo looks identical to others I sync with such as: https://github.com/statusbits/smartthings

On second thought if you look at @geko’s repo, his sub directory under smartapps looks different than yours. When I drill into smartapps in your repo, it brings me immediately into your groovy code. When I do the same with @geko’s it brings me to another sub directory.

I don’t know what the deal is. I havn’t used github sync (someday :grinning:), so can’t validate anything. As for the 2 repos looking different, this is due to me only have one file instead of many. If I were to add more, it would look much different.

The only other thing that stuck out was the repository name. @geko has smartthings all lowercase, so I will go ahead and change the name of mine to match just in case that is the issue. We’ll see if that fixes everything.