The gateways module is the central API of the Weble IoT Universal Gateway. It exposes everything needed to read and write values, manage gateway instances, addresses, and routes, listen to live events, and call driver-specific methods.
It is loaded with:
peer('supervision').require('gateways', function(err, gateways){
// ... gateways.<method>(...)
})
Every method follows the standard Node.js convention: the last argument is a callback(err, ...results).
Most methods accept an address key as their first argument. An address key can be any of:
| Form | Example | Notes |
|---|---|---|
| Numeric id | 23055 |
The internal SQL id of the address. Fastest. |
| Alias | 'tempLivingRoom' |
The alias defined on the address. |
| Name | '4/7/25' |
The protocol-specific address name (KNX group address, Modbus register, BACnet object id, ...). Unique within its gateway. When two gateways use the same name, prefix it with the gateway name or id: myGateway¬%M1. |
| Object | {id: 23055} |
An object with id, or with name and gateway_id (gateway also accepts the gateway name) — typically an address object you got from another call. |
The same flexibility applies to gateway keys: numeric id, name, or {id} object.
The resolution rules (view names, names shared by several gateways, several aliases) are described in Addresses › Address keys.
getGateways, getAddresses and getAddressesByGateway accept a filter that runs on the gateway: only matching objects are transferred.
Declarative filter (recommended: plain data, allowed for every role):
// all Modbus gateways
gateways.getGateways({ driver: 'modbus' }, function(err, gws){ ... })
// all addresses of the Modbus gateways
gateways.getAddresses({ 'gateway.driver': 'modbus' }, function(err, addrs){ ... })
// addresses of gateway 12 whose datatype is number or string
gateways.getAddressesByGateway({ gateway: 12, filter: { 'json.datatype': ['number', 'string'] } }, function(err, list){ ... })
Each key is a dotted path and every key must match. An array means "one of these values"; a RegExp tests the field. A plain string matches when the field is equal to it or is a part of it ({ name: '4/7/25' } also matches an address named 4/7): put the value in an array ({ name: ['4/7/25'] }) for an exact match. Use paths that exist on every object. Pass null as gateway to getAddressesByGateway to get the addresses of all gateways.
Function filter: function(item){ return … }. The function is sent as source code and runs on the gateway: it cannot use the variables of your program, and a restricted role needs the Send executable code right.
writeValue(addressKey, value, callback)Write a decoded value to the address. The driver translates the value into the protocol-specific representation and emits it.
gateways.writeValue('4/7/25', 1, function(err){
if(err) console.error('write failed', err)
})
gateways.writeValue('tempSetpoint', 21.5, function(err){ ... })
gateways.writeValue(23055, true, function(err){ ... })
| Param | Type | Description |
|---|---|---|
addressKey |
key | Address to write to |
value |
number / string / boolean / object | Decoded value, must match what the driver accepts (see acceptsWrite) |
callback |
function(err) |
Called once the write has been acknowledged by the driver |
The callback is invoked after the driver confirms the write — for protocols with no acknowledgement (e.g. KNX broadcast), it is invoked as soon as the frame has been queued.
REST equivalent:
POST /peers/supervision/gateways/writeValue— see REST peers dispatcher.
readValue(addressKey, callback)Trigger an active read request to the driver. Use this when you want fresh data and not just the last cached value.
gateways.readValue('%M1', function(err, value){
if(err) return console.error(err)
console.log('M1 =', value)
})
The callback receives what the driver returns, usually (err, value). It fails with timeout after about 60 s, or with read: gateway not connected <id>.
REST equivalent:
GET /peers/supervision/gateways/readValue?args=...
getLastValue(addressKey, callback)Return the last cached value without sending a read request to the driver. Much faster than readValue and the recommended way to query state for dashboards, logic conditions, etc.
gateways.getLastValue('4/7/25', function(err, value, value_string, value_date){
console.log(value)
})
// Batch lookup with an array
gateways.getLastValue(['4/7/25', '4/7/26', 'tempLiving'], function(err, values, value_strings, value_dates){
console.log(values) // [1, 0, 21.5]
})
When the address does not exist, err is set. When no value has been received yet, err is null and value is undefined.
REST equivalent:
GET /peers/supervision/gateways/getLastValue?args=...
getLastStatus(addressKey, callback)Same as getLastValue but returns the address status instead of the value: online, offline, pending, or a driver error starting with ! such as !timeout. Useful for health monitoring.
gateways.getLastStatus('4/7/25', function(err, status, status_date){ ... })
acceptsRead(gatewayKey, addressName, callback)Check whether a given address is readable on a given gateway. Returns a boolean in the callback. addressName is the name of the address on that gateway (e.g. '4/7/25'), not an id or alias. Returns false when the gateway is not connected.
acceptsWrite(gatewayKey, addressName, value, callback)Check whether a given value can be written to an address before actually doing it. Returns a boolean in the callback. Use this for input validation in user interfaces. As for acceptsRead, addressName is the name of the address on that gateway, and the result is false when the gateway is not connected.
decodeValue(addressKey, value_string, callback) / encodeValue(addressKey, value, callback)Convert between string and decoded representations of a value, using the driver's encoder/decoder.
decodeValue takes the driver's encoded string, in the format of the address value_string:
gateways.decodeValue('4/7/25', valueString, function(err, decoded){ ... }) // valueString: same format as value_string
Drivers that only have a decoder (KNX, MQTT, DALI…) answer encodeValue with unidirectional encoding.
The gateways module emits events whenever an address value changes. The standard pattern:
function onValue(value, value_string, value_date){
console.log('changed:', value)
}
// Listen to one specific address
gateways.on('newValue 4/7/25', onValue)
// Listen to ALL addresses (use sparingly — high traffic). The address id comes first.
gateways.on('newValue', function(id, value, value_string, value_date){ ... })
// Stop listening
gateways.removeListener('newValue 4/7/25', onValue)
Other lifecycle events emitted by the module:
| Event | Arguments | Description |
|---|---|---|
newValue |
(id, value, value_string, value_date) |
Address value changed (any address) |
newValue <key> |
(value, value_string, value_date) |
New value of this address. <key> is the id, the name, or <gateway name or id>¬<name>. An alias works only when the Alias view is started on the gateway. With the name, the address id comes as 4th argument. |
newValueLog |
(id, value, value_string, value_date) |
The value must be logged, according to the log setting of the address |
newStatus / newStatus <key> |
(id, status, status_date) / (status, status_date) |
Status of an address changed (online, offline, pending…) |
gatewayState <gatewayId> |
(state) |
Gateway state changed: 'connecting', 'connected' or 'disconnected' |
addressInserted |
(address) |
New address created |
addressUpdated |
(newAddress, oldAddress) |
Address modified |
addressDeleted |
(address) |
Address removed |
gatewayInserted / gatewayDeleted |
(gateway) |
Gateway lifecycle |
gatewayUpdated |
(newGateway, oldGateway) |
Gateway modified |
routeInserted / routeUpdated / routeDeleted |
(route, index) |
Route lifecycle |
routeMoved |
(route, oldIndex, newIndex) |
Route moved in the table |
pendingRoutesWriteCount |
(count) |
Number of route writes waiting; a growing number means the gateway is overloaded |
routingFunctionInserted / routingFunctionUpdated / routingFunctionRenamed / routingFunctionDeleted |
Routing function lifecycle | |
routeStatus |
(routeId, status) |
Route status changed: pending, active, inactive, or !<message> on error |
routeWrite |
(routeId, sourceId, destinationId, origin, value) |
A route sent a value to a driver |
routeTrace / routeTrace <routeId> |
(step) |
Execution steps of the routes. Sent only while someone listens. |
isRoutingPaused / isRoutingStarted |
(state) |
Routing engine state |
value_date is a timestamp in milliseconds.
Always pair
on()withremoveListener()when your code path is no longer interested in the event. See the memory leak rule.
getGateways(filter, callback)Return all gateway instances as an object keyed by gateway id. The optional filter runs on the gateway: see Filters.
gateways.getGateways(function(err, gws){
Object.keys(gws).forEach(function(id){
console.log(id, gws[id].name, gws[id].driver)
})
})
// Only Modbus gateways
gateways.getGateways({ driver: 'modbus' }, function(err, gws){ ... })
REST equivalent:
GET /peers/supervision/gateways/getGateways
getGateway(gatewayKey, callback)Return a single gateway by id, name, or object.
gateways.getGateway(12, function(err, gw){
console.log(gw.name, gw.driver, gw.json)
})
REST equivalent:
POST /peers/supervision/gateways/getGatewaywith the body{"args":[12]}
insertGateway(gateway, callback) / updateGateway(gateway, callback) / deleteGateway(gatewayKey, callback)Create, modify, or delete a gateway instance.
gateways.insertGateway({
name : 'Boiler Modbus',
driver : 'modbus',
description : 'TCP gateway to the basement boiler',
json : {
type : 'tcpMaster',
host : '192.168.1.50',
port : 502,
unitId : 1
}
}, function(err, newId){
console.log('created gateway id =', newId)
})
The structure of the json field depends on the driver — see the corresponding driver page for the expected schema, or copy the json of an existing gateway of the same driver.
The fields of
jsondepend on the driver. The safest way is to copy thejsonof an existing address (or gateway) of the same driver and change only what you need: a field with a wrong name is silently ignored. AddvalidateJson: trueto the object to have the driver check thejson(available for KNX, Modbus, BACnet, MQTT, OPC UA and a few other drivers; without effect for the others): errors refuse the insert, warnings come as the third argument of the callback.
insertGateway: driver is the driver key (modbus, knx, virtual…), not the label shown in the interface (the Internal gateway is virtual). An unknown key is refused; when you give the label of the driver list, the error message gives the key. All keys are listed in the Driver reference.
updateGateway merges the fields you send into the stored gateway: send { id, …only the fields to change }. Accepted fields: name, description, driver, active, json, private_json, cluster. The json object is merged too.
If json, active or name changes, the driver restarts by itself to apply the new configuration (short disconnection). Do not call restartGateway afterwards. To save without restarting an active gateway, add doNotRestartDriver: true.
gateways.updateGateway({ id: 12, json: { host: '192.168.1.51' } }, function(err){
if(err) console.error(err)
})
deleteGateway also deletes all the addresses of the gateway.
startGateway(key, cb) / stopGateway(key, cb) / restartGateway(key, cb)Start or stop the driver process of one gateway. startGateway and stopGateway also save the Active setting: a stopped gateway stays stopped after a reboot. startGateway on a running gateway restarts it; restartGateway stops it, then starts it.
gateways.restartGateway(12, function(err){
if(err) console.error('restart failed', err)
})
testGateway(gatewayKey, callback)Run the driver's built-in connectivity test against the gateway and return the result. Only the KNX, Modbus, SMTP and IEC 60870-5-104 drivers implement this test; other drivers answer driver cannot test gateway <key>. The saved configuration is tested; the driver is not stopped.
getCrashLog(gatewayKey, callback) / getStats(callback)Retrieve the last crash dump of a gateway's driver, or the state counters of all gateways. getStats(callback) returns, for each gateway id, how many times it went connecting, connected and disconnected since the supervision last started, with the date of the last occurrence of each:
{ "12": { connecting: 3, connecting_date: 1732450000000, connected: 3, connected_date: …, disconnected: 2, disconnected_date: … } }
A high disconnected count with a recent date means the gateway is in a reconnection loop; pair it with getCrashLog to know whether the driver crashed.
getGatewayLogLevel(gatewayKey, callback) / setGatewayLogLevel(gatewayKey, level, callback) / getDriverLogs(gatewayKey, options, callback)Read or change the log level of a driver while it runs, without a restart. Levels are error, warn, info and log. getDriverLogs returns the recent logs of the driver.
getAddresses(filter, callback)Return all addresses as an object keyed by address id. The optional filter runs on the gateway: see Filters.
gateways.getAddresses(function(err, addrs){
console.log(Object.keys(addrs).length, 'addresses total')
})
// Only the addresses of the Modbus gateways
gateways.getAddresses({ 'gateway.driver': 'modbus' }, function(err, addrs){ ... })
REST equivalent:
GET /peers/supervision/gateways/getAddresses
getAddressesByGateway(gatewayKey, callback)Return only the addresses of one gateway, as an array. More efficient than getAddresses with a filter for large databases — the result is streamed in chunks.
gateways.getAddressesByGateway(12, function(err, addrs){
addrs.forEach(function(a){ console.log(a.name, a.alias) })
})
You can also pass an object to add a secondary filter: {gateway: 12, filter: {...}} (see Filters). Pass null as gateway to get the addresses of all gateways.
getAddress(addressKey, callback)Return a single address (or array of addresses) by key.
gateways.getAddress('4/7/25', function(err, addr){
console.log(addr.id, addr.name, addr.alias, addr.value)
})
gateways.getAddress(['4/7/25', '4/7/26'], function(err, addrs){ ... })
insertAddress(address, callback)Create one or more addresses. Pass a single object or an array.
gateways.insertAddress({
name : '4/7/25',
alias : 'tempLivingRoom',
description : 'Living room temperature',
gateway_id : 12,
json : {
datatype : '9.xxx 2 bytes float (16 bits)' // exact label, listed in getSchema('knx') → schema.datatypes
}
}, function(err, newId){
console.log('inserted address id =', newId)
})
The json field structure is driver-specific: a field with a wrong name is silently ignored (see the note in 4.3 about validateJson). To insert many addresses at once, prefer importAddresses.
You can also pass onduplicatekey: true to update the address if one with the same name already exists on the gateway.
updateAddress(address, callback) / replaceAddress(address, callback)updateAddress changes only the fields you send. Identify the address with id (or name + gateway_id). Nested objects such as json are merged:
gateways.updateAddress({ id: 23055, log: 'always', json: { unit: '°C' } }, cb) // other json fields are kept
gateways.updateAddress({ id: 23055, json: { __replace__: { unit: '°C' } } }, cb) // json becomes exactly { unit: '°C' }
gateways.updateAddress({ id: 23055, alias: '__delete__' }, cb) // removes the alias
Pass an array to update several addresses: if one of them is refused, none is updated. A value in the object is written to the device when the gateway is connected.
replaceAddress and importAddresses replace the whole record of an existing address (matched by id, or by name on the gateway): fields you leave out are cleared. Unknown addresses are inserted.
importAddresses(addresses, callback)Bulk-import addresses with throttling. Designed for thousands of addresses without blocking the gateway. The callback is invoked multiple times: once with the progress ratio (0..1) for each chunk, and finally with err = 'end'. Addresses are sent by blocks of 100. With 100 addresses or fewer, the callback is only called once, with 'end'.
gateways.importAddresses(bigArray, function(err, progress){
if(err === 'end') return console.log('done')
if(err) return console.error(err)
console.log('progress', Math.round(progress * 100), '%')
})
deleteAddress(addressKey, callback)Definitively remove an address (or array of addresses). The callback returns an error if any of them is not found — in batch mode, none is deleted if at least one key is invalid.
A route binds a source address to one or more destination addresses, optionally through a transformation function. Routes are the heart of the gateway's protocol-translation engine.
getRoutes(callback)Return all routes as an array.
gateways.getRoutes(function(err, routes){
routes.forEach(function(r){ console.log(r.id, r.source.address, '→', r.destination.address) })
})
getRoute(routeIds, callback)Return a single route by id, or an array of routes.
insertRoute(route, index, callback)Insert a new route at the given position (or at the end if index is omitted).
gateways.insertRoute({
name : 'KNX to Modbus',
source : { address : '4/7/25' },
destination : { address : '%M1' },
direction : 'right',
active : true
}, function(err, newId){
console.log('inserted route', newId)
})
You can also pass an array of route objects to insert multiple at once.
updateRoute(route, callback) / replaceRoute(routes, callback) / deleteRoute(routeKey, callback)updateRoute replaces the stored route with the object you send. Read the route, change it, and send the complete object back:
gateways.getRoute(routeId, function(err, route){
route.active = false
gateways.updateRoute(route, function(err){
if(err) console.error(err) // 'no changes' if nothing differs
})
})
A route without source or destination is refused. Any other field you leave out (transform, disableDelay, retry…) is removed.
replaceRoute deletes the routes that have the same id and inserts them again at the end of the routing table; use moveRoute to put them back in place. Route ids are UUID strings.
deleteRoute accepts a position, a route id, a route object or an array of them.
moveRoute(routeKey, index, callback)Reorder a route by moving it to a different position in the global routing table.
refreshRoute(routeIds, callback)Re-evaluate a route immediately — useful after changing address metadata that affects routing.
pauseRoutes(callback) / resumeRoutes(callback) / isRoutingPaused(callback)Temporarily suspend the routing engine without unloading routes. Use this for maintenance windows or when running bulk operations that you don't want to trigger downstream effects.
gateways.pauseRoutes(function(){
// do something heavy without triggering routes
gateways.resumeRoutes(function(){ console.log('routing resumed') })
})
startRoutes(callback) / stopRoutes(callback) / isRoutingStarted(callback)Fully start or stop the routing engine. Unlike pause/resume, this unloads route definitions from memory and writes the new state to disk (routingActive flag). Used at boot and during firmware upgrades.
Routing functions are JavaScript snippets you can attach to a route to transform values in transit (e.g. multiply by 10, convert units, dispatch based on the value).
| Method | Description |
|---|---|
getRoutingFunctions(callback) |
List all defined routing functions |
insertRoutingFunction(fundef, callback) |
Add a new routing function |
updateRoutingFunction(fundef, callback) |
Modify a routing function |
replaceRoutingFunction(fundef, callback) |
Upsert |
renameRoutingFunction(oldname, newname, callback) |
Rename and update all routes that reference it |
deleteRoutingFunction(fundefname, callback) |
Remove a routing function |
matchingRoutingFunctions(type, functionsFlat) |
Return the names of the functions whose returns type fits a data type (number, string, boolean, …) |
A fundef object looks like:
{
functionPath : 'utils.multiplyBy10', // dot-separated JavaScript names
script : 'function(value){ return value * 10 }', // the code, as a string
description : 'Multiply by 10',
returns : 'number' // optional, used by matchingRoutingFunctions
}
Call it by name in a route transform: source : { address : '4/7/25', value : 'utils.multiplyBy10(v)' }.
Errors: name conflict (the name exists), invalid name, missing script code.
getRoutesGraph(callback) / getRoutesStatus(callback) / getRouteStatus(routeId, callback)Inspect the runtime routing graph (which sources are wired to which destinations) and the status of the routes. getRoutesStatus returns the route ids grouped by status: { active: [...], inactive: [...], pending: [...] }. getRouteStatus(routeId, callback) calls back with (err, status, error), where error can be { message, date } when the route is in error (a failing destination function or an invalid configuration), and null otherwise.
getSchema(driverName, callback)Returns the driver definition used by the web interface: display name, category, datatypes, help texts and the code of its forms. It is not a JSON Schema. To know which json fields a gateway or an address needs, see the driver page, or copy the json of an existing gateway or address of the same driver.
gateways.getSchema('modbus', function(err, schema){
console.log(schema.name, schema.category, schema.datatypes)
})
getSchemas(callback) / getSchemasName(callback) / getSchemasStructure(callback)Return all driver schemas, just the names, or a structural overview.
requireDriver(driverName, callback)Returns the functions and values exported by the driver module, shared by all gateways of that driver — for example its address patterns:
gateways.requireDriver('knx', function(err, knx){
knx.regexs(function(err, regexs){ console.log(regexs) })
})
gateways.requireDriver('bacnet', function(err, bacnetApi){
bacnetApi.startMonitor(12, function(err){ ... }) // frame monitor of gateway 12
})
Actions on one gateway (scan, import, monitor…) go through callGatewayMethod (7.4), with the method name defined by the driver.
callGatewayMethod(gatewayKey, methodName, args, callback)Call a custom method exposed by a specific gateway instance (as opposed to a driver class). This is the lower-level dispatcher used internally by the UI's "Driver actions" buttons.
// BACnet discovery: devices that answer appear as %bac:... addresses of the gateway
gateways.callGatewayMethod(12, 'executeBacnetCommand', ['who is'], function(err){ ... })
Examples of gateway methods:
| Driver | Method | Arguments | Effect |
|---|---|---|---|
| BACnet | executeBacnetCommand |
['who is'] |
Who-Is broadcast; answering devices are added as addresses |
| BACnet | listDeviceObjects / importDeviceObjects |
[deviceAddressName] |
Read the object list of a device / create its objects as addresses |
| M-Bus | scanPrimary / scanSecondary / scanWireless |
[from, to] / [mask] / [] |
Bus scans (long, they block the bus) |
| DALI | findDevices |
[line] |
Find the devices of a line |
| EnOcean | scan |
[params] |
Teach-in mode |
| OPC UA | browseRoot / browseName |
[recursive] / [nodeName, recursive] |
Browse the server and add the nodes found |
| HTTP | mkdir / rm / readFile |
[parent, name] / [name] / [name] |
Manage the files served by the gateway |
| Modbus, BACnet, M-Bus, SAIA, N2, IEC 104 | startMonitor / stopMonitor |
[] or [{durationMs}] (SAIA: [] only) / [] |
Frame monitor (M-Bus: wired gateways only) |
A view gives addresses alternative, programmable names. Native views are alias and, for BACnet, bacnetName. A view is started or stopped per gateway. See Views.
| Method | Description |
|---|---|
getViews(callback) |
List all views |
getView(viewKey, callback) |
Get one view |
insertView(viewObject, callback) |
Create a new view |
updateView(viewObject, callback) |
Modify a view |
deleteView(viewKey, callback) |
Delete a view |
startView(gatewayKey, viewKey, callback) |
Activate a view on a gateway |
stopView(gatewayKey, viewKey, callback) |
Deactivate it |
getActiveViews(callback) |
List currently active views |
An address object returned by getAddress, getAddresses, getAddressesByGateway, etc. has the following common fields:
| Field | Type | Description |
|---|---|---|
id |
integer | SQL primary key |
name |
string | The protocol-specific address name (KNX group address, Modbus register, BACnet object id, ...). Unique within its gateway. When two gateways use the same name, prefix it with the gateway name or id: myGateway¬%M1. |
alias |
string | Optional alias. Several gateways can use the same alias: prefer the id or <gateway>¬<name> when it is ambiguous. |
description |
string | Free-form description |
gateway_id |
integer | Foreign key to the parent gateway |
json |
object | Driver-specific configuration (data point type, register address, polling rate, …) |
value |
any | Last known decoded value (kept in cache, may be undefined) |
value_string |
string | Last known string representation of the value |
value_date |
number | Time of the last value, in milliseconds |
status |
string | Last known status: online, offline, pending, or a driver error starting with ! |
status_date |
number | Time of the last status change, in milliseconds |
log |
string | Log setting of the address |
views |
object | Names given to the address by the active views |
The json field's structure depends entirely on the driver. See each driver page for the per-protocol field reference.
| Field | Type | Description |
|---|---|---|
id |
integer | SQL primary key |
name |
string | Display name |
description |
string | Free-form description |
driver |
string | Driver key (e.g. 'modbus', 'bacnet', 'knx'): see the Driver reference |
cluster |
integer | Cluster identifier (0 for single-gateway setups) |
active |
0 / 1 | Whether the gateway is enabled |
json |
object | Driver-specific configuration (host, port, credentials, …) |
private_json |
object | Internal data of the driver. It is not an access-control mechanism: to limit what an account can see or do, give it a restricted role. |
state |
string | 'connecting', 'connected' or 'disconnected' |
gateways.readValue('tempLiving', function(err, value){
if(err) return console.error(err)
console.log('temp =', value)
})
Use the address name or id, or start the Alias view on the gateway to listen by alias (see 3. Listening to value changes).
function onChange(value){ console.log('temp =', value) }
gateways.on('newValue tempLiving', onChange)
// later:
gateways.removeListener('newValue tempLiving', onChange)
var addrs = parseCsv(file).map(row => ({
name : row.name,
alias : row.alias,
gateway_id : 12,
json : { datatype: row.datatype }
}))
gateways.importAddresses(addrs, function(err, progress){
if(err === 'end') console.log('imported', addrs.length, 'addresses')
else if(err) console.error(err)
else console.log(Math.round(progress*100), '%')
})
gateways.insertRoute({
name : 'KNX to Modbus',
source : { address : '4/7/25' },
destination : { address : '%M1' },
direction : 'right',
active : true
}, function(err, id){
console.log('route created:', id)
})
gateways.getGateways({ driver: 'modbus' }, function(err, gws){
var ids = Object.keys(gws)
var i = 0
function next(){
if(i >= ids.length) return console.log('done')
gateways.restartGateway(ids[i++], function(err){
if(err) console.error(ids[i-1], err)
next()
})
}
next()
})
| Method | Description |
|---|---|
writeValueString(addressKey, value_string, callback) |
Decode a string in the driver format, then write it (like writeValue) |
getAddressIdsByName(addressKey, callback) |
All address ids matching a name or alias, when it exists on several gateways |
getGatewaysLight(callback) |
All gateways with id, name, description, cluster and log settings only |
getGatewayDrivers(callback) |
{ <gateway id>: <driver> } for every gateway |
getGatewaysCache(callback, onChange) |
Gateways object kept up to date automatically, with an optional change listener |
getPendingRoutesWriteCount(callback) |
Number of route writes waiting (see the pendingRoutesWriteCount event) |
setRoutes(routes, callback) |
Replace the whole routing table |
getRoutesFs(callback) |
Files of the route functions (this._fs in a transform): the routeFiles folder of the safeFs storage |
Methods that run on the gateway also exist under gateways.r, which calls back with the return value of the method: gateways.r.getStats(function(err, stats){ ... }).