I came up with this as an alternative if anyone is interested.
which one is the latest version?
or
GitHub - RubenDijk/homeassistant: Homeassistant stuff (this one is the linked on the top)
Iād love to get it working but I am stuck somewhere. Could you help me?
Currently I run 8 AP on a controller which is installed on a pi (Version 6.5.55), without a self-signed certificate (browser states that the certificate is not trustworthy) . My last try for the first AP was:
host = āController-IPā
username = āUnifi-Userā
password = āUnifi-PWā
version = āv6ā
site_id = ādefaultā
port = ā8443ā
verify_ssl = False
target_mac = āUnifi-Macā ## the mac address of your AP device
client = Controller(host, username, password, port, version,
site_id=site_id, ssl_verify=verify_ssl)
All I get is this error:
[homeassistant.components.command_line] Command failed: python3 /config/scripts/unifi_ap1.py
I also tried version v5; version unifiOS; and verify_ssl = True
Which device you running on ? Are you running a stand alone controller ? Think the port might be wrong.
I run the controller on a raspi 4, 8443 is the port I access the controller with my browser
Update: I tried Port 443 in combination with Version v5 and unifiOS as well as in combination with ssl = True and ssl= false.
no success so far.
Did you add the custom component: GitHub - custom-components/sensor.unifigateway: High level health status of UniFi Security Gateway devices via UniFi Controller ?
It needs some part of the component in order to work correctly.
Yes, this component is up and running. Iāll try more possibilities later on but for now Iāll let it be.
Thanks a lot @w1tw0lf for this project.
Itās exactly what I needed.
Iāve met some issues like some other people here.
Pay attention to setup the correct AP version !
Only 1 pending āissueā on my side.
I donāt have any icon shown. I keep eye icon in the card and on the entity as well.
Any hint on that ?
Thanks
Mind sharing a screenshot of the card ?
Here it is :
For the icon, you need to customize the entity, sensor.****_ap with an entity picture. You can place the file as a *.png under /config/www
I uploaded the 5 that i have to the git page
I canāt because my sensor unifi_ap has no unique_ID
Do you have any idea from where this comes from ?
Did I miss setup something ?
Donāt worry about, that is normal.
in your configuration.yaml add the following:
customize:
sensor.unifi_ap:
entity_picture: /local/u6.png
Just replace u6.png with the one you want to use. Make sure the png is located in /config/www. Restart home assistant and it will display correctly.
Thanks for your prompt replies.
Unfortunately, I donāt find where exactly I need to insert this in my configuration.yaml.
under line below ?
sensor:
- platform: command_line
put it right at the end of the file.
customize should be at the beginning of a new line, in other words no spaces before.
sensor:
- platform: command_line
customize:
sensor.unifi_ap:
entity_picture: /local/u6.png
PS: Sorry corrected my code snippet, had some spacing errors.
Thanks @w1tw0lf !
I had to put the customize part under homeassisant as below :
homeassistant:
customize:
sensor.unifi_ap:
entity_picture: /local/images/UnifiAP.png
It works perfectly like this !
Beware - if you have a unifi controller with multiple sites (or youāre not using the ādefaultā site), be sure to set your python script to use the Site ID and NOT the actual name of the site as it appears in the sites list. Instead, it is a āsite IDā which is a random string of 8 characters that can be found in the URL of the web browser when logged into the Unifi controller.
For example, my site name might be āHomeSite1ā, but the site that I had to define in the python script was actually the random string that I got from the web browser. I discovered this by viewing the unifi controller logs, and logs showed that the unifi controller wasnāt liking the site Id.
For example, when I manage my āHomeSite1ā unifi controller, the URL in the web browser looks like this:
unifi. ui. com/ 7.0.22.0/ unifi/site/xtm8ytp4
#### fill in your unifi controller credentials ####
host = '192.168.1.XXX'
username = 'User'
password = 'Password'
site = 'xtm8ytp4' #Site ID, not actual site name e.g. HomeSite1. Site ID found in web browser while managing unifi controller.
port = '8443'
mac = 11:22:33:44:55:66' ## the mac address of your AP device
Iād love to monitor my Dream Machine in HA. I am running HA OS in Hyper-V. Can I run the python module and script in HA OS?
Sorry for late reply. Havenāt work with the dream machine yet, but donāt see why it wouldnāt work with it.
Is there an easy way to find out the correct version? Iāve tested nearly everything without successā¦