This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Ubiquiti UniFi App

VeldkornetVeldkornet Member
edited April 2017 in Apps
Hey guys,

I've been trying to make a flow work with the UniFi app, but nothing seems to happen... Basically as a test, I just wanted a message to be sent when a device connects to WiFi, but I've tried with both the device name and MAC and I can't get it working. Any ideas?

So something like the below:


Edit:

I've fixed my own problem. I didn't read the instructions :smile: I missed a crucial part, I didn't add the actual wireless device in Homey :)
«1

Comments

  • FYI, the Unifi app works great for presence detection for me.

    If iPhone connects to network, and person is not marked as home, then person is home.
    If iPhone disconnects from network, then person is away.

    Only thing I've noticed is that my iPhone is in "Low Power Mode", the WiFi disconnects/reconnects every now and then to save power. Which means I'm marked as away and them immediately home again.
    But in normal situations, it works perfectly since the WiFi remains connected.
  • Hi,
    I can't connect to my local cloud controller.
    It says:

    30-8-2017 11:42:07 : [debug] There is no connection yet, please check your settings!
    30-8-2017 11:42:01 : [debug] Updating status to Connecting...
    30-8-2017 11:42:01 : [debug] Creating new controller connection
    30-8-2017 11:42:01 : [debug] Got new settings
    
    settings:
    
    Op deze pagina kun je de verbindingsstatus bekijken en de instellingen aanpassen.Verbindingsstatus: Connecting...
    Laatste update: 30-8-2017 11:36:36 (indien verbonden, update iedere 15 seconden)UniFi Controller instellingenHost :192.168.1.253Poort : 8443Gebruikersnaam : userWachtwoord : passSite : default Met deze instellingen kan ik wel connecten via de browser.
    THX!!!


  • @Veldkornet : Totally agree. This is such a brilliant app, and very nicely coded. I have always been surprised by the lack of discussion about it. Maybe because it just works as intended/expected. I love it.

    Apart from the help with presence detection of Homey users (zealot speaking here, using 6 sensor types at the moment*), I use simple flows like triggering a soundboard bleep with say command whenever any device connects or disconnects. Sometimes with a device/user specific message. Since then:

    - When friends with access to our wifi network approach (come to visit us, or just walk through our street), Homey alerts their vicinity, before they rang the doorbell. Also their departure afterwards;
    - When at home and a battery of one of our phones died (turning the device off, dropping the connection), Homey alerts us this phone needs charging;
    - Homey tells me when a laptop or tablet is turned on or off (specifying who did it is on the todo list);
    - Debugging wifi weirdness has improved. I detected my Philips TV connecting to the internet every 20 minutes when in standby mode. Phones killing their wifi connections, despite all settings instructing not to.

    So much interesting possibilities, when ALL (!) wireless devices are available in flows. Homey publishes the devices connection status to a MQTT broker, so Pimatic and Tasker can join in on the UniFi fun as well.

    *Homey itself, Tasker, Pimatic/Owntracks, eQ-3 MAX!, Hue MS and now also UniFi.

    @cautje : Too little information, and no experience with cloud stuff, to be able to offer much help, sorry. I would probably check how the firewall handles internet traffic on port 8443 first. Can recommend using UniFi Controller on a Raspberry Pi, sitting on the same local network where Homey lives.
  • @Motha THX for your reaction.

    I agree 100% this could be the perfect location service.

    The cloudcontroller is the same as a controller on a raspberry, it is also local with an extra optionaly connection to the unify cloud.
    It connects to a local ip.

    Do you connect to the default site or dit you made more sites?
    Or do you connect directly to the acces point?

    THX!!!




  • MothaMotha Member
    edited September 2017
    @cautje : Ah, ok. Did you try 'default' (without the quotes) as Site?

    I connect to the UniFi Controller (v5.5.20 on RPi), have one site, renamed that in UniFi, but have to use default as site name in the Homey app anyway. You probably have to use the same name showing up in the URL, when you connect to UniFi Controller in your browser.


  • Ok, i can try that
    Let you know

    THX!!!
  • Just chiming in here.. ive got a lot of unifi experience.. the "site name" is OFTEN not the one you actually call the site. but the site name used in your adress bar. like 192.168.0.33/kguj5448.

    in the address bar the first site is named default. i you have made another or you own from scratch then it has a different name in the adress field that site is named jeff in the controller, but in the adress bar its 
    /manage/site/0n68pcwa/dashboard  where 0n68pcwa is the ACTUAL site name..
    if you ssh into your controller/cloud key. then you will also find a list of site names where all of them have these numbers and letters in them. they wont be shown as the name you have given them on your own. try swapping and see if it helps..
  • @skandshus Great!!! That dit the trick!

    I changed the site name in the name after the local cloudcontroller adres.

    https://192.168.1.253:8443/manage/site/cmjaqun1/

    THX!!!





  • Nice! B)
  • @Motha.  Reading back, that was also your advice. THX!!!

    You probably have to use the same name showing up in the URL, when you connect to UniFi Controller in your browser.
  • Great you got it working..im only a reader not a user.. dont even have a homey yet but waiting on the sideline.. :)
    cant quite figure out if this homey is stable or if homey is actually so unstable as it seems in forums.. or if it really is user mistakes.. :) Right now i have an alexa. and she ALWAYS works .. :)
  • @skandshus homey is working great! Stable and verry usefull and fun
  • cautje said:
    @skandshus homey is working great! Stable and verry usefull and fun
    is there anywhere in this forum i can find a shopping list or a "did you know you can do this"
    im not so creative but i want to aim for a smart home though. right now
    i've got some Yeelight bulbs and Osram lightify. then i have a Sensibo Sky to control my heatpump, and a Anymote to control my tv/radio.. but i want more.. i just cant figure out "where to start"
  • Hi, general the app works great, but it i often disconnects from unifi, and I have to push the apply button again under settings to reconnect. Anyone else with the same problem?
  • @Christian77 : Yes, but not that often. On average about once every two weeks.
  • Hey guys,

    I've been trying to make a flow work with the UniFi app, but nothing seems to happen... Basically as a test, I just wanted a message to be sent when a device connects to WiFi, but I've tried with both the device name and MAC and I can't get it working. Any ideas?

    So something like the below:


    Edit:

    I've fixed my own problem. I didn't read the instructions :smile: I missed a crucial part, I didn't add the actual wireless device in Homey :)
    Ran in to the same problem, didn't read well. Now the app working perfect!
  • There seems to be something wrong with the "Last connection lost " card.

    The "First defice connected" card is ok.



     
  • I've tried many things, but nothing seems to work.
    I'm I a donkey :( haha
    Is there somebody who could help me step by step. I'm Dutch maybe I could understand it beter in  Dutch.

    192.168.178.206 is the IP of the Wifi
    Site is Default
    Port is 8443

    When i'm logging into my Wifi:
    https://localhost:8443/manage/site/default/settings/site

    Username en WW are the same as set in settings in tab Site device authenticatie.

    Maybe it's something small, but i'm desperate right now.

    Thnx

  • @micha35w :
    - Did you try the site name 'default' in all lowercase letters (uitsluitend kleine letters)?
    - And fill in the IP address of your UniFi Controller (not your access point)?
    Then do a reconnect in the Homey app settings. Sometimes I have to refresh that page afterward, to see the new connection status.
  • micha35wmicha35w Member
    edited September 2017
    Thanks for your reaction
    At host i've tried localhost and 192.168.178.206, nothing seems to work

    default i've tried this only in lowercase letters
  • Localhost on the Homey points to the Homey itself, that won't work. You need the IP address where Homey can find the UniFi Controller on your network.

    If you installed UniFi Controller on a desktop computer (PC or laptop), you need to find that IP address, and fill it in in the Homey app. Chances are the firewall on that computer is blocking access from Homey. You can try to disable your firewall (temporarily), and try to connect again. Don't forget to turn it on again if your finished testing.
  • though mine Ip is 192.168.178.206?

    only it's not reachable in the browser.

  • MothaMotha Member
    edited September 2017
    It looks like 192.168.178.206 is the IP-address of UniFi AP-AC-LR, that is your access point.
    The UniFi Controller software is running on localhost, that's the computer where you opened your browser. You need to find that IP address.

    On the computer running the UniFi Controller software:
    1) Be sure the UniFi Controller software is running (you can log into it with your browser). Start it first if needed.
    2) Start a DOS command prompt and type: ipconfig.
    In the output, look for a line listing your IPv4 address (but not your gateway). In your case probably 192.168.x.x
    3) Fill that IP address in, in the Homey UniFi app settings.
    4) Also set the same username/password there, which you used in your browser to login to https://localhost:8443/manage/site/default/settings/site.
    5) Then try connecting again in the Homey UniFi app. Refreshing the page doesn't hurt, I often see the old status when connected.
    optional: Do some ritual to keep the gods happy, just in case.

    If your firewall doesn't block access, it should work by now *crosses fingers*

    [edit: Added extra clearification]
  • cautje said:
    There seems to be something wrong with the "Last connection lost " card.

    The "First defice connected" card is ok.



     
    I think the card is ok, but the error encountered runs offscreen. Or misses some text. It is probably trying to tell you that the accesspoint name is missing. This makes sense if there are more than one access points present.

    Just my guess though. Try filling in your access point name, and see if it still throws the error.
  • @Motha THX again for your reaction!

    There is only one accespoint in this site, it is called "Woonkamer"

    When manually setting the name it gives the same fault and i cant save it.


    The card "Eerste apparaat verbonden" works great



  • Motha said:
    It looks like 192.168.178.206 is the IP-address of UniFi AP-AC-LR, that is your access point.
    The UniFi Controller software is running on localhost, that's the computer where you opened your browser. You need to find that IP address.

    On the computer running the UniFi Controller software:
    1) Be sure the UniFi Controller software is running (you can log into it with your browser). Start it first if needed.
    2) Start a DOS command prompt and type: ipconfig.
    In the output, look for a line listing your IPv4 address (but not your gateway). In your case probably 192.168.x.x
    3) Fill that IP address in, in the Homey UniFi app settings.
    4) Also set the same username/password there, which you used in your browser to login to https://localhost:8443/manage/site/default/settings/site.
    5) Then try connecting again in the Homey UniFi app. Refreshing the page doesn't hurt, I often see the old status when connected.
    optional: Do some ritual to keep the gods happy, just in case.

    If your firewall doesn't block access, it should work by now *crosses fingers*

    [edit: Added extra clearification]
    When I look at ipconfig I see 192.168.172.59 but this the ipadress of this computer, so this is not the one of the unifi controller.
    When I start unifi software it starts in my browser. It's said this page is not safe. Is this also at your computer?
    I have Disabled the firewall, nothing seems to work. i'm desperate.
  • Is it possible that I have to make some settings in the software of the accespoint?
  • cautje said:
    [...]
    When manually setting the name it gives the same fault and i cant save it.
    [...]
    See app.com.ubnt.unifi.www.missing
  • @micha35w :
    Your UniFi Controller runs on https://localhost:8443/manage/site/default/settings/site, that is your own computer. Yes, that's also the source of the certificate error (page not safe). That is to be expected there.

    If you tried the steps above + the Controller software is on computer 192.168.172.59 + your access point is on 192.168.178.206, they are probably not in the "same" network (IP address range). In that case, they can't reach each other. Your network setup needs to change to get them in the same network.
  • Sorry i've typed the wrong number, it must be 192.168.178.59.
    They are in the same network.
Sign In or Register to comment.