SmartThings Presence FOB "integration" with Vera

You need to create a new app in the smartthings developer page and paste it there. Have a look at the inbuilt sample apps to see how to compile, test and deploy.

Sent from my GT-I9505G using Tapatalk

Deleted

Unfortunately I have not gone beyond the presence fob yet :frowning: (actually I wanted to add a feedback loop to make sure that ST pushes the message to vera till it gets an acknowledge that the switch was changed but did not get around to do this yet. )

Sent from my GT-I9505G using Tapatalk

[quote=“idefix, post:1, topic:180419”]Hi,

I purchased a SmartThings Controller and have it running standalone alongside my Vera (I’m not using it as secondary zwave controller) to solve the presence issue I had - Android phones with tasker was always a hit an miss.

I will use ST probably for other Zigbee stuff in the future but for now it is a presence detector only ;D

I integrated the 2 by writing a app for SmartThings which will trigger virtual switches on my vera once changes in presence are detected.
In addition ST will send me a notification on the phone.

In case someone is keen to do the same, you will need:

[ul][li]SmartThings Controller - upgraded to lab FW as otherwise the local LAN HTTP push will not work (see the ST forum on how to request this) [/li]
[li]as many presence FOB’s as you need[/li]
[li]the below app which needs to be installed on your ST via the IDE[/li][/ul]

Good luck !

[code]/**

  • Presence Presence Update in Vera & Push Notification
  • Author: SmartThings, adapted by Idefix
  • use network address calculator / ip address calculator to convert your IP
  • (Convert dotted decimal IP-address or mask to binary and hex) and port (Convert decimal to binary and hex) to hex
  • VeraID is the DeviceID of the switch you want to control. Look for it in the Device Advanced tab in Vera
  • Device will be set to ON when presence is detected and OFF upon leaving

*/

preferences {
section(“When a presence sensor arrives or departs this location…”) {
input “presence”, “capability.presenceSensor”, title: “Which sensor?”
}
section(“Set Vera DeviceID…”) {
input “VeraID1”, “number”, title: “DeviceID”
}
}

def installed() {
subscribe(presence, “presence”, presenceHandler)
}

def updated() {
unsubscribe()
subscribe(presence, “presence”, presenceHandler)

}

def presenceHandler(evt) {

def deviceNetworkId = "0A0A000A:D98"  //  "10.10.0.10:3480" update with your Vera IP in hex format
def ip = "10.10.0.10:3480"            // This is the ip and port of the Vera in the network

if (evt.value == "present") {
	log.debug "${presence.label ?: presence.name} has arrived at the ${location}"
		
	sendHubCommand(new physicalgraph.device.HubAction("""GET /data_request?id=lu_action&DeviceNum=${VeraID1}&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 HTTP/1.1\r\nHOST: $ip\r\n\r\n""", physicalgraph.device.Protocol.LAN, "${deviceNetworkId}"))

	sendPush("${presence.label ?: presence.name} has arrived at the ${location}")

} else if (evt.value == "not present") {
	log.debug "${presence.label ?: presence.name} has left the ${location}"

	sendHubCommand(new physicalgraph.device.HubAction("""GET /data_request?id=lu_action&DeviceNum=${VeraID1}&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0 HTTP/1.1\r\nHOST: $ip\r\n\r\n""", physicalgraph.device.Protocol.LAN, "${deviceNetworkId}"))

	sendPush("${presence.label ?: presence.name} has left the ${location}")
}

}[/code][/quote]

Hi!

I want to simply use a smartthings presence fob with Vera, but there’s no st hub in this location… can I still do it somehow?

Thanks!

[quote=“danielccm, post:24, topic:180419”]Hi!

I want to simply use a smartthings presence fob with Vera, but there’s no st hub in this location… can I still do it somehow?

Thanks![/quote]

AFAIK, the ST Fobs only work with the ST Hub…

Bit of thread necromancy here, but really this is pretty much the exact topic I want to discuss so I won’t spawn a new one.

I have be searching high and low for a very simple presence detection fob and I was surprised to find they are a pretty rare thing.

I don’t need nor want a fancy multi button remote. I just want a small, cheap, simple fob with great battery life (and ideally very durable and waterproof) to determine presence or absence. I was surprised at this apparent market gap because this need is quite common for several applications, and in particular in the rental market when you need to remotely track the return of spare keys, other 3rd party system cards and fobs, etc.

Anyhow it seems the only thing remotely close, albeit not that durable or waterproof, is the Samsung F-ARR-US-2 [url=https://www.amazon.com/Samsung-SmartThings-F-ARR-US-2-Arrival-Sensor/dp/B00GM7V8I8]https://www.amazon.com/Samsung-SmartThings-F-ARR-US-2-Arrival-Sensor/dp/B00GM7V8I8[/url].

Since I only have a Vera Plus controller at present, and would really like to keep it and keep it simple with only that controller, I was wondering if the that Samsung SmartThings FOB will yet work directly with the Vera?

Barring that is there any other really simple product I have missed?

Thanks!