hm2mqtt 3.4.2 → 3.4.3
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.
- package/package.json +1 -1
- package/scripts/addon-api.js +6 -3
package/package.json
CHANGED
package/scripts/addon-api.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import Rega from 'homematic-rega';
|
|
19
19
|
import {discover} from 'mqtt-interfaces-core';
|
|
20
|
-
import {probeInterfaces, INTERFACE_NAMES} from '../lib/interfaces.js';
|
|
20
|
+
import {probeInterfaces, detectLocal, INTERFACE_NAMES} from '../lib/interfaces.js';
|
|
21
21
|
import {discoveryHint, interfacesOf} from '../lib/discovery.js';
|
|
22
22
|
import {compileTemplate, DEFAULT_ITEM_TEMPLATE} from '../lib/topics.js';
|
|
23
23
|
|
|
@@ -84,8 +84,11 @@ const commands = {
|
|
|
84
84
|
|
|
85
85
|
async probe() {
|
|
86
86
|
const host = String(args.host || '127.0.0.1');
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
// on the CCU the addon talks to the interface processes directly, so probe those ports -
|
|
88
|
+
// the proxy ports may answer as well, but they are not what will be connected to
|
|
89
|
+
const local = args.local === undefined ? await detectLocal(host) : args.local !== 'false';
|
|
90
|
+
const found = await probeInterfaces(host, {tls: Boolean(args.tls), local, timeout: 2000});
|
|
91
|
+
return {host, local, interfaces: found, known: INTERFACE_NAMES};
|
|
89
92
|
},
|
|
90
93
|
|
|
91
94
|
async 'mqtt-test'() {
|