|
Post by papa on Aug 19, 2021 20:19:41 GMT
Access OpenHAB 3 via myopenhab.org/ (openHAB Cloud Connector) or Local NetworkView & Control your OpenHAB user interface on ANY computer or mobile device with an internet connection. Later I describe accessing OH via any computer on your local network.I'm migrating from a text file configured openHAB 2.5.x to a somewhat Dashboard-configured openHAB 3. I took these notes as I installed the openHAB Cloud Connector. I'll summarize what I did perhaps including some hints that did not seem obvious. Caution: This service exposes your home automation on the internet. So use it with caution. For example, prepare a robust password that (below) you will use to register an account & log in at myopenhab.org. A password technique I like is aiming for at least 9 characters, choose a phrase from a song or a made up sentence, reduce each word to a single letter (keeping capitalization), maybe add a symbolic mark (like < . , & ^ $ # if permitted) & add a number like a year. For example, "When Johnny comes marching home again 1945" becomes the password: WJcmha1945 This makes a challenge for others to guess, but can be memorable to you. Another check to secure your password: Look it over to avoid recognizable words or abbreviations. You want your password to look like nonsense while you know it stands for something. I also recommend password managers like Passwdsafes that store multiple log ins under one password. For each site's log in, the password manager can store a user ID, a password, & a clickable URL. The manager may also have a notes field where you can record your answers to security questions, etc.
Next, Configuring openHAB Cloud Connector
|
|
|
Post by papa on Aug 19, 2021 20:22:08 GMT
Configuring openHAB 3 Cloud Connector Updated, August 16, 2021
Open the openHAB web portal (localhost:8080) & login as an administrator. Go to localhost:8080/settings/addons/misc Click the + button at the bottom right. Click openHAB Cloud Connector. At the bottom click [Install]
Go to localhost:8080/settings/services/org.openhab.openhabcloud
& fill in the fields: Mode: The first option gives the permission for only sending notifications via openHAB Cloud (“Notifications”). The second one (“Notifications & Remote Access”) additionally enables remote access to your openHAB dashboard including available UIs. Note, for the Base URL field use:
https://myopenhab.org/ Check the boxes next to Items you want to expose/view/control over the internet.
At the upper right, click Save to record your config changes
|
|
|
Post by papa on Aug 19, 2021 20:23:49 GMT
Connect Your OH 3 to myopenhab.org
To use below, get the contents of these files: var/lib/openhab/uuid /var/lib/openhab/openhabcloud/secret
In Linux Terminal, stop openHAB: sudo /bin/systemctl stop openhab.service
Go to myopenhab.org to create OR update an account...
New openHAB Cloud User, fill fields: email address (robust) password plus content from these files: uuid secret At bottom, click [register]. OR Registered User with new OH Install: sign in with email address & password Click [sign in] Go to myopenhab.org/account Replace with content from these files: uuid secret At bottom, click [Update].
In Linux Terminal, start openHAB: sudo /bin/systemctl start openhab.service This should connect your present OH with the openHAB Cloud.
Next: Prepare HABPanel to Display at myopenhab.org
|
|
|
Post by papa on Aug 19, 2021 20:42:27 GMT
Prepare HABPanel to Display at myopenhab.org When we start with HABPanel, we're only using Local storage (on OH 3 hosting computer, not available through the cloud & apps). To change that: Go to http://localhost:8080/habpanelClick the gear icon at top right. At the bottom, click Panel Settings Click [Save the current configuration to a new panel configuration] Give the panel a name. The small radio button shows that storage switches to the newly named & saved panel. Be logged in to myopenhab.org & go to home.myopenhab.org/habpanel/index.html#/At myopenhab.org, switch from Local storage to the new panel config. That is ... Click the small radio button beside the newly named & saved panel. OK the "Are You Sure?" For a computer logged in to myopenhab.org, the newly default panel should now be available at OH Cloud (myopenhab.org) Next: Access Your HABPanel on the App
|
|
|
Post by papa on Aug 19, 2021 21:55:33 GMT
Prepare HABPanel to Display on Other Network Computers or a Mobile App
Without changes, accessing HABPanel anywhere but the openHAB hosting computer gives the error message: "No default panel configuration." To fix this:
On the openHAB hosting computer, be logged in as admin
go to http://localhost:8080/habpanel/index.html#/
At the upper right click on the gear icon. At bottom right, click on Panel settings
click on "Edit the local panel configuration (experts only)" That takes you to http://localhost:8080/habpanel/index.html#/settings/localconfig Find the line that starts with "menucolumns"
On the next line, change "default" from false to true. At the upper right, click save.
|
|
|
Post by papa on Aug 21, 2021 16:07:34 GMT
Check OpenHAB Ports in Linux Firewall
I made sure that openHAB ports (8080, 8443) were listening on my OH hosting computer. However, from a mobile app or another local network computer, I could not access OH at the hosting computer. Then I learned about Linux's ufw (Uncomplicated Firewall).
In the Linux Terminal app, execute (+ your Linux password)
sudo ufw status If you installed Mosquitto MQTT communication, you should see its port (1883) allowing access from other devices on your network:
So OH ports (8080, 8443) may be listening, but as here ^^, traffic with other local network devices may not be allowed.
Next: Open OpenHAB Ports in Linux Firewall
|
|
|
Post by papa on Aug 21, 2021 16:16:09 GMT
Open OpenHAB Ports (8080, 8443) in Linux Firewall
In the Linux Terminal app, execute
sudo ufw allow 8080 sudo ufw allow 8443 sudo ufw status
If you installed Mosquitto & openHAB, you should see:
Next: Prepare for OH to Be Accessed on Other Network Devices
|
|
|
Post by papa on Aug 21, 2021 18:43:05 GMT
Prepare for OH to Be Accessed on Other Network DevicesFor a Windows hosted OH to be accessed by other Windows computers on the same local network, if I remember correctly, one makes sure all the windows computers are in the same Workgroup. On a Windows computer at the Start Button search box, enter "Computer Name" & click on the top response. This will show you the computer's Workgroup. To edit the Workgroup (if necessary), click the [Change] Button & edit the Workgroup field. Click the [OK] button. Restart Windows. ---------------------------------------------------------------------- For a Linux hosted OH to be accessed by Windows computers, follow the official instructions here. Use Linux Samba Share to configure a network share on your openHAB host system for easier remote viewing of OH data & editing of configuration files. Supplementary Notes: If necessary, you will install Samba Share. Then you will edit the smb.conf file (Linux: /etc/samba). In smb.conf, after "workgroup =" you will enter the Workgroup of Windows computers in your local network. Also a bit later in the file, make sure it says "wins support = yes" instead of " # wins support = xxx"
After you complete the official instructions about network share, reboot the Linux computer hosting OH. --------------------------------------------------------------------------- After you complete the above, you should be able to use another network computer to access OH on the hosting computer. In a browser on another network computer, enter [OH computer IP]:8080 If OH is hosted at 192.168.1.120, then enter 192.168.1.120:8080. Next: Access OH with a Mobile App
|
|
|
Post by papa on Aug 23, 2021 21:47:09 GMT
Use OpenHAB Mobile App (iOS & Android) To Access the Hosting Computer's OH Redone & Corrected
To make this part easier, be sure you accomplish instructions in the posts just above.
On your mobile device, find & Install the openHAB app.Open the installed openHAB app on your mobile device. Do NOT ACCEPT certificates that may be offered to you. Accepting the certificates will help configuration at first, but it's only temporary. Check & As Necessary, Complete the App's Configuration... If you have not done so yet, open the OpenHAB mobile app. At the upper left, click the stacked pages icon. Near the bottom, click " Settings" Configure the App's Remote Server(The Remote server gives access to OH anywhere your mobile device has good cellular connection.) In Settings, click Server openHAB. Click Remote. Make sure the fields are filled... Remote server URL: myopenhab.org Enter Username & Password you established for myopenhab.org above. At upper left, click <-- (arrow pointing left) To save, click check mark at upper right. Configure the App's Local Server(Local server gives access to OH when your device connects to the local network of the OH hosting computer.) In Settings, click Server openHAB. Click Local. Make sure the fields are filled... Local Server URL: http://[OH hosting computer IP]: 8080 If OH is hosted at 192.168.1.120 then enter http://192.168.1.120: 8080 User Name: [admin user name you cr eated when installing openHAB] Password: [admin password you created when installing openHAB] At upper left, click <-- (arrow pointing left) To save, click check mark at upper right. To access sitemaps & HABPanels you have configured, at the upper left of the app's home screen, click the stacked pages icon. Then click "HABPanel" or a named sitemap. Next: Access the Hosting Computer's HABPanel with HABPanelViewer Mobile App
|
|
|
Post by papa on Aug 23, 2021 21:49:56 GMT
Configure the OpenHAB Mobile App's Local Server UNAuthenticated Redone & Corrected
(Local server gives access to OH when your device connects to the local network of the OH hosting computer. Access will be VIEW ONLY without ability to configure via the app.) Official OH 3 docs: "openHAB has a built-in webserver, which listens on port 8080 for HTTP and 8443 for HTTPS requests. In general, it is advised to use HTTPS in preference to HTTP." So for the Local Server, we need to choose UNauthenticated (http) OR Authenticated (https). For Authenticated Server, skip this option & go to the next post... Option One: Unauthenticated Local Server: At the OH hosting computer, go to localhost:8080/ In the right column, click API Security. Make sure this setting is clicked OFF: Allow Basic Authentication At the upper right click Save. At the OH Mobile App... In Settings, click Server openHAB. Click Local. Make sure the fields are filled... Local Server URL: http://[OH hosting computer IP]: 8080 If OH is hosted at 192.168.1.120 then enter http://192.168.1.120: 8080 User Name: Leave blank. Password: Leave blank. At upper left, click <-- (arrow pointing left) To save, click check mark at upper right. Next: Configure the OpenHAB Mobile App's Local Server, Authenticated
|
|
|
Post by papa on Aug 24, 2021 19:21:31 GMT
Configure the OpenHAB Mobile App's Local Server, Authenticated
For UNAuthenticated Server, skip this option & use the previous post...
Option Two: Authenticated Local Server: At the OH hosting computer, go to localhost:8080/ In the right column, click API Security. Make sure this setting is clicked ON: Allow Basic Authentication At the upper right, click Save. At the OH Mobile App... In Settings, click Server openHAB. Click Local. Make sure the fields are filled... Local Server URL: https://[OH hosting computer IP]:8443 If OH is hosted at 192.168.1.120 then enter https://192.168.1.120:8443
User Name: [admin user name you created when installing openHAB] Password: [admin password you created when installing openHAB] At upper left, click <-- (arrow pointing left) To save, click check mark at upper right.
Next: Using the OpenHAB Mobile App
|
|
|
Post by papa on Aug 24, 2021 19:21:38 GMT
Using the OpenHAB Mobile App Once It Connects with Remote or Local Server
To access sitemaps & HABPanels you have configured, at the upper left of the app's home screen, click the stacked pages icon. Then click "HABPanel" or a named sitemap.
When the App opens & connects with your openHAB, it tries to display something (A Sitemap or HABPanel)
To change the app's opening display, click the stacked pages, scroll down to display & click Start Page. Choose your new Start Page (HABPanel?), click on what's available.
Hint: If we change the Start Page to HABPanel, the upper left stacked pages icon gives access to the HABPanel drawers & NOT to the app's settings. To reach the app's settings, close the app. Restart the app & quickly tap the stack pages icon & you'll see Settings & other options.
Hint: It's possible to configure OH to send notifications. When the App is opens & connected with your openHAB, Notifications (display) may be in the options list with Settings. Other times (?? trouble at OH land ??), we see a "Notifications not available" error. In a browser, you can still see notifications at myopenhab.org/notifications/
Troubleshooting Hints: Sometimes, when we change & save settings, an error happens & nothing is shown on the start page. First, try closing the openHAB app & re-opening it. Second, make notes of your remote & local server settings. Remove the app from you device & reinstall it. The app may recover your settings. Otherwise restore settings from your notes.
Next: Access the Hosting Computer's HABPanel with HABPanelViewer Mobile App
|
|
|
Post by papa on Aug 24, 2021 19:22:58 GMT
Access the Hosting Computer's HABPanel with HABPanelViewer Mobile App (Android & ?? iOS)
To make this part easier, be sure you accomplish instructions in the posts before the openHAB app post.
On your mobile device, find & Install the HABPanelViewer app.
Open the installed openHAB app on your mobile device. Just as the app opens, it may discover a possible openHAB computer for you to choose.
Check & As Necessary, Complete the App's Configuration...
If you have not done so yet, open the app.
Just as app opens, swipe right to left. Click Settings
At the top, click Connection. Click links & make sure fields are filled...
openHAB URL: https://myopenhab.org Click OK to save.
Start page: https://home.myopenhab.org/habpanel/index.html#/ Click OK to save. Now when the app opens, it should display the clickable menu of your HABPanels.
Note: On my mobile device, I have both apps: openHAB & HABPanelViewer.
|
|