User`s guide

MASSA PRODUCTS CORPORATION
Product Manual- April 24, 2012 5 M3 Wireless Ultrasonic Level Sensor
3.0 Operating Modes for Gateway and Sensor
There are several operating modes for the gateway using the Massa python driver. The primary function is listening for
automated messages from M3 Sensors and sending its data to a cloud or local server. Secondary functions include
programming sensor registers, programming XBee registers, obtaining sensor diagnostic data, communicating with the M3
Software application, reprogramming sensor firmware, and reprogramming the XBee radio.
Sensors from the factory have their PAN IDs set to zero which allows them to associate to any gateway when permissible
(gateway won’t permit a sensor to attach if the gateway has reached its child table limit, for example). They are also
programmed to stay awake when they find a gateway (indicated by Sensor LED blinking every 2 seconds). Note, if
gateway is not powered or sensor is not able to attach to a gateway, then the sensor will search for gateway every 60
seconds and thus blink in this manner (when sensors that are not programmed for sleep).
3.1 Configuring Sensor Settings & Other Controls
The controls for the gateway operating mode are found in the dia.yml file which is processed by the Massa Python driver
(m3_driver.py). This dia.yml can be set up to program sensor’s registers, program Xbee’s registers, obtain diagnostic
information, program the sensor’s application firmware, and program the XBee radio. After the dia.yml is processed when
the gateway starts, it returns to a listening mode waiting for automated M3 messages from the sensors. The dia.yml also
includes drivers to send this data to cloud or local servers (see Section 3.5). See the following pages for the definition of
each setting. Shown below is an excerpt for the settings from a dia.yml
1
file (with default settings):
- name: M3-150-3b4e or M3-150-Tank1 # Sensor name by user
2
driver: devices.vendors.massa.m3_driver:M3Driver # Massa M3 Sensor python driver
settings:
# Main dia related
extended_address: '00:13:a2:00:40:48:3b:4e!' # MAC Address of the M3 Sensor (must be lower case
and followed by !)
xbee_device_manager: 'xbee_device_manager' # operating manager (required)
# Sensor settings
3
sleep_interval_sec: 0 # Deep Sleep Interval (seconds), limits: 0, 12 – 88474 seconds
awake_time_sec: 31 # Awake Time (seconds), limits: 12 – 600 seconds, 20 sec min for most appl.
data_collection_interval_sec: 0 # Data Collection Interval (seconds), limits: 0, 10 – 16777215 seconds
outgoing_message_mode: 0 # Outgoing message mode, limits: 0-6
auto_message_length: 8 # Outgoing message length, limits: 1-8 (main sensor version 27 or greater)
sensitivity: ‘normal‘ # Sensor Sensitivity ('normal', 'high', 'very high', 'low', 'very low', 'custom
4
')
user_comment: ' ' # ASCII up to 32 characters (between quotes)
comm_fail_boot: 0 # Reboot sensor on failed Zigbee Ack / Unassoc. limits: 0, 4 – 254 awake periods
# XBee settings
5
pan_id: 0x0000000000000000 # PAN (Personal Area Network) ID limits: 0 - 0x000000007fffffff
xbee_security: 'disable' # Security encryption enable (EE). To activate enter 'enable'
xbee_security_key: 0x0000000000000000 # Security encryption key (KY), limits: 0 - 0xffffffffffffffff
poll_rate: 0 # Poll rate register (PO), set to 0
node_discovery: 1 # Node discover register (NO), set to 1
pan_conflict_threshold: 3 # PAN conflict threshold register (CR), set to 3, limits 1 - 0x3f
device_options: 0 # Device options register (DO), limits 0 or 4, response 0=first, 4=best, ver 29A7 or greater
# Routine control
6
clear_data_history: 'false' # Select 'true' to clear sensors historical data
obtain_diagnostic_data: 'false' # Obtains waveforms and other data upon gateway boot. To enable select 'true'
program_m3_firmware_file: ' ' # Update sensor firmware, file named here located in Python manage files.
keep_xbee_awake: 'false' # ‘true’ to keep sensor awake 5 minutes, ‘false’ to disable this function
clear_errors: 'false' # ‘true’ to clear sensors errors
reboot_sensor: 'false' # ‘true’ to reboot sensor. Required after XBee firmware is updated
log_status: 'false' # ‘true’ to output a 'status_log.txt' file that records autosend messages
log_dia: 'false' # ‘true’ to output a 'dia_log.txt' file that reports sensor settings and driver version
Notes:
1
This example contains just part of the dia.yml file. See Appendix B for additional settings. The '#' character and all that follows on a line are comments and are not processed. Quote
marks can be single or double as long as they match.
2
Suggested naming convention is to specify sensor model number followed by sensor MAC address and/or tank serial number.
3
Sensor registers listed in the dia.yml will cause writes to sensor registers only if they are different. Sensor registers are read when gateway boots (and after sensor wakes up). Registers left
out of dia.yml will not be written.
4
Custom Sensitivity will require custom settings registers to be set, see Section 3.1.11 for these registers (not shown in this excerpt).
5
XBee registers listed in the dia.yml will write to Xbee registers. Registers left out of dia.yml will not be written.
6
dia controls listed in the dia.yml will execute specific functions when set to do so.
If a dia controls are left out or preceded with the '#' symbol, then the specific function will not be executed.