The Internal driver provides virtual addresses for storing values within the gateway. Unlike other drivers that communicate with external devices, the Internal driver operates entirely in memory — it has no physical connection and no protocol overhead. It is one of the most versatile tools in the gateway, used for:
Create a new gateway and select the Internal driver. The gateway configuration is minimal — only a Name and optional Description are needed. No connection parameters are required.
Once the gateway is started (it connects instantly), you can start inserting addresses.
Insert a new address in the Internal gateway. Addresses are prefixed with $ (similar to variables in programming languages):
$temperature — a simple variable$room1/temperature — organized hierarchically with /$config/threshold — a configuration valueThe address tree displays all internal addresses in a hierarchical structure.
By default, internal addresses store values in memory only — values are lost on reboot. If a value must survive a gateway restart (e.g. a configuration parameter, a counter, a setpoint), enable Store value (set to always) on the address. This persists the value to the SD card.
Tip: Only enable Store value when necessary. For values that change often and don't need persistence, leave Store value on
never. For a value that changes often but must survive a restart (a counter, an accumulated energy), do not usealways: enter a duration such as one minute. The value is then written to storage at most once per minute, which protects the SD card; after a power cut you may lose the changes of the last minute.
The Internal gateway has minimal configuration:
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this Internal gateway instance. |
| Description | description | Optional description. |
No cluster, no connection parameters. The gateway runs in-process (no separate process) to save memory.
To create an Internal gateway through the API, use virtual as the value of the driver field: Internal is only the name shown in the interface.
Internal addresses use the $ prefix:
$myVariable$sensors/average$config/alertThresholdAddresses can be organized hierarchically using / and are displayed as a tree in the UI. You can also drag and drop addresses from other drivers onto the Internal gateway — the address name is automatically converted (e.g. %mbus:1/0/value becomes $1/0/value).
| Label | JSON Key | Description |
|---|---|---|
| Name | name | The address name, prefixed with $. |
| Description | description | Optional description. |
| Datatype | json.datatype | Value type constraint: any (default, accepts any value), number (rejects non-numeric values), string (rejects non-string values), or extend (deep-merges JSON objects instead of replacing them). |
| Log | log | History policy of the address: never, always, on change (cov, with an optional threshold), a period in ms or a cron expression, with optional throttle, force_after and heartbeat delays in ms. |
| Store value | json.remanent | Value persistence: never (value lost on reboot, default), always (saved after each change; writes are grouped, at most one every few seconds), on change (cov, with an optional threshold and optional throttle / force_after delays in ms), or a duration: the value is saved at most once per period (for example 60000 = at most one write per minute). |
| Read only | json.readOnly | If enabled, the address value cannot be modified through the UI grid (it can still be written programmatically via routes or the API). |
| Datatype | Behavior |
|---|---|
any |
Accepts any value: numbers, strings, JSON objects, arrays, etc. |
number |
Only accepts numeric values. Non-numeric writes are rejected with an error. |
string |
Only accepts string values. Non-string writes are rejected with an error. |
extend |
When a JSON object is written, it is deep-merged with the existing value instead of replacing it. Useful for incrementally updating complex objects. |
Notes on datatypes:
number: numeric strings are converted ("22.5" becomes 22.5); an empty string or null is stored as 0.extend: write { key: '__delete__' } to remove a key, and { key: { __replace__: newValue } } to replace a branch instead of merging it. Arrays are merged index by index.{
"name": "$config/alertThreshold",
"description": "Alert threshold",
"log": "on_update",
"json": { "datatype": "number", "remanent": true, "readOnly": false }
}
datatype, remanent and readOnly belong to the json object of the address. datatype is "number", "string", "extend" or an empty string for any. log is "" (never), "on_update", "always" or a number of milliseconds (one record per period).
A common pattern is to use an internal address as an intermediate variable between two routes. For example, to convert a Modbus temperature value from Fahrenheit to Celsius before sending it to BACnet:
%M1 → $tempCelsius with a routing function (value - 32) * 5/9$tempCelsius → %bac:local/analogValue:1 (direct value routing)This separates the conversion logic from the protocol routing and makes the intermediate value visible and loggable.
When creating a route, there are two ways to define custom routing logic:
Inline function — write the JavaScript function directly in the route's function field. Simple but the function is embedded in the route and not reusable.
Internal address function — store the JavaScript function as the value of an internal address, then reference that address in the route. The function is reusable across multiple routes and can be updated without modifying the routes themselves.
For method 2:
$fn/convertTemp.function(value){ return (value - 32) * 5 / 9 }. The value must be a real function: a piece of text that merely contains code is not executed.$fn/convertTemp) as the source value (the transformation field) instead of the code. See Routes.Every route that references the address uses the same function. When you change the value of the address, all these routes use the new function at once; there is nothing to edit in the routes.
Function values are always kept across restarts, whatever the Store value setting.
Internal addresses with Store value enabled are ideal for storing configuration values that should persist across reboots:
$config/alertThreshold — a temperature threshold (e.g. 30)$config/alertEmail — an email address for notifications$config/enabled — an on/off flagThese values can be used in route functions or the logic module to make the system behavior configurable without modifying routes.
Internal addresses can be used to aggregate data from multiple protocols into a unified namespace. For example:
%M1 (Modbus temperature) → $building/floor1/temperature%bac:local/analogInput:1 (BACnet humidity) → $building/floor1/humidity%mbus:1/0/value (M-Bus energy) → $building/floor1/energyThe $building/... addresses provide a protocol-agnostic view of the data that can then be routed to MQTT, the cloud, or any other destination.
| Property | Value |
|---|---|
| Readable | Yes |
| Writable | Yes. Read only only locks the value cell in the address grid (see 3.2). |
| Routable | Yes |
| Loggable | Yes |
| Auto-creation | Yes — writing to a non-existing address creates it automatically, with Store value never and Read only off. |