Raspberry PI + AugustLock + ST

Wrong spot.

Go to My Devices
Then, click on Front Door Lock
Near the edit button, you will see preferences (and edit) on the right.

See a print

So definitely was out of range of my lock with my Mac mini. So using all the previous post as a guide to make sure everything was installed I got this successfully running on my MacBook! Thanks for all the help!! It works great and it’s so nice to have the lock intergrated in smartthings and part of routines and such. Now I am going to cancel my order of the August connect and get a raspberry pi instead as a mo e permanent solution. Just going to have to figure out how they work haha.

@robson_dantas have you made any enhancements to this?

@robson_dantas, I install everything I need at Mac mini,n and success execute the node servers.js, but I only got unlock once OK, and all the other time is just Waiting in SmartThing August Smart Lock device… Could you let me know what is going on

wenzongdeMac-mini:augustctl Mitchell$ node server.js
Listening at {“address”:“192.168.1.xxx”,“family”:“IPv4”,“port”:3000}
GET /api/unlock 204 3895.746 ms - - work unlock
GET /api/status 404 1.141 ms - 23 - waiting, no status in SmartThing Device
GET /api/status 404 0.322 ms - 23
GET /api/status 404 0.262 ms - 23

@robson_dantas I am using the Mac Mini and latest OS software 10.11.4 El Capitan

@mightythias I have exact same situation like you when install everything on Mac mini , It keep have waiting in SmartThing device, and nothing happen, Do you find your problem and fix already ?

What IP:port do you have the device set to in the device settings? Cause it looks like you are getting a 404 error which is a HTTP Not Found error.

Also if you open browser and go to http://192.168.1.xxx:3000/api/status what do you get?

The problem I was having was that my Mac Mini in my office was out of range of the door lock. It only works if your bluetooth is in range of the lock (about 30 ft). I bought a raspberry pi and set everything up the same way on the pi which sits just a few feet from the lock and now everything works great.

Hi ! mightythias

   My door lock is about 3m from my Mac mini, so it is not bluetooth range issue. I will install it again and see if any bluetooth installation issue,

Only unlock work, and status and lock not working ? Anything wrong
Listening at {“address”:“192.168.1.xxxx”,“family”:“IPv4”,“port”:3000}
GET /api/unlock 204 4058.383 ms - -
GET /api/status 404 1.665 ms - 23
GET /api/status 404 0.375 ms - 23
GET /api/lock 404 0.189 ms - 21
GET /api/lock 404 0.155 ms - 21
GET /api/status 404 0.109 ms - 23
GET /api/lock 404 0.082 ms - 21
GET /api/status 404 0.083 ms - 23
GET /api/unlock 204 4020.625 ms - -
GET /api/status 404 0.106 ms - 23
GET /api/status 404 0.086 ms - 23
GET /api/lock 404 0.098 ms - 21
GET /api/lock 404 0.110 ms - 21
GET /api/status 404 0.094 ms - 23
GET /api/unlock 204 4659.443 ms -

@huydnguyen @robson_dantas

As you can see , only unlock work, while status and lock does not work, and I use following command at terminal, It also work, so I really have no idea on what is going on ?

augustctl unlock
augustctl lock

I finally make it work, some notes here…

The augustctl need clone to the Mac mini, then install, otherwise, just type npm install -g augustctl at Mac min terminal will install unknown version which I also do not know where it come from… but after try so many time, now it work… Really appreciate…

@huydnguyen @robson_dantas, Hey guys, It bring up another question, I have 2 August Smart Lock , one in Front Door, another in back door, so base on front door experience, how I can add another in mac mini server, There is no problem at August Smart Lock Apps either add another device in SmartThings, but How I can tell the Mac mini which August Smart Lock I want to lock or unlock, Does that will have another offlineKey for another August Smart and slot will be 2 ? How I can tell system that I am working on back door, not front door ?

maybe try to run another instance of the node app on a separate port? or get a cheap raspberry pi and use it to control the second lock?

@huydnguyen,

you mean different servers1.js, config1.json and I can use same augustctl project and just use node severs1.js and servers1.js call different config1.json and different port, and different offlinekey in config1,json ?

Please advise ?

@huydnguyen @robson_dantas… clone augustctl another directory augustclt1, and change he ports to 3001, and get another offlinekey… open 2 terminal enter following command, one is augustctl, another augustctl1

bash-3.2# sudo -s
bash-3.2# cd /usr/local/opt/nvm/v0.10.29/lib/node_modules/augustctl
bash-3.2# echo “source $(brew --prefix nvm)/nvm.sh” >> .bash_profile
bash-3.2# . ~/.bash_profile
nbash-3.2# nvm use v0.10.29
Now using node v0.10.29 (npm v1.4.14)
bash-3.2# node server.js
Listening at {“address”:“192.168.1.117”,“family”:“IPv4”,“port”:3001}

@robson_dantas… I found the server running a server.js have a little unstable, special when today update the August Smart Lock App ( I do not know if that is a case), I finally make it work again at mac mini sever by execute the service.js again and again, and try to sync both August lock with server again, Is anyway to sync and make sure both server and august lock are connect together. stable without problem…?

@robson_dantas Any plan to do the pending improvement at below

Pending to be done:

1.Add a timer and ping the hub back, in case the door is opened manually (then refresh wouldn’t be necessary)
2.Improve the api to cache status, in order to prevent it to be called before every lock/unlock request
3.Improve error handling and the way promises are implemented to prevent http requests being returned without proper answer from the lock
4.Security layer on top of the api, to allow just the hub to call the endpoints. Also do something on the raspberry pi side, maybe filtering with iptables, as ST doesn’t allow LAN connections to be under HTTPS

@mitchell_lu66

1- started working on that - missing some free time to make it happen. Anyway, this is not a straightforward task, as need to keep pinging the lock to check status - it may drain the lock battery life. This is also related to the task number two.

2- part of task 1.

3- I’m not a nodejs expert. This code was already developed by another developer. Need to spend some time understanding the async calls - fails are related to errors, or timeouts. Somehow the request is released to the hub without being finished - for other scenarios this is good. if you have some node skills, feel free to help.

4- Working on that as mentioned on a previous thread. By now would be only through the node app, but ideally via iptables.

Any help would be great, if you are willing to.

@robson_dantas , I am not the expert of nodejs, but pretty good at integrated different platform with SmartThings,and It really challenge and interesting, Sorry, I can not help at coding parts, but could provide you the user experience and suggestion about your code and project of August Smart Lock with SmartThings…

Trying to get to the offlineKey is the latest version of the android app. The debug mode doesn’t seem to work in the new app. Also, the the new path for the app appears to be /data/data/com.august.luna. There is a shared_prefs folder but no LockSettingsPreferences.xml file, even after enabling auto lock. Can someone please post the format of the LockSettingsPreferences.xml file so I can see if maybe they just renamed it something else?