New install of OH2 and Ubuntu - cannot get a sitemap displayed

Steve,

This does not appear to be a permissions issue. The sitemap should load. Getting a blank sitemap with the default I think (not certain) is possibly if you have none of that information is your items file,

But when you copied the demo information into your home.sitemap, did you copy the entire thing and then just change the name to home?

Just an FYI,Sitemaps and items info are CAP sensitive. Can you confirm your sitemap is starting/using a lower s. ie, Sitemap will not work, and needs to be sitemap.

Hi Paul

case and syntax are all OK, but to double check I have copied a working items and sitemap to the new server.

What i have noticed is whatever changes i make to paperui, i.e active sitemap (classic & Basic), there is no difference when i open the browser. Classic always shows a blank sitemap and Basic always says there are no sitemaps available.

it appears that maybe openhab isnt looking in the directories where i am changing the files. i am changing /etc/openhab2/sitemaps and /etc/openhab2/items

Steve,

Its pretty easy to miss a case and syntax issue, but assuming that is all good. Lets back up here and perhaps learn a few things.

  1. What version of OH2 are you using, the Stable or the Beta/Testing release? Since your just getting started here, you can always do either fresh install or apt-get update and apt-get upgrade if you using the beta/test versions.

  2. Did you install Install Samba Ubuntu to edit and access info remotely?
    http://docs.openhab.org/installation/linux.html#network-sharing

  3. What program are you using to create and edit sitemaps and item information? If you have Samba installed, its much easier to edit sitemaps in a text editor of VSCode vs using nano or vi in ubuntu.

What are you changing in paperui? You should not have to change anything here to view a sitemap. You can create any sitemap and then just append the url in the browser to few it.

  1. 4.0.8
    2 No i didnt install Samba Ubuntu
  2. Im using NANO

Just doing an apt-get upgrade

There is no OH Version 4.0.8. Did you install the Stable or Beta/Testing Version? When access OH2 at the /start/index, what version does it show at the bottom?

You should also really get Samba going on the Ubuntu Machine. While Nano is good, you will be MUCH better off accessing the information from another windows computer with Visual Studio Code and the OpenHab Extension. Or even NotePad++ will serve you much better then nano.

I also then Use Bitvise Tunnelier for SSH access into my Ubuntu (headless) machine. to do any command line work.

I “think” it was the stable one. i got the 4.0.8 from the openhab console.

start/index is 2.1.0 with no build number

I use putty for SSH.

If I rember correctly I could never get the Samba stuff working.

It would be nice to do a fresh install and start again, but wouldn’t know where to start. Also there seems to be a lack of concise tutorials (For Dummies)

Log into your Ubuntu machine and Run these 3 commands to stop and uninstall OH2.

sudo systemctl stop openhab2.service
sudo apt-get purge openhab2*
sudo rm /etc/apt/sources.list.d/openhab2.list

Then go back to the Docs and reinstall from scratch.
http://docs.openhab.org/installation/linux.html#package-repository-installation

Install the SNAPSHOT Release as well.

Read the entire Install doc fully then go back re-read and install. And Follow the instructions for Samba at the end of Install. It’s not too hard, but I remember being new to Ubuntu once and it can seem daunting at first.

And perhaps switch off of Putty for long term use over to Bitvise. It will make copying and transfering files easier for you as well.

https://www.bitvise.com/ssh-client-download

OK, I did that, everything seemed to go OK, however 2 possible issues.

  1. When i went to the OH console in the browser, I didnt get an option for Simple, Expert or Standard install.
  2. All my bindings and items were still in OH.

I presume this gets rid of OH

sudo systemctl stop openhab2.service
sudo apt-get purge openhab2*
sudo rm /etc/apt/sources.list.d/openhab2.list

Are there some other bits to delete / de-install.

Im thinking of re-installing ubuntu from scratch, but i do remember from when i first did it, it was a nightmare getting java installed, is there a tutorial for that.

Thanks
Steve

The purge should have taken care of it, but if not, you should also delete /etc/openhab2 and /var/lib/openhab2.

Tons. This was the fist result from a google search:

Thanks but went with ZULU in the end

Could you please tell me how to open the LOG?:joy:
Here is my openhab2 folder
image

tail -f /var/log/openhab2/openhab.log will display it real time

omit -f just to view it

Thanks a lot.Is it right?

Or shall I use the Karaf:joy:


I got it form the documents.

It seems that if I entered the console interface I can open the real-time log by inputing “log:tail”

It seems that I have resolved this problem!:joy:
I read the example in the official document:http://docs.openhab.org/configuration/sitemaps.html
Then I try the demo sitemap and surprisely it works out.

Here are my work steps:

  1. Edit the sitemap files: vim demo.sitemap(Create a completely new sitemap in the sitemaps folder)

  2. Write down or paste the demo.sitemap code in the sitemaps:

sitemap demo label="My home automation" {
    Frame label="Date" {
        Text item=Date
    }
    Frame label="Demo" {
        Switch item=Lights icon="light"
        Text item=LR_Temperature label="Livingroom [%.1f °C]"
        Group item=Heating
        Text item=LR_Multimedia_Summary label="Multimedia [%s]" icon="video" {
            Selection item=LR_TV_Channel mappings=[0="off", 1="DasErste", 2="BBC One", 3="Cartoon Network"]
            Slider item=LR_TV_Volume
        }
    }
}
  1. Save and quit the demo.sitemap and then restart the openhab2.service

  2. open the webpage in your browser: http://localhost:8080/start/index

  3. Choose the paperui

  4. Change the Service in Configuration, change the Default Sitemap as demo and save the configuration(You can change the configuration of classic UI or basic UI if you like)

  5. Open the webpage in your browser:
    basicui:http://localhost:8080/basicui/app?sitemap=demo
    classicui:http://localhost:8080/classicui/app?sitemap=demo
    reference to:http://docs.openhab.org/tutorials/migration.html#rules

Finally everything goes well!

1 Like