Nexmosphere sensor/actuator
Nexmosphere supports some sensing devices: RFID (XRDR1), Distance sensors (XEye).
- XRDR1 RFID tag reader.
- EMFX Wireless lift&learn detectors.
- XEye zone entrance detectors.
- Also supported are LightMark RGB actuators.
Nexmosphere Sensor and Actuators
The Nexmosphere Suite of Sensor Devices is supported partially by the Sensor Node.
All sent messages follow the form:
{
"cmd": "trigger",
"class": "sensor",
"model": "nexmosphere",
"action": "<in|out|...>",
"type": "<type of nexmosphere sensor>",
"id": "<value sensed>",
"protocol": "xtalk",
"address": "<xtalk address, usually 000-999>"
}
RFID Sensor (XRDR1)
The Nexmosphere RFID sensor recognizes up to 20 tags. Those tags will be identified by id="X" where X is the number on the tag
- On pick up:
{
"cmd": "trigger",
"class": "sensor",
"model": "nexmosphere",
"action": "in",
"type": "XRDR1",
"id": "3",
...
- On put back:
{
"cmd": "trigger",
"class": "sensor",
"model": "nexmosphere",
"action": "out",
"type": "XRDR1",
"id": "3",
...
XEye Presence Sensor
By default the presence sensor emits a trigger, action in
, and a value zone
from 0 to 10, as defined in the
Nexmosphere XEye manual (each "zone" is a distance range).
The in or out is determined by the sensor.ini
file:
[sensor:0]
...
;; 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
The in
or out
event contains the target zone
{
"cmd": "trigger",
"class": "sensor",
"model": "nexmosphere",
"type": "XEye",
"action": "in",
"zone": 3
}
The Zone value depends on the sensor used.
See the Nexmosphere XEye Product Manual to convert zones to distances.
LightMark Devices
LighrMark devices control LED light strings.
The LightMark devices do not support automatic discovery, so they have to be hardcoded in the sensor.ini file.
For example, if the Nexmosphere ID where the strings are connected are numbered from 111, to 114, the staticmap line in sensor.ini reads:
;; 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
This will create the mapping, and you can address the different LightMark devices via its number (111 to 114).
Messages
To actuate a device, you have to send it an actuate
command via MQTT with the format:
{
"cmd": "actuate",
"target": "Lightmark-001",
"action": "ramp",
"args": [
0,
127
]
}
- Available actions:
- ramp
(brightness: int, color_id: int, time_ds: int)
- pulse
(bright_from, color_id_from, time_from, bright_to, color_id_to, time_to, repeats, ramp_time)
- wave
(bright_from, color_id_from, duration, bright_to, color_id_to, program, anim_option, n_leds)
- ramp
See the Nexmosphere LightMark guide for colors and values.