This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Resources
Resources are the key components in MyController.
Gateway
Gateway is the entry and exit point in MyController.
It connects your network and MyController.
Node
Node is a kind of end point in the sensor world.
Source
Source is a single or group of fields
Field
Field is a final measurement point
Example
- Take a couple ESP8266 boards
- Those ESP8266 boards can be operated via
MQTT
protocol
- Each board has sensors like,
temperature
, humidity
, relay
, push button
, etc.,
- Now relate with MyController resources
- All the boards can be connected via
MQTT
to MyController - is called gateway
- A board is a endpoint - is called
node
temperature
, humidity
, etc., measurements are called field
- group of
fields
or a single field
goes under a source
1 - Gateway
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
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 later
description
of the gateway
enabled
- 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 delay
labels
- labels are a key value pair used across the system
labels.location
this is a kind of filter used to restrict to run this gateway to a specific location(s)
Note
The id
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 system
File 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. support file_logger
and none
messageLogger.flushInterval
how long once received message to be dumped to disk from memory
messageLogger.logRotateInterval
creates new file after this interval
messageLogger.maxSize
if the size reaches the maxSize
, creates new file
messageLogger.maxAge
if the age reaches the maxAge
, creates new file
messageLogger.maxBackup
retention files count
2 - MySensors
MySensors is an open source hardware and software community focusing on do-it-yourself home automation and Internet of Things.
To know more about MySensors network follow this link
Provider Specific key points
- In a network MySensors can have maximum of 254 nodes
- node id
0
is always a gateway node
- node id
1
to 254
can be allocatable to any node
- Supported features in MyController
OTA
features / Firmware update
reboot
a node
reset
a node
- get a node info
- discover nodes
Heartbeat
request
- Response to internal message like
I_TIME
, I_CONFIG
, I_ID_REQUEST
- Assigns NodeId if nodeId set as
AUTO
on a node
Not implemented / supported features (that is supported on MyController 1.x)
- Handle sleeping nodes
- There is no node alive check
Common Configuration
-
Form view
-
YAML View
provider:
type: mysensors_v2 # (1)
enableInternalMessageAck: true # (2)
enableStreamMessageAck: false # (3)
retryCount: 3 # (4)
timeout: 1s # (5)
type
should be selected as mysensors_v2
enableInternalMessageAck
enable acknowledgement for internal messages
enableStreamMessageAck
enable acknowledgement for streaming messages. ie: OTA/firmware messages
retryCount
- if do not receive the acknowledgement on the specified timeout
, keeps resend the message till it reaches the retryCount
timeout
- wait for the acknowledgement till this timeout
Protocols
MySensors gateway supports the following protocols
Protocol Configuration - MQTT
-
Form view
-
YAML View
provider:
protocol:
type: mqtt # (1)
transmitPreDelay: 15ms # (2)
broker: tcp://192.168.1.21:1883 # (3)
insecureSkipVerify: false # (4)
username: '' # (5)
password: '' # (6)
subscribe: out_rfm69/# # (7)
publish: in_rfm69 # (8)
qos: 0 # (9)
type
type of the protocol. here it should be mqtt
transmitPreDelay
- wait till this time to avoid collision and sends the data to provider network
broker
mqtt broker url
insecureSkipVerify
if you want to skip the insecure ssl, enable this option
username
username of the mqtt broker. if it is anonymous
leave it as a blank
password
if username supplied, password should be supplied. otherwise leave it as a blank
subscribe
topic to be subscribed to get messages from MySensors gateway
publish
topic to be used to post data from MyController to MySensors network
qos
MQTT qos
Note
It is important to include /#
at the end of subscription
topic to receive from all the nodes. example: out_rfm69/#
Protocol Configuration - Serial
-
Form view
-
YAML View
provider:
protocol:
type: serial # (1)
transmitPreDelay: 15ms # (2)
portname: /dev/ttyUSB0 # (3)
baudrate: 115200 # (4)
type
of the protocol. here it should be serial
transmitPreDelay
- wait till this time to avoid collision and sends the data to provider network
portname
name of the serial port
baudrate
baud rate of the serial port
Protocol Configuration - Ethernet
-
Form view
-
YAML View
provider:
protocol:
type: ethernet # (1)
transmitPreDelay: 15ms # (2)
server: tcp://192.168.1.42:5000 # (3)
insecureSkipVerify: false # (4)
type
of the protocol. here it should be ethernet
transmitPreDelay
- wait till this time to avoid collision and sends the data to provider network
server
ethernet server address with port
insecureSkipVerify
if you want to skip the insecure ssl, enable this option
3 - Tasmota
Tasmota is an Open source firmware for ESP8266 devices
Common Configuration
-
Form view
-
YAML View
provider:
type: tasmota # (1)
type
should be selected as tasmota
Protocols
Tasmota gateway supports the following protocols
Protocol Configuration - MQTT
-
Form view
-
YAML View
provider:
protocol:
type: mqtt # (1)
transmitPreDelay: 15ms # (2)
broker: tcp://192.168.1.21:1883 # (3)
insecureSkipVerify: false # (4)
username: '' # (5)
password: '' # (6)
subscribe: jktasmota/# # (7)
publish: jktasmota # (8)
qos: 0 # (9)
type
type of the protocol. here it should be mqtt
transmitPreDelay
- wait till this time to avoid collision and sends the data to provider network
broker
mqtt broker url
insecureSkipVerify
if you want to skip the insecure ssl, enable this option
username
username of the mqtt broker. if it is anonymous
leave it as a blank
password
if username supplied, password should be supplied. otherwise leave it as a blank
subscribe
topic to be subscribed to get messages from MySensors gateway
publish
topic to be used to post data from MyController to MySensors network
qos
MQTT qos
Note
It is important to include /#
at the end of subscription
topic to receive form all the nodes. example: jktasmota/#
MQTT configuration on the Tasmota node
The following changes needs to be updated on the Tasmota node MQTT settings to connect with MyController
Topic
- should be updated as tasmota_%06X
Full Topic
- should be updated as jktasmota/%prefix%/%topic%/
- here
jktasmota
can be any name, should be in lowercase and special characters are not allowed
To know more about MQTT settings on Tasmota follow this guide
4 - PhilipsHue
PhilipsHue is smart home lighting.
To know more about PhilipsHue developer API follow this link
Configuration
-
Form view
-
YAML View
provider:
type: philips_hue # (1)
host: http://192.168.1.34:80 # (2)
username: myhueuser # (3)
syncInterval: 10m # (4)
bridgeSyncInterval: 10m # (5)
type
should be selected as philips_hue
host
- PhilipsHue bridge address to communicate
username
of the PhilipsHue bridge
syncInterval
- polls the connected devices status from the PhilipsHue bridge
bridgeSyncInterval
- gets the PhilipsHue bridge configurations on this interval
5 - System Monitoring
System Monitoring is an internal plugin developed and maintained by MyController
Configuration
- Form view
- YAML View
provider:
type: system_monitoring # (1)
hostIdMap: {} # (2)
hostConfigMap: {} # (3)
type
should be selected as system_monitoring
hostIdMap
- is a group of key value map
hostConfigMap
configurations of monitoring resources
Host ID Map Configuration
Host ID Map (hostIdMap
) is used to map the real host id with a friendly name
Samples:
be0164ad-6f25-4448-b691-567946392b47: rpi_1
a574ac8d-4c9f-40d6-b0ce-bbc7d98cd87d: rpi_2
Here be0164ad-6f25-4448-b691-567946392b47
is the actual id of the host and it is mapped with rpi_1
.
If data received from this node, The node name will be as rpi_1
Host Config Map Configuration
Host Config Map (hostConfigMap
) is used to configure a specific node(s)
rpi_1: # (1)
disabled: false # (2)
cpu: # (3)
interval: 1m
cpuDisabled: false
perCpuDisabled: false
disk: # (4)
interval: 1h
disabled: false
data:
disk_root:
disabled: false
name: "Root"
path: /root
unit: MiB
disk_storage:
disabled: false
name: "Storage"
path: /storage
unit: MiB
memory: # (5)
interval: 1m
memoryDisabled: false
swapMemoryDisabled: false
unit: MiB
process: # (6)
interval: 1m
disabled: false
data:
influxd:
disabled: false
name: "InfluxDB"
unit: MiB
filter:
cmdline: influxd
adguard:
disabled: false
name: "AdGuard"
unit: MiB
filter:
cmdline: >-
/opt/adguardhome/AdGuardHome --no-check-update -c
/opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w
/opt/adguardhome/work
mycontroller:
disabled: false
name: "MyController"
unit: MiB
filter:
cmdline: /app/mycontroller-all-in-one -config /app/mycontroller.yaml
natsio:
disabled: false
name: "NatsIO"
unit: MiB
filter:
cmdline: nats-server --config /etc/nats/nats-server.conf
proc_gw:
disabled: false
name: "MYC GW"
unit: MiB
filter:
cmdline: ./mycontroller-gateway -config gateway.yaml
temperature: # (7)
disabledAll: false
interval: 30s
enabled: []
rpi_2: # (1)
cpu:
# ...
- node_id - id of the node or host
disabled
- set true
to disable data from this node. default value: false
cpu
configurations
disk
configurations
memory
configurations
process
configurations
temperature
configurations
CPU Configurations
cpu:
interval: 1m # (1)
cpuDisabled: false # (2)
perCpuDisabled: false # (3)
interval
- metric measurement interval
cpuDisabled
- disable overall CPU metrics data
perCpuDisabled
- disable individual CPU(s) metrics data
Disk Configurations
disk:
interval: 1h # (1)
disabled: false # (2)
data: # (3)
disk_root: # (4)
disabled: false # (5)
name: "Root" # (6)
path: /root # (7)
unit: MiB # (8)
disk_storage:
disabled: false
name: "Storage"
path: /storage
interval
- metric measurement interval
disabled
- disable the all the disk metrics
data
- is a map of disk configurations
- This id will be used as
fieldId
in MyController, use lowercase, no special characters, _
allowed
disabled
- disable this particular disk metrics
name
- will be used as field name
path
- disk path used to measure the usage details
unit
- units guide
Memory Configurations
memory:
interval: 1m # (1)
memoryDisabled: false # (2)
swapMemoryDisabled: false # (3)
unit: MiB # (4)
interval
- metric measurement interval
memoryDisabled
- enable/disable memory measurement
swapMemoryDisabled
- enable/disable swap measurement
unit
- units guide
Process Configurations
process:
interval: 1m # (1)
disabled: false # (2)
data: # (3)
influxd: # (4)
disabled: false # (5)
name: "InfluxDB" # (6)
unit: MiB # (7)
filter: # (8)
cmdline: influxd # (9)
mycontroller:
disabled: false
name: "MyController"
filter:
cmdline: /app/mycontroller-all-in-one -config /app/mycontroller.yaml
interval
- metric measurement interval
disabled
- disable the all the process metrics
data
- is a map of process configurations
- This id will be used as
fieldId
in MyController, use lowercase, no special characters, _
allowed
disabled
- disable this particular process metrics
name
- will be used as field name
unit
- units guide
filter
- used to get a specific filter
cmdline
- one of the key used to filter a process
Supported keys in the filter
pid
- Process ID
cmdline
-
cwd
- client’s Current Working Directory
exe
-
name
-
nice
- nice value of the process
ppid
- Parent Process ID
username
-
Measurement Units
Bye default all the values reported in bytes.
We have an option to convert the bytes to more readable values.
Update unit
on the supported resources.
If you want the values in bytes leave the unit
field as blank or remove it completely
Supported units: KiB
, MiB
, GiB
, TiB
, PiB
, EiB
- KiB - Kibibytes (10241 bytes)
- MiB - Mibibytes (10242 bytes)
- GiB - Gibibytes (10243 bytes)
- TiB - Tebibytes (10244 bytes)
- PiB - Pebibytes (10245 bytes)
- EiB - Exbibytes (10246 bytes)
Note
Units are case sensitive. If the specified unit is not in the above list, returns the value as bytes