Broox Sensor Node
Broox Sensor node reads serial/USB/etc sensors and generates MQTT messages. Also, from MQTT messages can control several actuators.
Available Sensors/Actuators
The sensor.ini file
You can edit the sensor.ini
file using the button in the UI or in its installation place (AppData\Local\Broox Sensor Node
in windows, $HOME\.config\Broox Sensor Node
in Linux).
- Sensors are defined via UI or manually in the
sensor.ini
file. - Sensors are in [sensor:N] sections, numbered from zero.
- Common sensor items are
name
andbackend
. - Other values are for serial interfaces (like
port
,baudrate
) or TCP.
[logging]
loglevel=DEBUG
logfile=sensor.log
[autostart]
enabled=0
[controller]
id=
ip=
port=
[sensor:1]
name = Nexmosphere Xtalk Sensor/Actuator
backend = xtalk
;; serial port to use
port = /dev/cu.Bluetooth-Incoming-Port
;; baudrate
baudrate = 115200
;; xeye trigger distance. set a value from 1 to 9.
;; see the xeye manual for distance metrics of the different zones.
; xeye-trigger-at = 5
;; XRDR1 RFID Reader invert pick up/put back
;; By default, pick up generates an "in" trigger, put back an "out" trigger (pick and learn)
;; Setting xrdr-invert=true, pick up generates an "out" trigger, put back an "in" trigger (place and learn)
; xrdr-invert=false
;;
;; static device map =
;; a list of device-index = device-type separated by commas
;; this devices will be created on startup
staticmap = 111:LightMark,112:LightMark,113:LightMark,114:LightMark
Sent and received Trigger Events
Events sent and received will be trigger
events. The format depends on the sensor type (RFID, distance, etc).
The general format is:
{
"cmd": "trigger",
"class": "sensor",
"category": "beacon|rfid|carpark|serial|nexmosphere",
"model": "a model, e.g. XEye",
"action": "in|out|xxxxx...",
"origin": {
"class": "xxxxx",
"address": "yyyyyy",
...
}
...
}
E.g for a Nexmosphere XRDR1 RFID tag reader:
{
"cmd": "trigger",
"class": "sensor",
"category": "nexmosphere",
"action": "in|out|...",
"model": "XRDR1",
"id": "3",
"origin": {
"protocol": "xtalk",
"address": "002",
"serial": "COM2:"
}
}
For a wireless sensor, the ID is also the address:
{
"cmd": "trigger",
"class": "sensor",
"category": "nexmosphere",
"action": "in|out|...",
"model": "EMFX",
"id": "103",
"origin": {
"protocol": "xtalk",
"address": "103",
"serial": "COM2:"
}
}
For a simple serial device:
{
"cmd": "trigger",
"class": "sensor",
"category": "serial",
"model": "simple",
"action": "in|out|...",
"serial": "COM2:"
}