Unifi Switch On/Off Network via Script (without App / Userinterface)

I got two of the lovely Unifi accesspoints from Ubiquiti for my home – the really have a huge rangeof configuration and a very very good wlan range!

….and of course I need to integrate them to my homemautomation …

Switching the GuestWLAN on/off is not really documented but works without problems using this command on the Unify Server component:
#!/bin/bash
export username=username
export password=Password
export baseurl=https://localhost:8443
export site=default

. unifi_sh_api
unifi_api /upd/wlanconf/NetworkId '{"enabled": true}'

or for switching off
unifi_api /upd/wlanconf/NetworkId '{"enabled": false}'

The sourced unfi_sh_api is an official API of the Unifi Server and for download at the release note of the corresponding firmware – for example here:
https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-5-6-26-Stable-Candidate-has-been-released/ba-p/2162104

I call this script from my ioBroker, which hosts everything above the CCU level

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

*

Time limit is exhausted. Please reload the CAPTCHA.