I am using a small android tablet, which does not detect openHAB.
The iPhone connects to it. So does a Windows browser.
I can SSH inot the openHAB server from the Android device.
- untick demo mode
- provide a local URL (http://rpiautomation:8080/openhab.app?site=max01 also 192.168.1.52 instead of hostname)
- also provide a remote URL (same as local)
openHAB 1.8.3 runs on rPi…
Should be /openhab.app?sitemap=max01
Well observed! Thank you
I figured that in the meantime as well, when I put this link into the Android web browser.
This also demonstrated the hostname could not be resolved, and I changed it to the IP address of the Pi. --> This then worked.
I copied and pasted this URL to openHAB on the android, and now get an error:
HTTP Error: Sitemap max01/rest/sitemaps could not be found.
The logfile shows:
2016-06-07 19:11:34.763 [WARN ] [e.jetty.servlet.ServletHandler] - /openhab.app
org.openhab.ui.webapp.render.RenderException: Sitemap ‘max01/rest/bindings’ could not be found
Any idea what this means, or where to look for the problem?
I have since found this thread: Can't get OpenHAB started (the 500 error)
At the end it says: So if people do a manual install, sitemap files go to opt/openhab/configurations/sitemaps, if they do an apt-get install, sitemap files go to /etc/openhab/configurations/sitemaps.
Does it matter where the sitemaps go?
I did a manual install. Do I need to move the sitemaps to /etc/?
Also, I log in under my login and run start.sh.
Is it better to create a user openhab and chown the openHAB files to reflect this user?
I mean all is working, the iPhone is getting the configured sitemap=max01; only the Andriod does not play ball.
In the Android app you only need to provide the
http://<ip>:<port> part in the URL field in settings. It supplies the “/openhab.app?sitemap=max01” part itself.
That is because the app is creating the URL
http://<ip>:<port>/openhab.app?sitemap=max01/rest/bindings in order to query openHAB for the list of available sitemaps. Of course this is an invalid path.
Yes. If you do an apt-get install the sitemap MUST* go in /etc/openhab/configurations/sitemaps. If you do a manual install (not recommended for Debian based Linux) the sitemap MUST* go in
*Unless you configured OH to look elsewhere for configs which is not recommended.
Optimally, from a security standpoint it is best to run openHAB as a service (i.e. runs in the background and can be started or stopped using systemctl or service) and runs as a non-privlidged user who is unable to log in (i.e. their default shell is either /bin/false or /sbin/nologin). This is one of the many reasons why the apt-get install is the preferred approach as it creates the user, sets up openHAB to run as a service, and sets most (but not all depending on which bindings you are using) permissions necessary.
If for what ever reason you must use the manual install, yes, it is better to create an openHAB user and set the permissions on the files appropriately. just make sure to configure openHAB as a non-login able user.
Thank you Rich for your detailed response. I really do appreciate it.
Made the change to
http://<ip>:<port> and it worked straight from there.
Well, I am not sure where to report this, but I went with http://www.openhab.org/getting-started/, which clearly says:
Locate the distribution--addons.zip you downloaded above.
Unzip or Extract the zip file into a new directory (e.g. all_addons) within the openhab directory you chose above.
This page should probably changed to reflect your excellent description, thus avoiding other from using this non-ideal installation method.
A final question then: Would you suggest I remove the
/opt/openhab/ directory and do a fresh install with
apt-get for all the good reasons you’ve mentioned?
Also, I take it on the chin: the same document says:
ip.port for Android. I assumed (and the English saying goes: make an ‘ass’ of yo’u’ and ‘me’) its the same for iPhone and Android, which it is clearly not. RTFM as they say!
[edit: added last paragraph]
That being started page is currently undergoing revisions add part of the OH 2 documentation effort. I think many of us, I included forget that page is even there as most of the focus is on the wiki. The apt-get instructions are documented in full on the wikin and I do indeed recommend using it to install OH and bindings. Designer and demo areally still manual installs.
I do recommend the apt-get install. It does a lot for you and it gives you a baseline we are all familiar with so when you have problems we n can make assumptions about where files are located and default permissions and such.
If you do move to apt-get you can save your config files and move them over to /etc/openhab to save the work you have already done. Since you are manually running it as your self you don’t have to remove /opt/openhab until you are ready. Just don’t try to run more than one instance at a time.