my.openHAB personal edition is a simplified version of my.openHAB for personal use on your own internet-connected server. It is a nodejs/expressjs/socket.io app which provides remote access functionality for your openHAB.
To run my.openHAB personal edition you will need nodejs and npm installed.
Clone the code and run npm install
to install dependancies.
To make it work you need to configure it. Configuration is stored in config.json file.
You need to set up the following options:
hostname
- a real world hostname of you machin you will use to connect to your openHAB remotelyhttpPort
- port to listen for HTTP requestshttpsPort
- port to listen for HTTPS requestsenableHttp
- set to true to enable HTTP, disabled by default (use HTTPS!)enableHttps
- set to true to enable HTTPS, enabled by defaultenableAuth
- set to true to enable my.openHAB level authentication, enabled by default, be careful!keyFile
- path/filename of certificate key for HTTPS servercertFile
- path/filename of certificate itself for HTTPS serveruuid
- uuid of your openHAB (generated automatically by my.openHAB bundle)secret
- secret of your openHAB (generated automatically by my.openHAB bundle)
HTTP server is disabled by default. Please only use HTTP for development/debugging. Use HTTPS only for production.
You will need to issue certificate for your installation to use HTTPS. This days you can get it for free using Let's Encrypt, there are plenty of tutorials on the Internet on how to get a certificate using their tools.
You can choose to use either my.openHAB level authentication or openHAB level authentication. By default my.openHAB authentication is enabled. When it is enabled requests well be authenticated by my.openHAB app. If you disable it, please don't forget to enable authentication for local requests in openhab.cfg (disabled by default!). Users are configured in users.json file for my.openHAB level authentication. Please! Don't forget to change the default user!
You will also need to install the current version of my.openHAB bundle to your openHAB's addons folder (available in standard distributions for both 1.X and 2.X) and put autogenerated uuid and secret to config.
Then just run node bin/www