August smart lock and august connet

OK IF I’M CORRECT,THE IP ADDRESS AND PORT I NEED TO USE TO ADD MY AUGUST CONNECT, IS. THE SERVERS IP ADDRESS WITH IS MY MODEMS IP ADDRESS AND ITS PORT. OR IS IT THE IP ADDRESS AND PORT FOR THE AUGUST CONNECT. BECAUSE I HAVE TRIED THE MODEMS IP ADDRESS AND 80 FOR THE PORT BECUZ I WAS UNABLE TO FIND ANYTHING THAT I KNEW THAT COULD BE THE PORT NUMBER FOR MY MODEM. AS THE SAME GO’S FOR THE CONNECT AS I TRIED ITS IP ADDRESS AND 80 AGAIN FOR THE PORT… ST SHOWS THAT ITS LOCKED BUT IF I CLICK ON IT, IT TURNS GRAY WITH WAIT IN IT AND STAYS THAT WAY… MY INTERNET PROVIDER IS AT&T IF IT CAN BE ANY HELP TO ANYONE THAT CAN HELP ME…

TO BREAK IT ALL DOWN, I NEED TO KNOW WHICH IP ADDRESS TO USE AND WHERE TO FIND MY PORT ID?

Is one of those screen shots from inside your network and the other from outside?

BOTH OF THEM ARE INSIDE THE SAME NETWORK. :+1:t6:

What device handler are you using for the august lock, I can then install and see what I can figure out and get back to you.

I didn’t think it was possible to integrate an August lock with SmartThings.

What is the server you’re referring to?

How did you install the lock device in the screenshot?

THE AUGUST LOCK CONTROLLER

https://graph-na02-useast1.api.smartthings.com/ide/device/editor/31c6669f-5092-47ee-9380-240008c9bbf4

IN CASE THAT DID NOT OPEN…

/**

  • AugustLock Controller for SmartThings (beta)
  • Copyright 2016 Robson Dantas (biu.dantas@gmail.com) - https://github.com/robson83
  • 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.

*/

import groovy.json.JsonSlurper

metadata {
// Automatically generated. Make future change here.
definition (name: “AugustLock Controller”, namespace: “robson83”, author: “Robson Dantas”) {
command "lock"
command "unlock"
command "refresh"
capability “Lock”
}

// simulator metadata
simulator {
}

 preferences {
    input("ServerIp", "string", title:"Server IP Address", description: "Please enter server ip address", required: true, displayDuringSetup: true)
	input("ServerPort", "number", title:"Server Port", description: "Please enter your server Port", defaultValue: 80 , required: true, displayDuringSetup: true)
}

// UI tile definitions
tiles {
	standardTile("door", "_lockr", width: 3, height: 2, canChangeIcon: true) {
		state "locked", label: "Locked", action:"unlock", icon:"st.locks.lock.locked", backgroundColor:"#FF0000"
        state "waiting", label: "Waiting", action: "waitdevice", icon:"st.locks.lock.locked", backgroundColor:"#c0c0c0"
        state "unlocked", label: "Unlocked", action:"lock", icon:"st.locks.lock.unlocked", backgroundColor:"#79b821"
	}
    
     standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 1, height: 1) {
    	state "default", action:"refresh", icon:"st.secondary.refresh"
	}

	main "door"
    details "door", "refresh"
}

}

private push(command) {

def cmd = myCommand(command)
log.debug cmd

}

def waitdevice(){}

def lock() {
log.debug "Unlock the door"
sendEvent(name: “_lockr”, value: “waiting”)
push(‘lock’)
}

def unlock() {
log.debug "Lock the door"
sendEvent(name: “_lockr”, value: “waiting”)
push(‘unlock’)
}

def refresh() {
log.debug "Refreshing"
sendEvent(name: “_lockr”, value: “waiting”)
push(‘status’)
}

private String makeNetworkId(ipaddr, port) {
String hexIp = ipaddr.tokenize(’.’).collect {
String.format(’%02X’, it.toInteger())
}.join()
String hexPort = String.format(’%04X’, port)
log.debug "${hexIp}:${hexPort}"
return “${hexIp}:${hexPort}”
}

def myCommand(command) {

def hostHex = makeNetworkId(ServerIp, ServerPort)
device.deviceNetworkId = hostHex

def result = new physicalgraph.device.HubAction(
    method: "GET",
    path: "/api/${command}",
    headers: [
        HOST: hostHex
    ]
)

sendHubCommand(result)

return result

}

private String convertIPtoHex(ipAddress) {
String hex = ipAddress.tokenize( ‘.’ ).collect { String.format( ‘%02x’, it.toInteger() ) }.join()
return hex

}

def parse(String description) {

log.debug description
def bodyString = new String(description.split(',')[6].split(":")[1].decodeBase64())
log.debug bodyString
def slurper = new JsonSlurper() 
def obj = slurper.parseText(bodyString)
sendEvent(name: "_lockr", value: obj.ret)
log.debug bodyString

}

private String convertPortToHex(port) {
String hexport = port.toString().format( ‘%04x’, port.toInteger() )
return hexport
}

You can’t post a link to a page in your hub’s IDE. All anyone else will see is a login error.

Where did you find THE AUGUST LOCK CONTROLLER?

Edit: I see you posted the entire device handler code instead. You’re referring to the device handler that’s discussed in this thread?

It seems that device requires you to run a raspberry pi or other server. So that’s the server IP and port you need. Did you follow the instructions in the developer’s GitHub repository?

Also at the end of that thread it appears as though the integration isn’t really working and the developer’s no longer actively supporting it.

THANK YOU I DID NOT SEE THAT THEY DONT SUPPORT IT NO LONGER…

Sure, next time just RTFM. :sunglasses:

I received the August Smart Lock 3rd gen (Oval shaped one) for Christmas. Will it integrate with SmartThings if I purchase the August Connect WFI unit?