Integration with AT&T digital life

1 Like

I have digital life and I moved my Yale door lock from digital life and reset it and added to smartthings

Is AT&T still charging you the $5/mo for the door package? The only controllable device I have from AT&T is the actual DLC (arm/disarm). I have no door lock, so I haven’t implemented it. Though that should not be hard to do. I am currently testing my AT&T integration, but it requires an external server (external as in other than the ST hub or the DLC) and the server setup is pretty complex. But it works pretty nice. It can actually be integrated into ST alone, but it would then be a polling service and I don’t know how much AT&T would like that (i.e. connecting to them every few seconds), unless one does not need immediate updates and can live with one update every few minutes…

They do still charge me for the service, but once my contract is up I will cancel all but the alarm and camera service. I would be very interested in trying your project out, I have a server I could use.

I’ve already setup a server, I can give you the code and instructions on how to setup yours. It’s still under construction - the web page is not even there, I plan on making it available to the public, eventually, if AT&T does not have anything to argue :slight_smile:

I can also setup an account for you to test it. I’ll private message you when I have set your account up if you want to test it. I need to limit the number of accounts that are up so that AT&T does not get upset with my IP…

Regards,
Adrian

Okay, now that I’ve got my Raspberry PI3, I’ll work on developing a LAN version and once it’s stable enough I’ll publish it. The one I built uses a cloud server and supports multiple users, making the individual setup a nightmare (requires LAMP, nodejs, pm2, etc.)

The main problem I’m seeing with a LAN version is figuring out the hub IP / server IP. While the server IP can easily be fixed to a static IP, the hub’s can’t (unless the router allows static IP based on mac address). I’ll figure something out so that they can find each other automatically.

Will update here when I have a working version.

Adrian

Ready for BETA!

I’ve made progress with the stability of the app and server. Find all code here https://github.com/ady624/HomeCloudHub

You’ll need a linux server running on the same network as the hub. I’m using this on a Raspberry PI 3. Hope I didn’t miss any steps in the README.md, if I did, please let me know so that I can fix it.

Adrian

Do you think the will run fine on a Pi 2? I have one sitting around I can use.

I don’t see why it wouldn’t, as a matter of fact I am sure it does. It should run on anything that can run NodeJS and supports the “request”, “node-ssdp”, and the “colors” modules. Of all, only the “request” module is absolutely required. The “node-ssdp” module is used for automatic discovery within the SmartApp (and I provided a way to manually enter the IP of the server) and the “colors” module is used for nice looking logs which look b&w into the journalctl log anyways, if you decide to run it as a service, which you normally would.

If processing power was your concern, here’s the output of the top command for the homecloudhub process:

top - 11:09:01 up 4 days, 12:33, 4 users, load average: 0.00, 0.01, 0.05
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.0 sy, 0.0 ni, 99.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 948056 total, 784996 used, 163060 free, 203608 buffers
KiB Swap: 102396 total, 0 used, 102396 free. 346688 cached Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4875 homeclo+ 20 0 133352 35792 16316 S 0.0 3.8 0:04.24 node

Nothing, really :slight_smile:

So I have a mac I wanted to test on, just because it’s linux and already waiting to be used. When I run homecloudhub.js I get a token error. I looked at the script and I don’t see syntax errors, but maybe I am missing something.

./homecloudhub.js: line 2: syntax error near unexpected token '/usr/local/lib/node_modules'' ./homecloudhub.js: line 2: module.paths.push(‘/usr/local/lib/node_modules’);’

What nodejs version are you running? Try commenting out that line, I only needed it when I ran it in systemctl - it stopped finding any node modules when run under a different user, even though nodejs modules were installed globally.

You’ll find the same line in each of the three js files.

Why does it say line 2? That’s line 1… do you have any character on the first line? Character encoding (i.e. UTF-8) special characters that nodejs doesn’t like? Try opening the file in vim/nano?

I commented out the first line and made the second line with changes to where node_modules was:

//module.paths.push(‘/usr/lib/node_modules’);
module.paths.push(‘/usr/local/lib/node_modules’);

vim and nano don’t show anything out of the ordinary.

If I remove the line all together the syntax error just moves down to the next line

./homecloudhub.js: line 3: syntax error near unexpected token (' ./homecloudhub.js: line 3: var app = new function () {’

How did you create the file? Did you use TextEdit? It might have been saved in UTF-8 which normally contains two characters at the very beginning of the file to signal the encoding. Not visible in normal text editors. Try and save it as ASCII, not UTF-8. Or even better, use git to download the file. Or use https://github.com/ady624/HomeCloudHub/archive/master.zip to download the archive and drag the files…

Check this out too http://stackoverflow.com/questions/12719859/no-visible-cause-for-unexpected-token-illegal

This is how I got the files.

5.9.0

how are you running the file?
node homecloudhub.js ?

Why does it say line 3? When that’s clearly line 2? Try and copy everything from line 2 onwards (exculde the commented line) and then recreate the file and paste the content?

It is ascii

homecloudhub.js: ASCII English text

Sorry I wasn’t I was running it like you would a standard shell ./homecloudhub.js

Running it the correct way seems to have worked. LOL

Oh :slight_smile: well, it’s a nodejs app, so it needs node to understand it. Bash won’t.

Let me know how it goes.