@martyndevries/xiaomi-miio 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @martyndevries/xiaomi-miio might be problematic. Click here for more details.

package/README.md CHANGED
@@ -16,6 +16,12 @@ This library focuses on the protocol and transport layer only:
16
16
  - Node.js 22+
17
17
  - npm 10+
18
18
 
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install @martyndevries/xiaomi-miio
23
+ ```
24
+
19
25
  ## Background and references
20
26
 
21
27
  - miIO binary protocol notes: https://github.com/OpenMiHome/mihome-binary-protocol
@@ -62,12 +68,20 @@ npm run example:discovery
62
68
 
63
69
  This prints each responding device with its IP address, device ID, and stamp. Tokens are optional.
64
70
 
71
+ DNS hostname lookup CLI (reverse lookup by IP address):
72
+
73
+ ```bash
74
+ npm run example:hostname
75
+ ```
76
+
77
+ You will be prompted for the IP address and optional port.
78
+
65
79
  ## Minimal usage (TypeScript)
66
80
 
67
81
  This example connects to a known device IP and token, turns it on, and sets the speed level.
68
82
 
69
83
  ```ts
70
- import { MiioDevice, MiioProtocol } from 'xiaomi-miio';
84
+ import { MiioDevice, MiioProtocol } from '@martyndevries/xiaomi-miio';
71
85
 
72
86
  const device = new MiioDevice({
73
87
  address: '192.168.1.50',
@@ -89,7 +103,7 @@ device.destroy();
89
103
  This example broadcasts a discovery packet and prints all devices that respond.
90
104
 
91
105
  ```ts
92
- import { discoverMiioDevices } from 'xiaomi-miio';
106
+ import { discoverMiioDevices } from '@martyndevries/xiaomi-miio';
93
107
 
94
108
  const devices = await discoverMiioDevices({ timeout: 3000, includeToken: false });
95
109
  for (const device of devices) {
package/dist/device.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type DnsLookupOptions, type DnsLookupResult } from './dns.js';
1
2
  import { MiioTransport, type TransportOptions } from './protocol/transport.js';
2
3
  export interface DeviceOptions extends TransportOptions {
3
4
  /** Device model identifier (e.g. "yeelink.light.bslamp2"). */
@@ -25,6 +26,8 @@ export declare class MiioDevice {
25
26
  call(method: string, params?: unknown[]): Promise<unknown>;
26
27
  /** Query device properties. */
27
28
  getProperties(props: string[]): Promise<unknown>;
29
+ /** Resolve the device hostname via reverse DNS lookup. */
30
+ lookupHostname(options?: DnsLookupOptions): Promise<DnsLookupResult>;
28
31
  /** Disconnect and clean up resources. */
29
32
  destroy(): void;
30
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,aAAa;IAMlC,yDAAyD;IACnD,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IASpC,+BAA+B;IACzB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIpE,+BAA+B;IACzB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,yCAAyC;IACzC,OAAO,IAAI,IAAI;CAGhB"}
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,aAAa;IAMlC,yDAAyD;IACnD,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IASpC,+BAA+B;IACzB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIpE,+BAA+B;IACzB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,0DAA0D;IACpD,cAAc,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI9E,yCAAyC;IACzC,OAAO,IAAI,IAAI;CAGhB"}
package/dist/device.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { lookupDeviceHostname } from './dns.js';
1
2
  import { MiioTransport } from './protocol/transport.js';
2
3
  /**
3
4
  * Base class for miIO devices.
@@ -31,6 +32,10 @@ export class MiioDevice {
31
32
  async getProperties(props) {
32
33
  return this.call('get_prop', props);
33
34
  }
35
+ /** Resolve the device hostname via reverse DNS lookup. */
36
+ async lookupHostname(options = {}) {
37
+ return lookupDeviceHostname(this.address, options);
38
+ }
34
39
  /** Disconnect and clean up resources. */
35
40
  destroy() {
36
41
  this.transport.destroy();
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyB,MAAM,yBAAyB,CAAC;AAa/E;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IACF,SAAS,CAAgB;IACnC,KAAK,CAAsB;IAC3B,OAAO,CAAS;IAEzB,YAAY,OAAsB;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACjC,CAAC;IAED,yDAAyD;IACzD,KAAK,CAAC,OAAO;QACX,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QACtD,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ;YACR,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,SAAoB,EAAE;QAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,aAAa,CAAC,KAAe;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,yCAAyC;IACzC,OAAO;QACL,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF"}
1
+ {"version":3,"file":"device.js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DED
@@ -0,0 +1,36 @@
1
+ /** Result from a DNS hostname lookup. */
2
+ export interface DnsLookupResult {
3
+ /** IP address that was looked up. */
4
+ address: string;
5
+ /** Port used for the lookup. */
6
+ port: number;
7
+ /** Resolved hostname, or null if lookup failed. */
8
+ hostname: string | null;
9
+ /** Resolved service name, or null if lookup failed. */
10
+ service: string | null;
11
+ /** Error details if lookup failed. */
12
+ error: DnsLookupError | null;
13
+ }
14
+ /** Function signature for a DNS lookup implementation. */
15
+ export type DnsLookupService = (address: string, port: number) => Promise<{
16
+ hostname: string;
17
+ service: string;
18
+ }>;
19
+ /** Options for DNS hostname lookup. */
20
+ export interface DnsLookupOptions {
21
+ /** Port to use for reverse DNS lookup. Default: 54321 */
22
+ port?: number | undefined;
23
+ /** Optional lookupService implementation (for testing). */
24
+ lookupService?: DnsLookupService | undefined;
25
+ }
26
+ /** Error returned when DNS hostname lookup fails. */
27
+ export declare class DnsLookupError extends Error {
28
+ readonly address: string;
29
+ readonly port: number;
30
+ constructor(address: string, port: number, cause: unknown);
31
+ }
32
+ /**
33
+ * Resolve the device hostname via reverse DNS lookup.
34
+ */
35
+ export declare function lookupDeviceHostname(address: string, options?: DnsLookupOptions): Promise<DnsLookupResult>;
36
+ //# sourceMappingURL=dns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns.d.ts","sourceRoot":"","sources":["../src/dns.ts"],"names":[],"mappings":"AAIA,yCAAyC;AACzC,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uDAAuD;IACvD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sCAAsC;IACtC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CAC9B;AAED,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjH,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,2DAA2D;IAC3D,aAAa,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC9C;AAED,qDAAqD;AACrD,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAM1D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAgB1B"}
package/dist/dns.js ADDED
@@ -0,0 +1,34 @@
1
+ import { lookupService as nodeLookupService } from 'node:dns/promises';
2
+ const DEFAULT_PORT = 54321;
3
+ /** Error returned when DNS hostname lookup fails. */
4
+ export class DnsLookupError extends Error {
5
+ address;
6
+ port;
7
+ constructor(address, port, cause) {
8
+ super(`DNS lookup failed for ${address}:${port}`, { cause });
9
+ this.name = 'DnsLookupError';
10
+ this.address = address;
11
+ this.port = port;
12
+ }
13
+ }
14
+ /**
15
+ * Resolve the device hostname via reverse DNS lookup.
16
+ */
17
+ export async function lookupDeviceHostname(address, options = {}) {
18
+ const port = options.port ?? DEFAULT_PORT;
19
+ const lookupService = options.lookupService ?? nodeLookupService;
20
+ try {
21
+ const { hostname, service } = await lookupService(address, port);
22
+ return { address, port, hostname, service, error: null };
23
+ }
24
+ catch (err) {
25
+ return {
26
+ address,
27
+ port,
28
+ hostname: null,
29
+ service: null,
30
+ error: new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SAC9C,CAAC;IACJ,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,4 +4,5 @@ export { MiioCrypto } from './protocol/crypto.js';
4
4
  export { MiioTransport, type TransportOptions } from './protocol/transport.js';
5
5
  export { discoverMiioDevices, type DiscoveryOptions, type MiioDiscoveredDevice } from './protocol/discovery.js';
6
6
  export { MiioDevice, type DeviceInfo, type DeviceOptions } from './device.js';
7
+ export { lookupDeviceHostname, DnsLookupError, type DnsLookupOptions, type DnsLookupResult, type DnsLookupService, } from './dns.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -4,4 +4,5 @@ export { MiioCrypto } from './protocol/crypto.js';
4
4
  export { MiioTransport } from './protocol/transport.js';
5
5
  export { discoverMiioDevices } from './protocol/discovery.js';
6
6
  export { MiioDevice } from './device.js';
7
+ export { lookupDeviceHostname, DnsLookupError, } from './dns.js';
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAyB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAoD,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,UAAU,EAAuC,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAyB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAoD,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,UAAU,EAAuC,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,cAAc,GAIf,MAAM,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@martyndevries/xiaomi-miio",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Zero-dependency Node.js library for Xiaomi miIO protocol",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,6 +26,7 @@
26
26
  "build:examples": "tsc -p tsconfig.examples.json",
27
27
  "example:bedlamp2": "tsc -p tsconfig.examples.json && node dist-examples/examples/bedlamp2-cli.js",
28
28
  "example:discovery": "tsc -p tsconfig.examples.json && node dist-examples/examples/discovery-cli.js",
29
+ "example:hostname": "tsc -p tsconfig.examples.json && node dist-examples/examples/hostname-cli.js",
29
30
  "clean": "rm -rf dist dist-test dist-examples",
30
31
  "prepublishOnly": "npm run clean && npm run build"
31
32
  },
@@ -40,7 +41,7 @@
40
41
  },
41
42
  "repository": {
42
43
  "type": "git",
43
- "url": "https://github.com/mvdevries/xiaomi-miio.git"
44
+ "url": "git+https://github.com/mvdevries/xiaomi-miio.git"
44
45
  },
45
46
  "publishConfig": {
46
47
  "registry": "https://registry.npmjs.org",