UniFi Controller / MQTT-Server

Hey!

So - FIRST - thanks a lot to @frenck for your great work. Aaaand yes I‘ve read the docs :wink: and have seen the conflict warning…

But I have simply no choice to use two dedicated machines for each purpose (UniFi Controller/ MQTT) :sob:

I mean: all the other MQTT-devices do reach the server and have no conflict with UniFi Controller listening on another port… So do the UniFi mobile Apps/ Browser connections reach the UniFi Controller on the other port. How comes the integration does not as it even asks explicitly for a port? Is there NO way at all to get the integration work using different ports (1883/8443)?

Any suggestions? I always get „connection failed“…

Kay

Hi,
Given Frenck is rather busy on a Nabu Casa day job, and writing extras like Spook, it is almost impossible he will read posts on the forum, and indeed tagging people is considered bad here.

Unfortunately, we don’t know what your problem is, and don’t know your setup as your post doesn’t read as a question.

I suspect English is not your first language, and although your words are well written, the meaning is unfortunately not.

HINT: Click the links and read!


I’ll try to decypher your question so you can explain more…

  • You appear to have two separate servers (hardware? OS? software? versions?)
  • One runs a Unifi Controller (Unifi Cloud Key G2+ hardware, or what?)
  • One runs a MQTT broker (which one? HASSOS + Mosquitto Add-On, or self-install?)

If you want to link HASS with Unifi, just install the Unifi Protect integration on HASS, and link it to your UniFi controller.

Why do you need to run Unifi on the same hardware as MQTT, causing a TCP/IP port conflict on port 1883? Can you use this combination:

  • Machine 1 - Unifi controller + Protect + other Unifi s/w
  • Machine 2 - HASS + Mosquitto MQTT broker + MQTT integration + Unifi Integration

I use HASSOS on one device, and a separate Unifi CKG2+. Works well.

If this helps, :heart: this post!

Integration is asking the port specifically, right?

Yes, this is the setup dialogue I tried (using UniFis Controller port 8443), but, as mentioned above it quits with the error message „connection failed“…

EDIT: Just noticed: as port 443 is preset by this integration, could it be that it only works with Ubiquity Consoles (and no other hardware server hosting the controller)? As seen in this documentation 443 is usually used for their consoles and 8443 for controller software server running on other hardware…

Anyone ever used this integration NOT with their consoles (CloudKeys, DreamMachines, …)?
:face_with_monocle:

Hello Frank,

thank you very much for your time and answer! Even if it comes with a certain portion of sarcasm. :wink:

HINT: I already know the link you pointed me to. And indeed the tagging for acknowledgements is even desired exactly there. Otherwise, there would be no reason for this function at all. Why do you think I expected an answer from himself?

  • You appear to have two separate servers (hardware? OS? software? versions?)

No, just one hardware server running macOS with a Mosquitto MQTT server in a Docker container (port 1883) on the one hand and the Ubiquiti UniFi Controller App (port 8443) on the other.

No, there is no Ubiquiti hardware device involved running the UniFi Controller.

If you want to link HASS with Unifi, just install the Unifi Protect integration on HASS , and link it to your UniFi controller.

Why that? The post title mentions “UniFiController”. This is a different integration than “UniFi Protect” you mention above.

Why do you need to run Unifi on the same hardware as MQTT, causing a TCP/IP port conflict on port 1883? Can you use this combination:

Because I try not to load the UPS with too much hardware/power consumption in case of a power failure.

Ultimately, my goal is to shut down (via the HA and UniFi integration) part of the UniFi APs and switches in the house after power loss in order to save power on the one hand, but maintain a minimal LAN for home automation on the other.

Please excuse my linguistic weaknesses, but I hope I could make my request clearer now…

Kay

Hi folks,

maybe I found the solution: But as I am a network-noob, I am not sure if this is the solution or just coincidence. For me - at least - it worked after I changed the following setting in the UniFi-Controller:

  1. Launch e.g. a browser and go to your UniFi-Controller Webfrontend.
  2. Go to the Settings Section (Gear Wheel Icon).
  3. Choose System Tab.
  4. Click Show More besides Advanced section.
  5. Herein you’ll find a checkbox besides Network Discovery: tick it!
  6. Apply Changes with the newly appearing button on the bottom right.
  7. Enjoy :wink:

Afterwards I just had to relaunch the above mentioned integrations setup-dialogue with proper settings.

If I can provide any log / analytical data to reproduce/ confirm this issue and it’s solution and maybe improve the docs I would be happy to contribute.

Kay