I need a bit of help with my Unifi setup. Now I’m asking for help to ease my ‘work-a-round’ - if some one can see the reason for my problem, then I would also be interested in that fix
My problem is, that when either my ‘USG-3P’ or any of my AP (‘UAP-AC-Pro’ or ‘UAP-AC-Lite’) looses power, then they end in ‘adopt’ state and I can not work with them from the controller before I manuelly SSH into the device and run the set-inform command (pointing to the controller), and then the components are back online.
I just updated to the latest version (0.23.2) of ‘Home Assistant Community Add-on: UniFi Controller’, which resulted in all going into ‘adopt’ mode (can see that would be normal) and eventurally they all automatically got adopted – but one AP… which is still trying to adopt.
So – which bagic button have I missed that makes all these values persistant in the unifi devices ?
Now, my work-a-round is from a linux box, to ssh into all my unifi devises and run the set-inform. Then it is alle fixed. But I would like to somehow make this as simple as possible. And I guess a script can do this, but my first step is to make a single ‘one liner’ per device, and here I have som trouble to pass the set-inform cammand.
sshpass -p <passord> ssh <userid>@x.x.2.8
Works fine. Gives a unifi consol.
sshpass -p <passord> ssh <userid>@x.x.2.8 date
Works fine. Displays the date.
sshpass -p <password> ssh <userid>@x.x.2.8 set-inform http://x.x.2.85:8080/inform
Gives the error, that ‘set-inform’ is not a know command. If I run the first one, and just get a consol, I can fine type the set-inform and it accepts it. I do believe I have tried all combinations of ‘ “ \” …
So, how can I make a simple one-liner that has the logon and the set-inform command in one line