Skip to content

Comments

SE-57: new script for UPS Tower battery status#520

Open
andreatondo wants to merge 1 commit intorcfrom
SE-57
Open

SE-57: new script for UPS Tower battery status#520
andreatondo wants to merge 1 commit intorcfrom
SE-57

Conversation

@andreatondo
Copy link
Member

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 205a8a9128

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

D.failure(D.errorType.AUTHENTICATION_ERROR);
return;
}
D.success();

Choose a reason for hiding this comment

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

P2 Badge Validate controller credentials before succeeding association

The validate() RPC claims to verify that the API key and controller IP are correct, but it only checks that the parameters are non-empty and then always returns D.success(). This means a mistyped IP or invalid API key will pass association and only fail later during collection, which makes misconfigurations harder to detect and troubleshoot at onboarding time.

Useful? React with 👍 / 👎.

var externalDevice = D.createExternalDevice(udmIp);
var options = {
protocol: "https",
url: "/proxy/network/api/s/default/stat/device",

Choose a reason for hiding this comment

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

P2 Badge Avoid hardcoding UniFi site to default

The request path is fixed to /proxy/network/api/s/default/stat/device, so controllers where the UPS belongs to any non-default site will never return that device and the driver will fail with RESOURCE_UNAVAILABLE despite valid credentials and connectivity. This should be site-aware (parameterized or discovered) to work across standard multi-site UniFi deployments.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant