node-red-contrib-mobius-flow-base 3.0.0-rc.4 → 3.0.0-rc.6

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/README.md CHANGED
@@ -1,19 +1,47 @@
1
1
  # node-red-contrib-mobius-flow-base
2
2
 
3
- Copyright 2016 [iaconnects](http://www.iaconnects.co.uk).
3
+ Copyright 2023 [MobiusFlow](https://mobiusflow.com/).
4
4
 
5
- [Node-RED](http://nodered.org) nodes to interact with MOBiUSFlow.
6
-
7
- This module currently requires access to the iaconnects private NPM repository.
5
+ [Node-RED](http://nodered.org) nodes to interact with MobiusFlow.
8
6
 
9
7
  ## Nodes
10
8
 
11
- ### Service Config Node
12
- All nodes require a connection to a MOBiUS hub. The `mobius service` node takes a service ID as a property and creates a shared connection to the hub. All other nodes use this shared connection.
9
+ ### Connection Config Node
10
+ All nodes require a connection to a MobiusFlow Engine. The `mobius connection` config nodes connectes to the MobiusFlow Engine API via http / https
13
11
 
14
12
  ### Set Resource Node
15
13
  Sets the value of, or clears, the specified priority of resource.
16
14
 
15
+ ### Set Multi-Resource Node
16
+ Sets the value of multiple resources on a given object at once
17
+
18
+ ### Send BCMD Node
19
+ Sends a MobiusFlow broadcast command
20
+
21
+ ### Send DCMD Node
22
+ Send a MobiusFlow direct command to a specified MobiusFlow service
23
+
24
+ ### Get Multi-Resource Node
25
+ Get multiple resource at once
26
+
27
+ ### Get Multi-Object Node
28
+ Get mutliple objects at once
29
+
30
+ ### MobiusFlow Inject Node
31
+ Subscribe to change of value on a defined set of objects. Change events injected in MobiusFlow format.
32
+
33
+ ### Filter Object By Rid Value Node
34
+ Return a filtered list of objects based on a defined filtering function and resource.
35
+
36
+ ### Discover Node
37
+ Discover live MobiusFlow: Hubs, Services, Profiles, Objects and Resources
38
+
39
+ ### Discover Object List
40
+ Discover live objects from a pre-defined set of potentially wildcarded URIs
41
+
42
+ ### Change Admin Password
43
+ Change the password of the administator account of the MobiusFlow Engine
44
+
17
45
  ### Get Resource Node
18
46
  Reads the current `pv` or present value of a resource.
19
47
 
@@ -27,4 +55,5 @@ Clears the specified priority of resource.
27
55
  Subscribe to change of value events for an object
28
56
 
29
57
  ### Resource COV Node
30
- Subscribe to change of value events for a resource
58
+ Subscribe to change of value events for a resource
59
+
@@ -1,21 +1,52 @@
1
1
  import { AxiosInstance } from 'axios';
2
- export declare const discover: (apiClient: AxiosInstance, uri: string, callback: Function) => Promise<void>;
3
- export declare const writeResource: (apiClient: AxiosInstance, uri: string, value: number | string | boolean, priority: number, callback: Function) => Promise<void>;
4
- export declare const writeMultiResource: (apiClient: AxiosInstance, uri: string, updates: {
5
- r: string;
6
- p: number;
7
- v: number | string | boolean;
8
- }[], callback: Function) => Promise<void>;
9
- export declare const clearResource: (apiClient: AxiosInstance, uri: string, priority: number, callback: Function) => Promise<void>;
10
- export declare const readResource: (apiClient: AxiosInstance, uri: string, callback: Function) => Promise<void>;
11
- export declare const readObject: (apiClient: AxiosInstance, uri: string, callback: Function) => Promise<void>;
12
- export declare const sendBroadcastCommand: (apiClient: AxiosInstance, cid: string, commandData: any) => Promise<void>;
13
- export declare const sendDirectCommand: (apiClient: AxiosInstance, uri: string, cid: string, commandData: any, timeout: number, callback: Function) => Promise<void>;
14
- export declare const getServiceConfig: (apiClient: AxiosInstance, uri: string, callback: Function) => Promise<void>;
15
- export declare const updateObject: (apiClient: AxiosInstance, uri: string, config: any, callback: Function) => Promise<void>;
16
- export declare const filterObjectsByRIDValue: (apiClient: AxiosInstance, uri: string, pids: string[], rid: string, limit: number, func: (v: string | number | boolean) => boolean, callback: Function) => Promise<any>;
17
- export declare const getHubId: (apiClient: AxiosInstance, callback: Function) => Promise<void>;
18
- export declare const getNodeConfig: (apiClient: AxiosInstance, uri: string, callback: Function) => Promise<void>;
19
- export declare const changeAdminPassword: (apiClient: AxiosInstance, password: string, callback: Function) => Promise<void>;
20
- export declare const getNodeConfigTree: (apiClient: AxiosInstance, hid: string, callback: Function) => Promise<void>;
21
- export declare const getProfileByPid: (apiClient: AxiosInstance, hid: string, pid: string, callback: Function) => Promise<void>;
2
+ interface EngineApiCallsInterace {
3
+ setApiClient: (apiClient: AxiosInstance) => void;
4
+ discover: (uri: string, callback: Function) => void;
5
+ writeResource: (uri: string, value: number | string | boolean, priority: number, callback: Function) => void;
6
+ writeMultiResource: (uri: string, updates: {
7
+ r: string;
8
+ p: number;
9
+ v: number | string | boolean;
10
+ }[], callback: Function) => void;
11
+ clearResource: (uri: string, priority: number, callback: Function) => void;
12
+ readResource: (uri: string, callback: Function) => void;
13
+ readObject: (uri: string, callback: Function) => void;
14
+ sendBroadcastCommand: (cid: string, commandData: any) => void;
15
+ sendDirectCommand: (uri: string, cid: string, commandData: any, timeout: number, callback: Function) => void;
16
+ getServiceConfig: (uri: string, callback: Function) => void;
17
+ updateObject: (uri: string, config: any, callback: Function) => void;
18
+ filterObjectsByRIDValue: (uri: string, pids: string[], rid: string, limit: number, func: (v: string | number | boolean) => boolean, callback: Function) => void;
19
+ getHubId: (callback: Function) => void;
20
+ getNodeConfig: (uri: string, callback: Function) => void;
21
+ changeAdminPassword: (password: string, callback: Function) => void;
22
+ getNodeConfigTree: (hid: string, callback: Function) => void;
23
+ getProfileByPid: (hid: string, pid: string, callback: Function) => void;
24
+ getAllObjectProfiles: (hid: string, callback: Function) => void;
25
+ }
26
+ export declare class EngineApiCalls implements EngineApiCallsInterace {
27
+ private apiClient;
28
+ constructor();
29
+ setApiClient: (apiClient: AxiosInstance) => void;
30
+ discover: (uri: string, callback: Function) => Promise<void>;
31
+ writeResource: (uri: string, value: number | string | boolean, priority: number, callback: Function) => Promise<void>;
32
+ writeMultiResource: (uri: string, updates: {
33
+ r: string;
34
+ p: number;
35
+ v: number | string | boolean;
36
+ }[], callback: Function) => Promise<void>;
37
+ clearResource: (uri: string, priority: number, callback: Function) => Promise<void>;
38
+ readResource: (uri: string, callback: Function) => Promise<void>;
39
+ readObject: (uri: string, callback: Function) => Promise<void>;
40
+ sendBroadcastCommand: (cid: string, commandData: any) => Promise<void>;
41
+ sendDirectCommand: (uri: string, cid: string, commandData: any, timeout: number, callback: Function) => Promise<void>;
42
+ getServiceConfig: (uri: string, callback: Function) => Promise<void>;
43
+ updateObject: (uri: string, config: any, callback: Function) => Promise<void>;
44
+ filterObjectsByRIDValue: (uri: string, pids: string[], rid: string, limit: number, func: (v: string | number | boolean) => boolean, callback: Function) => Promise<any>;
45
+ getHubId: (callback: Function) => Promise<void>;
46
+ getNodeConfig: (uri: string, callback: Function) => Promise<void>;
47
+ changeAdminPassword: (password: string, callback: Function) => Promise<void>;
48
+ getNodeConfigTree: (hid: string, callback: Function) => Promise<void>;
49
+ getProfileByPid: (hid: string, pid: string, callback: Function) => Promise<void>;
50
+ getAllObjectProfiles: (hid: string, callback: Function) => Promise<void>;
51
+ }
52
+ export {};