Home Assistant UniFi Integration (HOW-TO)

  Рет қаралды 30,712

KPeyanski

KPeyanski

Күн бұрын

My UniFi equipment in Amazon (affiliate link) - amzn.to/3wfgGHn
After you finish watching this Home Assistant Ubiquiti UniFi video you will be able to do presence detection, block network access for any clients, check bandwidth and uptime sensors and more. Everything that you will need is Home Assistant and UniFi network equipment.
► TIME TABLE
00:00 Intro
00:24 What you need for this video?
01:21 Home Assistant UniFi integration
02:22 Home Assistant UniFi integration options
03:29 Add Home Assistant card with sensors and switch
04:19 UniFi clients uptime sensor fix
06:20 Home Assistant UniFi presence detection
07:42 Home Assistant UniFi Automation example
09:59 Testing the automation
► MY GUIDE - ON SALE
Smart Home Getting Started Smart Home Guide v2.0 - peyanski.com/product/smart-ho...
► AFFILIATE LINKS
Ubiquiti UniFi Dream Machine (UDM) - amzn.to/34B0FQK
Ubiquiti UniFi Security Gateway (USG) - amzn.to/2WCYNCk
Ubiquiti Networks Networks UniFi Security Gateway Pro (USG-PRO-4) - amzn.to/3palPwQ
UniFi Dream Machine Pro (UDM-Pro) - amzn.to/3paw3gG
Raspberry Pi 4 4GB Starter Kit with 32GB Micro SD Card - amzn.to/3qaI5qN
Best Crypto currency exchange Binance - www.binance.com/en/register?r...
Tech that I’m using right now - www.amazon.com/shop/kpeyanski
Get $100 in credit over 60 days for DigitalOcean - m.do.co/c/6dd2caef1f1f
► SUPPORT MY WORK
Patreon - / kpeyanski
Paypal - www.paypal.me/kpeyanski
Bitcoin - 1GnUtPEXaeCUVWdJxCfDaKkvcwf247akva
Revolut - revolut.me/kiriltk3x
► TEMPLATE UPTIME SENSOR FOR THE NATIVE UNIFI UPTIME SENSOR
configuration.yaml entry
sensor:
- platform: template
sensors:
YOUR_NEW_SENSOR_NAME_uptime:
friendly_name: “Whatever you wish “
value_template: "{{states('sensor.YOUR_UPTIME_SENSOR_uptime').split('T')[1].split('+')[0]}}"
► HOME ASSISTANT UNIFI EXAMPLE AUTOMATION
automations.yaml entry
alias: If Apple TV uptime reached and Kiril is not home
description: ''
trigger:
- platform: state
entity_id: sensor.appletv_uptime
to: '00:00:10'
condition:
- condition: device
domain: device_tracker
entity_id: device_tracker.kiril_phone
type: is_not_home
action:
- service: switch.turn_off
target:
entity_id: switch.apple_tv_4
mode: single
► COME AND SAY “HI”
My Discord server - invite.gg/kpeyanski
Twitter - / kpeyanski
✅ Don't Forget to like 👍 comment ✍ and subscribe to my channel!
► DISCLAIMER
Some of the links above are affiliate links, where I earn a small commission if you click on the link and purchase an item. You are not obligated to do so, but it does help fund these videos in hopes of bringing value to you!

Пікірлер: 37
@raymondsiew1696
@raymondsiew1696 2 жыл бұрын
Awesome Video! Wonder if you could do a video covering POE of/off with HomeAssistant on USW?
@buf0rd
@buf0rd 2 жыл бұрын
THANK YOU!
@KPeyanski
@KPeyanski 2 жыл бұрын
You are very welcome. Feel free to check my other videos as well!
@lobatodan
@lobatodan 2 жыл бұрын
Tks to share!
@KPeyanski
@KPeyanski 2 жыл бұрын
You are welcome!
@speakup11
@speakup11 2 жыл бұрын
I found the uptime generated by the Unifi to be very unpredictable. Sometimes it just "pauses" when offline and continues afterwards, having the client device more than 3 days connected, while clearly having been disconnected from the wifi multiple times. It looks in some cases the uptime reverts back to the time the UDM rebooted. Will try to create a service timer in HA which triggers when the device gets online. Hope this will be more stable.
@Talk2Giuseppe
@Talk2Giuseppe 2 жыл бұрын
Would really like to get this integration going - but I'm unable to get past the Set Up screen. Even tried creating a new admin user in Unifi and it simply won't go... Perhaps you could do a video on making sure we have the data right with Ubiquiti? I tried username, email, lowercase, proper case, port number changes (how to locate that on Unifi's site would be nice!)... Nothing... Gave up after a week of banging my head on the wall! :)
@sirnicolas21
@sirnicolas21 2 жыл бұрын
i can find "unifi network" and "unifi protect" integrations, the network is not showing the poe and rx/tx operations at all, my list doesn't have "ubiquity unifi" integration like you have (running a UDM-Pro)
@mskikitv1681
@mskikitv1681 2 жыл бұрын
Great video. Can HA act as a unfi controller? Or do I need to purchase a unifi controller?
@BrianMPedersen
@BrianMPedersen 2 жыл бұрын
yes search: Home Assistant Community Add-on: UniFi Network Application; default port is with the docker install is 8443
@KPeyanski
@KPeyanski 2 жыл бұрын
Yes you can! Just add the UniFi add-on as Brian suggested
@mskikitv1681
@mskikitv1681 2 жыл бұрын
Great thank you!
@rstdude1
@rstdude1 3 жыл бұрын
When you block network access using the switch it blocks the device but devices already connected seem to keep working. Do you know a way to disconnect and block already connected devices? Thanks for the video!
@KPeyanski
@KPeyanski 3 жыл бұрын
Hmm, my Apple TV was connected to the network already and when I disabled the switch - I was unable to open KZfaq app and to stream on it. So it was working as expected. Could you please try again on different devices?
@rstdude1
@rstdude1 3 жыл бұрын
@@KPeyanski So I isolated the issue to devices connected to one AP. Other APs would block and disconnect the devices fine. All the AP needed was a restart and it works fine now. Thanks for the reply!
@KPeyanski
@KPeyanski 3 жыл бұрын
Great to hear that. And thanks that you share the solution!
@juanmcons
@juanmcons 3 жыл бұрын
Hi, when i do this it's say error, cannot connect. in the first window of the integration, do you know what can i do?
@KPeyanski
@KPeyanski 3 жыл бұрын
Check if the HA and UniFi controller are seeing each other. Also make sure that your Ubiquiti user is admin with local rights
@javandermerwe
@javandermerwe 2 жыл бұрын
I had this issue as well and then realised my port was actually 8443, rather than the default 443. Perhaps check that on your setup.
@Yellowfin34
@Yellowfin34 Жыл бұрын
@@javandermerwe Well I spent about 4 hours playing with this until I stumbled upon your comment. Works great, thank you!
@rallydanger07
@rallydanger07 3 жыл бұрын
How can i disconnect a device on a schedule?
@KPeyanski
@KPeyanski 3 жыл бұрын
You will need a time based automation. It is not hard.
@rallydanger07
@rallydanger07 3 жыл бұрын
@@KPeyanski any chance you can make a video, I'm sure this would help several people looking for Parental controls with UDM
@kevin4rsl
@kevin4rsl 2 жыл бұрын
Whenever i input the ip, user, password and port. It does not work. Can you tell how to get that information correctly?
@KPeyanski
@KPeyanski 2 жыл бұрын
What kind of user are you trying? It should be a local one with admin privileges
@kevin4rsl
@kevin4rsl 2 жыл бұрын
@@KPeyanski I have a unifi controller installed on a windows 10 computer with a unifi ap pro. It connected to my ISP modem/router but on modem mode only
@javandermerwe
@javandermerwe 2 жыл бұрын
I had a similar issue and realised 443 wasn’t the correct port for me. When logged into my controller, I noticed it was 8443 instead. Check and confirm yours as 443 might be wrong for you
@kevin4rsl
@kevin4rsl 2 жыл бұрын
@@javandermerwe already tried that. Still did not work
@taimaishublm
@taimaishublm 2 жыл бұрын
I don't understand why I don't have the options button. haha
@KPeyanski
@KPeyanski 2 жыл бұрын
Hi, which options buttons you are talking about exactly?
@tonilundin
@tonilundin 3 жыл бұрын
Guess this will not work when using 2f authentication
@KPeyanski
@KPeyanski 3 жыл бұрын
That is interesting question :) And I don't know the answer as I don't have 2fa enabled. If you have can you please try it and let us know the result. Thanks
@EsotericArctos
@EsotericArctos 3 жыл бұрын
2FA does not yet work with the Home Assistant addon as far as I remember. May need a few people to get on GitHub and make it a feature request.
@KPeyanski
@KPeyanski 3 жыл бұрын
Yes, that could be very helpful. 2FA is really important especially after the Ubiquiti password leak issue few months ago.
@tonilundin
@tonilundin 3 жыл бұрын
@@KPeyanskiJust tried. Dosent work with 2fa. But you can create a separate account with super complex password for HA. And have 2FA enable for your ordinary admin account
@KPeyanski
@KPeyanski 3 жыл бұрын
Thanks for the update Toni! And yes you can create another user and admin rights are not must if you don't want to block network access, but just read the data (presence & sensors)
Automate your Internet with Home Assistant and Unifi
8:02
Everything Smart Home
Рет қаралды 91 М.
15 Home Assistant Tips You MUST Do
14:28
Everything Smart Home
Рет қаралды 345 М.
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 161 МЛН
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 37 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 92 МЛН
Home Assistant / Alexa Integration - NO SUBSCRIPTION
10:57
HandyDadTV
Рет қаралды 89 М.
UniFi Network BEGINNERS Configuration Guide | 2024
46:14
Unified IT
Рет қаралды 124 М.
I REPLACED my $1000 Wifi....
13:39
Linus Tech Tips
Рет қаралды 2,1 МЛН
Improve Zigbee network performance and stability with these 3 tips
11:41
Home Automation Guy
Рет қаралды 169 М.
4 EASY Presence Detection Setups in Home Assistant
11:29
Everything Smart Home
Рет қаралды 148 М.
Is this my new favorite smart home camera?
12:40
Eric Welander
Рет қаралды 38 М.
I get giddy just looking at it - Ubiquiti Cloud Key Enterprise
8:33
Home Assistant and Zigbee is all you need!
24:10
Christian Lempa
Рет қаралды 101 М.
How to Optimize a Unifi WiFi Network
12:21
Everything Smart Home
Рет қаралды 154 М.
The screw cap can also be played like this
0:20
Dice Master_1910
Рет қаралды 13 МЛН
Пресс Боксера Тяжеловеса и Твоего Тренера
0:20
Голову Сломал
Рет қаралды 3,2 МЛН
Smart Appliances! New Gadgets, Versatile Utensils, Tool Items #shorts #gadgets 149
0:15
Immersive outdoor dining Chinese rural dog Little puppy Rural dog
0:30
Country Puppy
Рет қаралды 18 МЛН
Smart Appliances! New Gadgets, Versatile Utensils, Tool Items #shorts #gadgets 149
0:15