Simple HowTo for Frontail installation and integration?

Hi, my OH 2.2 runs on a debian server.

Can someone tell me, how i can simply install and integrate frontail to my server and to the main dashboard of openhab (where i can select basic ui, paper ui and so on)?

Second part of my question, i can answer myself by using this steps described here:

But how can i install frontail on my server? Simply sudo apt-get frontail and that´s all? Do i have to make some configuration inside frontail, so that it can show my logs?

This is not working on my debian installation:

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install nodejs
npm i frontail -g

When i enter the first line on my debian, i get this error message:

debian@debian:~$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
-bash: curl: Kommando nicht gefunden.

In english:

-bash: curl: command not found

Sounds like curl isn’t installed.

Maybe try this first:

sudo apt install curl

Also instead of trying to reenact the steps openHABian takes, why not just use it :wink: You can execute the openHABian tool on any Debian/Ubuntu based operating system: http://docs.openhab.org/installation/openhabian.html#manual-setup
Then just access the “Optional Components” menu and select frontail. et voilà
You don’t have to use any other function it offers.

3 Likes

@ThomDietrich I found that using openHABian doesn’t always work on an existing Raspbian setup.

I’m currently trying to deal with frontail not installing properly (using openHABian) which I assume is something to do with my current nodejs installation.

Ok, wioll try it.

I saw, that it installs only an older version of frontail? v7…

Stable is v8 and snapshot is v9.3?

Why only v7?

Strange, now i can´t edit the dasboard.cfg anymore. No way to save the file.

I have to edit dashboard.cfg to change the ip-adress.

On openhabian install from git i was asked for username and i answered “debian” - my linux user. But openhab is installed with user openhab.

Was this wrong? Do i have to answer the question with user openhab?

That is an interesting story you should have shared in the form of an issue when you encountered it :stuck_out_tongue_winking_eye: We can only improve what is known to be imperfect and I never heard of any issues with the frontail setup. Send the setup log and we can have a look.

No, openhab is always openhab. debian should have been the correct answer.
The IP address thing is something I’ve already known about and which should be improved… I’ll create an issue for that.
Write permissions: Simply execute openhabian-config, then select “Apply Improvements” and “Fix Permissions” and everything will be great.

I believe you are mixing frontail and the nodejs version. As long as you are not going to use any other fancy nodejs app or are a developer yourself, you can ignore that.
The latest version of frontail is what is important and I can assure you, that you’ve got it.

Yes, you are right, it was node.js…

No, i only use this debain server for openhab and related services.

I thank god for snapshots inside esxi, so i can play around with installing stuff to my openhab-server and if it doesn´t work, i can go to the previous state with a simple click.

1 Like

I dislike throwing issues ‘over the fence’ without having tried to triage it myself first :stuck_out_tongue_winking_eye:

At the moment I think it might be specific to my setup as npm wants to write to /root/.npm/… but doesn’t have the persmission.

Thanks for your help, now frontail works :slight_smile:
But one additional small question:

How can i change the configuration of frontail to only show openhab.log and nothing from events.log?


EDIT:

Have found it by myself:

Edit the file:

/etc/systemd/system/frontail.service

EDIT 2:
And again one more question:

Is it possible to make more log-viewer-tabs in Openhab-Main-Screen? So i can make one screen for only openhab.log and one extra screen for events.log?

1 Like

@ThomDietrich I sorted my issue by purging my existing nodejs installation and then using openHABian to install nodejs and frontail. So no need to raise an issue :wink:

1 Like

@halloween you’d need to replicate the frontail.service file and add a second tile to the dashboard. Check out the frontail script to learn how

@ThomDietrich Thom, very stupid question but where do you actually change the tiles in the dashboard ?

Is there a way to install this on a Windows installation of OH?

Thanks,

Squid

unfortunately: No

Ref: https://github.com/mthenw/frontail/blob/master/README.md

Hi,

Just in case anybody else sees this issue I couldnt get the frontail service to start on a pi but eventually after changing the frontail.service file I managed.

I had to amend the following:

Environment=PATH=/usr/local/bin/

to

Environment=PATH=/usr/local/bin/:/usr/bin/

Then run the

systemctl daemon-reload
systemctl restart frontail

/lib/systemd/system/frontail.service

#!/bin/sh -
[Unit]
Description=Frontail

[Service]
ExecStart=/usr/local/bin/frontail --ui-highlight -t dark /var/log/openhab2/openhab.log
Restart=always
User=openhab
Group=openhab
Environment=PATH=/usr/local/bin/:/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/local/bin/

[Install]
WantedBy=multi-user.target
Alias=frontail.service

just in case it helps anybody else

K

2 Likes

Hi Guys

Im using NGINX and added the suggested configuration into my NGINX file but I dont get the nice dark theme nor can I see any logs! All i see is this

Unproxied, it works just fine! The configuration I added to my nginx sites enabled file was:

        location /frontail {
            proxy_pass http://127.0.0.1:9001/frontail
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

Any suggestions? I didnt install in /usr/bin


root@openhab2:~# sudo find / -name frontail
/home/kris/.npm-global/bin/frontail
/home/kris/.npm-global/lib/node_modules/frontail
/home/kris/.npm-global/lib/node_modules/frontail/bin/frontail

And my config file:

[Unit]
Description=Frontail

[Service]
ExecStart=/home/kris/.npm-global/bin/frontail --ui-highlight -t dark /var/log/openhab2/openhab.log /var/log/openhab2/events.log /var/log/openhab2/zwave.log
Restart=always
User=openhab
Group=openhab
Environment=PATH=/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/

[Install]
WantedBy=multi-user.target
Alias=frontail.service