Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unifi extension #17101

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Update unifi extension #17101

wants to merge 6 commits into from

Conversation

lewjuh
Copy link

@lewjuh lewjuh commented Feb 16, 2025

Description

Screencast

Checklist

- fixed: preferences
- Merge branch \'contributions/merge-1739613765617\'
- Pull contributions
- fix: linting
- feat: added legacy extensions backwards compatibility
- linting fixes
- Enhance Unifi integration with new device stats and preferences, update hooks and components for improved data handling
- Added extension for Unifi Network
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: unifi Issues related to the unifi extension labels Feb 16, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Feb 16, 2025

Thank you for your contribution! 🎉

🔔 @tonka3000 you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

@lewjuh lewjuh mentioned this pull request Feb 16, 2025
5 tasks
- remove pnpm lock
- fix marge issues
- update unifi plugin
- Initial commit
- fix: favour api key if both creds given
- remove legacy files from merge
- Merge branch \'contributions/merge-1739788733846\'
- Pull contributions
- Pull contributions
- fixes
- Merge branch \'contributions/merge-1739789536825\'
- Pull contributions
- fix: attempt to fix merge issues again, update changelog
- Merge branch \'contributions/merge-1739789435821\'
- Pull contributions
- chore: updated tsconfig and changelog
@lewjuh
Copy link
Author

lewjuh commented Feb 17, 2025

Sorry for the commit spam, i was having a lot of issues merging from the new extension to this one.

@@ -1,5 +1,13 @@
# UniFi Changelog

## 2.0 - 2025-02-15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 2.0 - 2025-02-15
## [Improvements] - {PR_MERGE_DATE}

Raycast extensions do not have an actual versioning. The 2.0 here is unnecessary. You can use a single word to introduce your works like previous changelogs.

And the @raycastbot can update the {PR_MERGE_DATE} filed to the merge date for a more accurate merge date.

Comment on lines -2 to +21
<img
src="https://github.com/raycast/extensions/blob/main/extensions/unifi/assets/unifi.png?raw=true"
width="50"
/>
# UniFi Network

<h1>
Unifi
</h1>
View devices and clients on your UniFi network, 100% locally.

Manage your Unifi Controller.
View active ports and radios, restart devices, quickly find device IP's and much more!

<p>
<a href="https://www.raycast.com/tonka3000/unifi">
<img src="https://img.shields.io/badge/Raycast-store-red.svg"
alt="Find this extension on the Raycast store"
/>
</a>
<a
href="https://github.com/raycast/extensions/blob/master/LICENSE"
>
<img
src="https://img.shields.io/badge/license-MIT-blue.svg"
alt="raycast-extensions is released under the MIT license."
/>
</a>
<img
src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"
alt="PRs welcome!"
/>
<a href="https://twitter.com/intent/follow?screen_name=tonka_2000">
<img
src="https://img.shields.io/twitter/follow/tonka_2000.svg?label=Follow%20@tonka_2000"
alt="Follow @tonka_2000"
/>
</a>
</p>
</div>
Currently limited by what has been exposed on the UniFi API, but will update as more is added.

## Features
## Requirements

- Show Devices
- Show Clients
- Open Unifi Dashboard in Browser
- UniFi Network: `^9.0`

## Local Accounts only
## Creating an API Key

This extension only support local admin accounts only.
Cloud accounts and/or 2FA are not supported!
1. Visit your UniFi Network dashboard (normally: [https://192.168.1.1/network/default](https://192.168.1.1/network/default))
2. Go to Settings -> Admin & Users (under Control Plane, usually [https://192.168.1.1/network/default/settings/admins](https://192.168.1.1/network/default/settings/admins))
3. Find your admin user and click on it.
4. At the bottom of the panel that comes up, you should see a section called `Control Plane API Key`. Click `Create New`.
5. Name your key and click `Create`
6. You'll now have your API Key, save it somewhere secure as you wont be able to retrieve this one again.
7. Enter the key into the preferences for the extension!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting all the author's content and preferences is a bad idea. At least you should introduce and explain why these need to changed.

"description": "Manage Unifi Controllers",
"icon": "unifi.png",
"author": "tonka3000",
"icon": "extension-icon.png",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to remove the unused file unifi.png after your update.

@LitoMore
Copy link
Contributor

LitoMore commented Feb 17, 2025

It's better to write a description for your changes since you rewrote almost the whole extension.

@lewjuh
Copy link
Author

lewjuh commented Feb 17, 2025

It's better to write a description for your changes since you rewrote almost the whole extension.

@LitoMore Apologies, this is a carry over from #16323

The old author was happy for me to take over and move over to Unifi's new official local API. The Preferences/content is because of deprecating the old method used which was an unofficial API. However, the actual preferences themselves will still work the same in this update, but show a one off message about how they should upgrade to using an API key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension fix / improvement Label for PRs with extension's fix improvements extension: unifi Issues related to the unifi extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants