Page 1 of 1

Combine Unifi controller and Domoticz on Raspberry

Posted: Sunday 17 December 2017 23:01
by rbosch
Has anyone managed to run Domoticz and Unifi controller on the same Raspberry?
I have a Pi 3 which had a Unifi controller running.
But after installing Domoticz (with the curl script) the Unificontroller is no longer accessable at the designated port (8443).
Maybe conflicting HTTPS configurations? Anyhow I am stuck...

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Monday 18 December 2017 9:25
by bbqkees
The web interface of both Unifi and Domoticz run at port 8080 by default.
So you need to change only one of them. In my case I changed the port of Domoticz to something else.

You need to edit the port setting in /etc/init.d/domoticz.sh

Remember at the next startup to visit the Domoticz web interface at the new port instead of 8080.

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Monday 18 December 2017 19:39
by rbosch
You need to edit the port setting in /etc/init.d/domoticz.sh
Thx! That solved the problem!

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Friday 03 April 2020 14:50
by lumjajo
Ihave the same issue, does anyone know who to change the default port of the Unifi controller. I do not want to change the domoticz web port as its used in some scripts as well...

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Friday 03 April 2020 15:35
by Dickey
lumjajo wrote: Friday 03 April 2020 14:50 Ihave the same issue, does anyone know who to change the default port of the Unifi controller. I do not want to change the domoticz web port as its used in some scripts as well...
https://help.ubnt.com/hc/en-us/articles ... r-and-UAPs

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Wednesday 15 April 2020 12:47
by lumjajo
thanks

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Wednesday 15 April 2020 13:00
by Ron
Is it easy to install a Unify controller onto a Raspberry Pi?
I could use this to contol my AP-LC-LR access point.

Re: Combine Unifi controller and Domoticz on Raspberry

Posted: Wednesday 27 May 2020 23:39
by jake
I just went through the experience to find out by trial and error that the unifi controller and domoticz are in each others way. I just documented the solution for myself, so I thought, I'd share it with your guys:

I started of with the available guide online: https://lazyadmin.nl/home-network/insta ... -in-5-min/

CAUTION: when you read this after you got stuck with a non working Unifi controller due to this port usage, skip the steps here below until the "stop domoticz service" . Also replace the next command "install unifi controller" (since you installed it before and you need to reinstall), by this one instead: sudo apt-get install --reinstall unifi -y

Install OpenJDK (instead of Java):
sudo apt-get install openjdk-8-jre-headless -y

Download repository:
echo 'deb http://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

Install GPG-key:
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg

Stop domoticz (because unifi tries to use port 8080 and install fails when 8080 is in use):
sudo service domoticz stop (use Monit when this is installed, otherwise Domoticz restarts within minutes!)

Install Unifi Controller:
sudo apt-get update; sudo apt-get install unifi -y

Stop and disable mongodb, it is not needed:
sudo systemctl stop mongodb
sudo systemctl disable mongodb

check which ports are in use:
sudo netstat -ntpl

Switch to super user to be able to change the unifi config file:
sudo -i
nano /usr/lib/unifi/data/system.properties

change # unifi.http.port=8080 to: unifi.http.port=8083 (remove the hash sign, port number 8080->8083, or whatever suits you)

Stop super user:
exit

Restart Domoticz:
sudo service domoticz start (or use Monit)