TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Golang UniFi Network and Protect API CLI and Client

4 点作者 cliffy9 天前
Ubiquiti recently added HTTPS REST APIs to their Network and Protect applications. While exploring what was available, I came across a pair of interesting endpoints that promised to stream Protect events like detections, motions, doorbell rings, etc. over a Websocket connection.<p>My UniFi doorbell works great, but I frequently miss the sound of the doorbell because the main chime is far from my workstation, plus I prefer to mostly silence my phone while I&#x27;m working. Physical UniFi Chimes are available, but are usually out of stock, and their price seems to keep going up! So my initial motivation was to write enough of a client to enable a doorbell application which would play a sound whenever a &quot;ring&quot; event was emitted by Protect&#x27;s API.<p>A few dozen commits later, I found I had built a half decent client and CLI command utility for talking to the Network and Protect APIs. So I&#x27;m pleased to announce the initial v0.1.0 release of `unified`:<p>`unified` is a command line utility (and Golang client) for talking to UniFi Network and Protect APIs.<p>You can check out the code at: <a href="https:&#x2F;&#x2F;github.com&#x2F;ClifHouck&#x2F;unified">https:&#x2F;&#x2F;github.com&#x2F;ClifHouck&#x2F;unified</a><p>v0.1.0 supports the following:<p>UniFi Network API V1 is fully supported as of Network application version &quot;9.1.120&quot;.<p>UniFi Protect API V1 is only partially supported, with the following endpoints supported:<p>- `&#x2F;v1&#x2F;meta&#x2F;info`<p>- `&#x2F;v1&#x2F;subscribe&#x2F;devices`: only partial type support.<p>- `&#x2F;v1&#x2F;subscribe&#x2F;events`<p>- `&#x2F;v1&#x2F;cameras&#x2F;`<p>- `&#x2F;v1&#x2F;cameras&#x2F;{id}`<p>But I&#x27;m committed to working towards full Protect API V1 support.<p>I think there&#x27;s a lot of potential for interesting uses of these APIs. Hopefully someone besides me finds this useful.<p>Disclaimer: This client is not in any way affiliated with Ubiquiti. I do not take any responsibility for any harm that may come to your device(s) by utilizing this client. Use at your own risk!

暂无评论

暂无评论