Gateway
2 minute read
MyController supports different type of providers network.
Each network can be connected to MyController via a gateway.
Gateway can be added/updated/deleted
from the Resources >> Gateway
page
Supported Providers list
Common Configurations
-
Form View
-
YAML View
id: mysensor # (1) description: MySensors gateway # (2) enabled: true # (3) reconnectDelay: 15s # (4) labels: # (5) location: core # (6)
id
of the gateway. You cannot modify this field laterdescription
of the gatewayenabled
- You can enable or disable to disconnect from provider network.reconnectDelay
- if the gateway disconnected from the provider network for some reason, will be reconnected automatically after this delaylabels
- labels are a key value pair used across the systemlabels.location
this is a kind of filter used to restrict to run this gateway to a specific location(s)
Note
Theid
field can not be changed later
Power of the labels
We can restrict to load a gateway to the specific host.
For example you are running gateway service on multiple hosts
and all the gateway service connected to MyController via message bus.
you have connected a serial port on Host B
.
When you add a gateway configuration on MyController, it sends the configuration details to all the gateway listener services.
So all the gateway listeners are try to look that serial port on their hosts. expect from Host B
all other gateway reports failed to load. To avoid these kind of situation, we have introduced labels
.
When we start a gateway service on a host, include label based filter.
That gateway service listens only it is own configuration.
In the above setup, if we include labels as location=gw2
on the configuration, It loads on the Host C
gateway service.
Other gateways from the different hosts will ignore this configuration.
Provider Configurations
Message Logger Configurations
Message logger is recording received and transmitted messages.
Type of Message Logger
None
- disable message logging systemFile Logger
- records the messages into a file (disk)
Note
This feature is available for all selected providers.-
Form View
-
YAML View
messageLogger: type: file_logger # (1) flushInterval: 5s # (2) logRotateInterval: 6h # (3) maxSize: 1MiB # (4) maxAge: 24h # (5) maxBackup: 3 # (6)
messageLogger.type
message logger type. supportfile_logger
andnone
messageLogger.flushInterval
how long once received message to be dumped to disk from memorymessageLogger.logRotateInterval
creates new file after this intervalmessageLogger.maxSize
if the size reaches themaxSize
, creates new filemessageLogger.maxAge
if the age reaches themaxAge
, creates new filemessageLogger.maxBackup
retention files count