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

myopenhab
myopenhaborg
openhab-cloud
Tags: #<Tag:0x00007f0153677a18> #<Tag:0x00007f0153677720> #<Tag:0x00007f0153676f50>

(Joe Lawrence) #22

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.


Alexa skills using a Local MyOpenHAB server
(Joe Lawrence) #23

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.


(Joe Lawrence) #24

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!!!


(Ryan Detzel) #25

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?


(.) #26

Yes, I am waiting it.


(Ryan Detzel) #27

Any way to get access remotely to OH2 without using myopenhab.org?
(Joe Lawrence) #28

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.


openHAB Info - Device registration failed with Sender ID null
(Stefano ) #29

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


(Ryan Detzel) #30

(TCK) #31

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


(Joe Lawrence) #32

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

 "registration_enabled": false

Change it to:

 "registration_enabled": true

(TCK) #33

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


(Joe Lawrence) #34

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.


(Kees Van Gelder) #35

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


(kang.ding) #36

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)


(Matheus Telles) #37

I’m Apple developer, where I need to put the certifications to work on my own openhab server and my own iOS Openhab app? Does anyone knows the procedures? Thanks


(laohixdxm2016) #38

By your detailed instructions, the problem that habdroid cannot connect to openhab cloud is gone.

1 However, while I goto REST API page, /discovery/bindings/{binding}/scan API does NOT got response. e.g. /discovey/bindings/hue/scan

2 In comparsion, if I use myopenhab.org as openhab cloud, I also get timeout response for /discovery/binding/hue/scan API.

3 However, without openhabcloud server, /discovery/binding/hue/scan API works well.

Not sure whether you also have the same issue. Any comment will be very welcome. Thank you.


(Joe Lawrence) #39

Did you change and recompile habdroid as in message #27 in this thread?


(Daniel Short) #40

Question : Did you ever get your openhab Cloud server to work with alexa service, i have the server setup but it will not authenticate ( activate the rule ) , if you have a tutorial around this process it would be great


(laohixdxm2016) #41

Not sure whether this response is for my question or not. But i will give a try. Thanks.