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
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
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 well, itās a nodejs app, so it needs node to understand it. Bash wonāt.
Let me know how it goes.
Make sure you allow port 42457 through the firewall, if you have one (most likely).
Stands for hchls (home cloud hub local server) if you need to remember it
So using port forwarding, would I forward traffic from 39500 to 42457 on the machine running Home Cloud Hub app?
No. The port 39500 is what my Hub is listening on. Yours may listen on a different port, you donāt have to worry about it. Once your SmartApp identifies the server, it will send it an init command in which it will instruct it at what IP and port to reply. The server will then save that into config/homecloudhub.json file. HomeCloudHub listens on port 42457. You just need to make sure that port is in your list of accepted incoming connections for TCP. Since both the hub and the hch server are on the same network, there is no port forwarding required. Is your Mac in the same network as your hub? The SmartApp uses HubAction to communicate directly with the LAN ādeviceā - thatās the server, so this is a requirement. Be in the same network.