Skip to content

Commit d6eecf2

Browse files
v4.1.1 (#168)
## [4.1.1](https://github.com/homebridge-plugins/homebridge-noip/releases/tag/v4.1.1) (2025-01-25) ### What's Changes - Housekeeping and updated dependencies. **Full Changelog**: v4.1.0...v4.1.1
1 parent dbeca82 commit d6eecf2

File tree

12 files changed

+795
-392
lines changed

12 files changed

+795
-392
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ contact_links:
33
- name: Homebridge Discord Channel for No-IP
44
url: https://discord.gg/8fpZA4S
55
about: Please ask and answer questions here.
6-
- name: Homebridge-noip - Pull Requests
6+
- name: @homebridge-plugins/homebridge-noip - Pull Requests
77
url: https://github.com/homebridge-plugins/homebridge-noip/pulls
88
about: Please report security vulnerabilities here.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
44

5+
## [4.1.1](https://github.com/homebridge-plugins/homebridge-noip/releases/tag/v4.1.1) (2025-01-25)
6+
7+
### What's Changes
8+
- Housekeeping and updated dependencies.
9+
10+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-noip/compare/v4.1.0...v4.1.1
11+
512
## [4.1.0](https://github.com/homebridge-plugins/homebridge-noip/releases/tag/v4.1.0) (2025-01-16)
613

714
### What's Changes

package-lock.json

Lines changed: 705 additions & 368 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@homebridge-plugins/homebridge-noip",
33
"displayName": "No-IP",
44
"type": "module",
5-
"version": "4.1.0",
5+
"version": "4.1.1",
66
"description": "The No-IP plugin allows you to update your No-IP hostname(s) for your homebridge instance.",
77
"author": {
88
"name": "donavanbecker",
@@ -40,7 +40,7 @@
4040
],
4141
"main": "dist/index.js",
4242
"engines": {
43-
"homebridge": "^1.8.5 || ^2.0.0 || ^2.0.0-beta.23 || ^2.0.0-alpha.37",
43+
"homebridge": "^1.8.5 || ^2.0.0 || ^2.0.0-beta.26 || ^2.0.0-alpha.37",
4444
"node": "^20 || ^22"
4545
},
4646
"scripts": {
@@ -61,31 +61,31 @@
6161
"docs:theme": "typedoc --theme default-modern"
6262
},
6363
"dependencies": {
64-
"@homebridge/plugin-ui-utils": "^2.0.0",
64+
"@homebridge/plugin-ui-utils": "^2.0.1",
6565
"rxjs": "^7.8.1",
66-
"undici": "^7.2.3",
66+
"undici": "^7.3.0",
6767
"validator": "^13.12.0"
6868
},
6969
"devDependencies": {
70-
"@antfu/eslint-config": "^3.14.0",
70+
"@antfu/eslint-config": "^4.1.0",
7171
"@types/aes-js": "^3.1.4",
7272
"@types/debug": "^4.1.12",
7373
"@types/fs-extra": "^11.0.4",
7474
"@types/mdast": "^4.0.4",
75-
"@types/node": "^22.10.7",
75+
"@types/node": "^22.10.10",
7676
"@types/semver": "^7.5.8",
7777
"@types/source-map-support": "^0.5.10",
7878
"@typhonjs-typedoc/typedoc-theme-dmt": "^0.3.1",
79-
"@vitest/coverage-v8": "^3.0.0",
80-
"eslint": "^9.18.0",
79+
"@vitest/coverage-v8": "^3.0.4",
80+
"eslint": "^9.19.0",
8181
"eslint-plugin-format": "^1.0.1",
8282
"homebridge": "^1.8.5",
83-
"homebridge-config-ui-x": "4.68.0",
83+
"homebridge-config-ui-x": "4.69.0",
8484
"nodemon": "^3.1.9",
8585
"shx": "^0.3.4",
8686
"ts-node": "^10.9.2",
8787
"typedoc": "^0.27.6",
8888
"typescript": "^5.7.3",
89-
"vitest": "^3.0.0"
89+
"vitest": "^3.0.4"
9090
}
9191
}

src/devices/contactsensor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
22
*
3-
* contactsensor.ts: homebridge-noip.
3+
* contactsensor.ts: @homebridge-plugins/homebridge-noip.
44
*/
5-
65
import type { CharacteristicValue, PlatformAccessory, Service } from 'homebridge'
76

87
import type { NoIPPlatform } from '../platform.js'
8+
import type { devicesConfig } from '../settings.js'
99

1010
import { Buffer } from 'node:buffer'
1111

1212
import { interval, throwError } from 'rxjs'
1313
import { skipWhile, timeout } from 'rxjs/operators'
1414
import { request } from 'undici'
1515

16-
import { type devicesConfig, noip } from '../settings.js'
16+
import { noip } from '../settings.js'
1717
import { deviceBase } from './device.js'
1818

1919
/**

src/devices/device.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { API, CharacteristicValue, HAP, Logging, PlatformAccessory, Service } from 'homebridge'
2-
31
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
42
*
5-
* device.ts: homebridge-noip.
3+
* device.ts: @homebridge-plugins/homebridge-noip.
64
*/
5+
import type { API, CharacteristicValue, HAP, Logging, PlatformAccessory, Service } from 'homebridge'
6+
77
import type { NoIPPlatform } from '../platform.js'
88
import type { devicesConfig, NoIPPlatformConfig } from '../settings.js'
99

src/homebridge-ui/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'node:fs'
22

33
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
44
*
5-
* server.ts: homebridge-noip.
5+
* server.ts: @homebridge-plugins/homebridge-noip.
66
*/
77
import { HomebridgePluginUiServer } from '@homebridge/plugin-ui-utils'
88

@@ -15,7 +15,7 @@ class PluginUiServer extends HomebridgePluginUiServer {
1515
*/
1616
this.onRequest('getCachedAccessories', () => {
1717
try {
18-
const plugin = 'homebridge-noip'
18+
const plugin = '@homebridge-plugins/homebridge-noip'
1919
const devicesToReturn = []
2020

2121
// The path and file of the cached accessories

src/index.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { API } from 'homebridge'
2+
3+
import { describe, expect, it, vi } from 'vitest'
4+
5+
import registerPlatform from './index.js'
6+
import { NoIPPlatform } from './platform.js'
7+
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js'
8+
9+
describe('registerPlatform', () => {
10+
it('should register the platform with homebridge', () => {
11+
const api = {
12+
registerPlatform: vi.fn(),
13+
} as unknown as API
14+
15+
registerPlatform(api)
16+
17+
expect(api.registerPlatform).toHaveBeenCalledWith(PLUGIN_NAME, PLATFORM_NAME, NoIPPlatform)
18+
})
19+
})

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* Copyright(C) 2021-2023, donavanbecker (https://github.com/donavanbecker). All rights reserved.
22
*
3-
* index.ts: homebridge-noip.
4-
*/import type { API } from 'homebridge'
3+
* index.ts: @homebridge-plugins/homebridge-noip.
4+
*/
5+
import type { API } from 'homebridge'
56

67
import { NoIPPlatform } from './platform.js'
78
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js'

src/platform.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
22
*
3-
* platform.ts: homebridge-noip.
3+
* platform.ts: @homebridge-plugins/homebridge-noip.
44
*/
55
import type { API, DynamicPlatformPlugin, HAP, Logging, PlatformAccessory } from 'homebridge'
66

@@ -174,6 +174,11 @@ export class NoIPPlatform implements DynamicPlatformPlugin {
174174
? await this.validateAndCleanDisplayName(device.configDeviceName, 'configDeviceName', device.userDefinedDeviceName)
175175
: await this.validateAndCleanDisplayName(hostname, 'hostname', hostname)
176176

177+
// Ensure displayName is not empty
178+
if (!existingAccessory.displayName) {
179+
existingAccessory.displayName = 'Unnamed Accessory'
180+
}
181+
177182
existingAccessory.context.serialNumber = device.ipv4or6 === 'ipv6' ? await this.publicIPv6(device) : await this.publicIPv4(device)
178183
existingAccessory.context.model = 'DUC'
179184
existingAccessory.context.version = await this.getVersion()
@@ -199,6 +204,12 @@ export class NoIPPlatform implements DynamicPlatformPlugin {
199204
accessory.displayName = device.configDeviceName
200205
? await this.validateAndCleanDisplayName(device.configDeviceName, 'configDeviceName', device.userDefinedDeviceName)
201206
: await this.validateAndCleanDisplayName(hostname, 'hostname', hostname)
207+
208+
// Ensure displayName is not empty
209+
if (!accessory.displayName) {
210+
accessory.displayName = 'Unnamed Accessory'
211+
}
212+
202213
accessory.context.serialNumber = device.ipv4or6 === 'ipv6' ? await this.publicIPv6(device) : await this.publicIPv4(device)
203214
accessory.context.model = 'DUC'
204215
accessory.context.version = await this.getVersion()

0 commit comments

Comments
 (0)