Hello all,
I created a Home Assistant custom component that allows for block/unblocking a Group of devices on a Ubiquiti Unifi Controller
Summary: I needed the ability to turn off internet access to a child’s devices, they had 4 of them. So I wrote this HASS component to allow me to flip them on or off with a single button (created a group of switched), or I can fine tune and allow select devices on or off if I want. Also allows me to use Automatons on the HASS server to turn off internet at specified times, and turn back on automatically. This is my first HASS custom component, feel free to improve.
August 2019 Edit: This functionality has now been included in the base Home Assistant Device Tracker by someone else. I’m no longer updating or supporting my custom component.
Matt
God I wish I had this 10 years ago. They’re all big enough and ugly enough (19,22,23) to set their own internet hours, but as I say 10 years ago it was a problem!
I have no experience with multi-site controllers so I can’t help there.
For #3 the you need to place the devices in a group on the Ubiquiti Controller. (I did this to limit the number of devices that were imported as switches. However it would be trivial to remove the group restriction and just import all devices on the Ubiquiti Controller.
I’ve added the necessary configuration to my switches.yaml file and then completely rebooted my HASSIO instance, I’m getting the following error in the configuration checker -
“Integration unifi_device_block not found when trying to verify its switch platform.”
I probably should point out I’m running 0.94.1 on a raspberry Pi 3b.
So the blocking and unblocking script works as expected…
Quick question.
Do you have any issues with devices not being able to access the internet once they’ve been blocked and subsequently unblocked? I’m getting issues with xboxes and android devices not being able to access the internet in the AM after I’ve unblocked them. The only current solution is to restart my USG. Just wondered if this was a common issue?
I have had that happen twice before. It is something with the Ubiquiti USG for sure. However the problem hasn’t occurred for me in months, so I never worried about trying to report it to Ubiquiti.