Combine Unifi controller and Domoticz on Raspberry

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
rbosch
Posts: 11
Joined: Monday 18 January 2016 20:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Combine Unifi controller and Domoticz on Raspberry

Post 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...
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post 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.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
rbosch
Posts: 11
Joined: Monday 18 January 2016 20:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post by rbosch »

You need to edit the port setting in /etc/init.d/domoticz.sh
Thx! That solved the problem!
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post 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...
Dickey
Posts: 25
Joined: Friday 19 April 2019 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post 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
Dz-beta | Dashticz 3.8.10 BETA | Tradfri | RF-Link | Z-Wave | Harmony | Unify | P1 |
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post by lumjajo »

thanks
Ron
Posts: 82
Joined: Friday 27 December 2013 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2284
Location: Nederland, Den Bosch
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post 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.
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Combine Unifi controller and Domoticz on Raspberry

Post 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)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest