Setup your own openhab-cloud (myopenhab) server/instance

You’re doing it right, that commit hasn’t been merged into master yet when it does the git pull will get it.

After I posting I looked around, and with my small understanding of GIT, I thought that was what was up, but wanted the “expert” answer. LOL

Hi,

thanks for this great tutorial, but I’ve one question:

How can I start app.js as a service?

Thanks
Thomas

Try https://github.com/Unitech/pm2

Thanks!

That works.

I’d like to let everyone know about my experience setting up the myopenhab, on both Amazon Web Services (AWS), and GoDaddy cloud server.

I want it to be known that I am not associated in any way with either Company other than being a customer of both. I hold no stock or stake in either company.

I followed the instructions both in this post and in the read me found on github for myopenhab.

I started with AWS, the setup was easy, the help provided both by AWS and other people via a simple Google search was impressive, and I was able to get ubuntu setup, along with a graphical interface, Putty terminal access, and FileZilla FTP access in under two hours. Following both sets of instructions provided, I was able to get myopenhab running, and get an SSL cert for my domain. The only time I needed to interact with AWS support was to get an “RDNS” entry added to the AWS DNS Servers so that the AWS server was seen as my domain. You need an “elastic IP Address” and also need to have your “A” record created and propagated before attempting this. The instructions to do this are included on this page under “elastic IP address”. https://aws.amazon.com/ec2/faqs/#elastic-ip.

Although I did commission and destroy a few servers before getting everything right, the commissioning of a new server takes 2 minutes at most before you can logon, so the most painful part was destroying all my work.

Now Godaddy, comissioning of severs, about the same as AWS, other than that, my experience was horrible, documentation was slim at best, and the details neeeded to logon via either cert, or password were, unavailable.

I gave up after numerous server commissions, and destroys, while never being able to logon to a terminal.

As I’ve said before, I am a Linux noob, and Windows Expert.

Hopefully this is helpful to those looking to install myopenhab on a cloud server of some type.

Any questions feel free to ask, I am a sometimes daily sometimes weekly forum browser.

The prices of both services are comparable, $8-10 for a 1 cpu, 30 GB HD, cloud server, AWS is giving you a year free, (read the rules, they are generous in my opinion), GoDaddy is giving a month free.

ryandetzel, thanks for the help and all the work you do!!!

Good info Joe, thanks. I use AWS all the time and it’s great, little pricey but like you said since it’ so popular there is a lot of help out there. If you’re up to it I suggest you try one of the other providers, Digital Ocean, Linode, or Scaleway as I think you’ll have a better experience and they tend to be a little cheaper.

Would anyone be interested in this as a docker?

2 Likes

Yes, I am waiting it.

1 Like

Here’s some more info on Cloud Setup, specifically notifications:

So, for those looking to set up OpenHAB-Cloud notifications, here is a quick summary of what needs to be done.

Jid = Your_Sender_Key@googleapis.com
Password = server key
I don’t know if the legacy server key will work, I used the server key from Firebase console, also make sure you use the keys on the “Cloud Messaging” tab!

Before compiling habdroid"
Change OpenHABMainActivity.java line 145 and 1201 to match your system.

Hi wondefull job ryandetzel

Got my own server running in 30 minutes
My big problem.
I am try to make node app.js start at boot like a service

messing arroud with openhabcloud.service but can’t get it the right way
any help would be appriciated

Stephen

1 Like

Hi guys,

I am a newbie, pardon my questions

I just try to evaluate, so I clean installed the openhab-cloud on a Cloud VPS KVM Debian 8 (64 bit)
Nginx, Node v7.9.0, Mongo v2.4.10

Using the production as config, I fired up node app.js
below is the console log

2017-04-27T13:28:13.865Z - info: openHAB-cloud: Backend service is starting up…
2017-04-27T13:28:13.887Z - info: openHAB-cloud: Backend logging initialized…
2017-04-27T13:28:15.133Z - info: openHAB-cloud: Initializing XMPP connection to GCM
2017-04-27T13:28:15.745Z - info: openHAB-cloud: Mailer will emulate sending in development environment
2017-04-27T13:28:15.951Z - info: openHAB-cloud: Connecting ro Redis at 127.0.0.1:6379
2017-04-27T13:28:16.414Z - info: opneHAB-cloud: Trying to connect to mongodb at: mongodb://127.0.0.1/openhab?poolSize=100
2017-04-27T13:28:16.435Z - info: openHAB-cloud: Scheduling a statistics job (every 5 min)
express deprecated app.configure: Check app.get(‘env’) in an if statement app.js:223:5
express deprecated app.configure: Check app.get(‘env’) in an if statement app.js:227:5
express deprecated app.configure: Check app.get(‘env’) in an if statement app.js:230:5
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
connect deprecated methodOverride: use method-override npm module instead app.js:239:21
2017-04-27T13:28:16.587Z - info: openHAB-cloud: IFTTT is configured, app handling IFTTT capabilities…
Option polling duration is not valid. Please refer to the README.
2017-04-27T13:28:16.618Z - info: openHAB-cloud: express server listening on port 3000
2017-04-27T13:28:16.630Z - info: openHAB-cloud: Redis connect response: OK
2017-04-27T13:28:16.631Z - info: Redis is ready
node_redis: Warning: Redis server does not require a password, but a password was supplied.
2017-04-27T13:28:16.659Z - info: openHAB-cloud: Successfully connected to mongodb
2017-04-27T13:28:16.786Z - warn: openHAB-cloud: GCM XMPP error: XMPP authentication failure

While accessing to http //xx:3000 I can only see the Login or Register page with
Login Credentials and Signin Button and nothing else…

There is No UUID Register Input Box, no link to dashboard as posted in here

Is is normal? Is the missing registration panel is off by default?
How can I create an administrator account/user to login?

What am I missing?

Shall appreciate if someone can point me to the right direction

Thank you in advance

At the end of conf.json there is a line:

 "registration_enabled": false

Change it to:

 "registration_enabled": true
2 Likes

Hi Joe,

Thank you for the guide :clap: :smiley:

Silly me, you know what… this is the dumbest mistake :grin: I ever made and spent 2 days for it. I installed twice on different servers, search high and low on internet, I really check many times on the config but I don’t know how I can missed that… perhaps it is at the bottom line :joy:

So for those who want to setup openhab-cloud, so far below specs is applicable (not fully test yet)

Cloud VPS KVM Debian 8 (64 bit)
Nginx, Node v7.9.0, Mongo v2.4.10

Thank you

1 Like

No worries, this entry was created @ the end of my quest to set up “The Cloud”. If you haven’t yet, browse through the rest of this thread, think we’ve hashed out many questions you may have.

I have not even read it all yet, but I am already impressed. I may want to do this :slight_smile:

I need your help! thanks
when I run app.js every thing goes well ,openhab instance online,but when I click dashbord to remote control,something is wrong :slight_smile:

Missing error handler on `socket`.
TypeError: Cannot read property 'openhab' of undefined
    at Socket.<anonymous> (/data/wwwroot/cloud.smartgourd.com/app.js:1079:64)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Socket.onevent (/data/wwwroot/cloud.smartgourd.com/node_modules/socket.io/lib/socket.js:330:8)
    at Socket.onpacket (/data/wwwroot/cloud.smartgourd.com/node_modules/socket.io/lib/socket.js:290:12)
    at Client.ondecoded (/data/wwwroot/cloud.smartgourd.com/node_modules/socket.io/lib/client.js:193:14)
    at Decoder.Emitter.emit (/data/wwwroot/cloud.smartgourd.com/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/data/wwwroot/cloud.smartgourd.com/node_modules/socket.io-parser/index.js:247:12)
    at Client.ondata (/data/wwwroot/cloud.smartgourd.com/node_modules/socket.io/lib/client.js:175:18)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Socket.onPacket (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/lib/socket.js:99:14)
    at emitOne (events.js:101:20)
    at WebSocket.emit (events.js:188:7)
    at WebSocket.Transport.onPacket (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/lib/transport.js:91:8)
    at WebSocket.Transport.onData (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/lib/transport.js:102:8)
    at WebSocket.onData (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/lib/transports/websocket.js:75:30)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:191:7)
    at Receiver.ontext (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/node_modules/ws/lib/WebSocket.js:816:10)
    at /data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/node_modules/ws/lib/Receiver.js:477:18
    at Receiver.applyExtensions (/data/wwwroot/cloud.smartgourd.com/node_modules/engine.io/node_modules/ws/lib/Receiver.js:364:5)