Skip to content

Instantly share code, notes, and snippets.

@zerog2k
Last active August 18, 2023 01:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerog2k/1ea5ab2223c4d92d70f8e95574b8837b to your computer and use it in GitHub Desktop.
Save zerog2k/1ea5ab2223c4d92d70f8e95574b8837b to your computer and use it in GitHub Desktop.
notes for repurposing Ubiquiti CRM Point to "Cloud Key", by installing unifi controller, new method
### new procedure for CRMPoint -> Unifi Network Controller conversion
## install latest crmpoint fw per:
## https://community.ui.com/questions/Installing-airControl-on-CRM-Point/a4f1fdcd-114a-4c06-a842-e56eff486570
# login via ssh
# change root/ubnt password
passwd
# stop and disable old services
for SERVICE in aircontrol postgresql infctld; do
systemctl stop $SERVICE
systemctl disable $SERVICE
done
apt update
apt install ca-certificates
cat > /etc/apt/sources.list <<EOF
deb [check-valid-until=no] http://deb.debian.org/debian/ jessie main contrib non-free
deb [check-valid-until=no] http://www.ubnt.com/downloads/unifi/debian cloudkey-stable ubiquiti
EOF
# install unifi network controller
apt update
apt install unifi # currently will get latest 6.2.x w/ dependencies
# fix leds
mkdir /etc/systemd/system/unifi.service.d
cat <<EOF >/etc/systemd/system/unifi.service.d/leds.conf
[Service]
ExecStartPost=/bin/sh -c '/bin/echo 0 > /sys/class/leds/white/brightness; /bin/echo 255 > /sys/class/leds/blue/brightness'
EOF
# cleanup aircontrol/postgres?
apt remove aircontrol postgres\*
reboot
# after device reboots, and light turns blue (a few minutes), you can setup at https://{deviceip}:8443
## note that you can always restore to factory defaults of CRM Point with:
# ubnt-systool reset2defaults
@michalpan
Copy link

Very good instruction. Thank you very much for this.

For anyone having strange issues - I had issues due to old crmpoint firmware. Following the instruction from the header helped.

BTW - as per today's installation unified version to be installed is 7.2.95

Thanks again,
Michal

@1ronlord
Copy link

1ronlord commented Jun 19, 2023

Please update debian 8 sources list with extended LTS repositories and enable freexian key in your APT configuration.
https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/

http://deb.debian.org/debian/ jessie and http://archive.debian.org/debian/ jessie are no longer maintained.

Also, http://www.ubnt.com/downloads/unifi/debian source doesn't work,
update it with ==> https://www.ui.com/downloads/unifi/debian cloudkey-stable ubiquiti

@zerog2k
Copy link
Author

zerog2k commented Aug 18, 2023

thanks @1ronlord
I was able to update my crm-cloudkey from network controller 6.2.26 to 7.2.97 (which is probably the end of the line for this old device, which is trying to hang in there ;)

I did find an issue with the led permissions. I suspect network controller changed to using unifi user, which doesnt have permissions to write to /sys/class/leds/{blue,white}/brightness

root@cloudkey:~# journalctl -u unifi
Aug 17 17:20:59 cloudkey systemd[1]: Starting unifi...
Aug 17 17:20:59 cloudkey unifi-network-service-helper[353]: sudo: unable to resolve host cloudkey
Aug 17 17:21:01 cloudkey unifi-network-service-helper[353]: unifi: Skipping load-environment...
Aug 17 17:21:01 cloudkey unifi-network-service-helper[353]: unifi: init complete...
Aug 17 17:21:02 cloudkey unifi-network-service-helper[649]: sudo: unable to resolve host cloudkey
Aug 17 17:21:03 cloudkey unifi-network-service-helper[649]: unifi: health-check max retry count: 100
Aug 17 17:26:22 cloudkey unifi-network-service-helper[649]: unifi: unifi is up and running. Health check finished successfully.
Aug 17 17:26:22 cloudkey sh[1319]: /bin/sh: 1: cannot create /sys/class/leds/white/brightness: Permission denied
Aug 17 17:26:22 cloudkey sh[1319]: /bin/sh: 1: cannot create /sys/class/leds/blue/brightness: Permission denied
Aug 17 17:26:22 cloudkey systemd[1]: unifi.service: control process exited, code=exited status=2
Aug 17 17:26:22 cloudkey java[648]: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
Aug 17 17:26:27 cloudkey systemd[1]: Failed to start unifi.
Aug 17 17:26:27 cloudkey systemd[1]: Unit unifi.service entered failed state.

so I executed this:
chmod o+rw /sys/class/leds/{blue,white}/brightness
(and also added this to /etc/rc.local to persist reboots)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment