• Docs
Show / Hide Table of Contents
  • Introduction
  • OneSense.io
    • Login
    • Home page
    • GeoConfiguration
      • Regions
      • Locations
    • Devices
      • Device Profiles
      • Devices
      • Device Config
      • Device Groups
      • Pump Controller
      • Device Anomalies
    • Dashboards
      • Dashboards
      • Dashboard Templates
    • Operations
      • Rules
      • Sliding Window Rules
      • Timer Rules
      • Snowflake Rules
      • Alerts
      • Actions
      • Device Updates
    • Assets
    • Administration
      • Users
      • Roles
      • Subscription
      • Settings
  • OneSense BLE Application
    • OneSense BLE App
  • OneSense Monitoring Station
    • Assembly Guide

Device Config



Alt Text


Onesense config can be used to configure the device remotely through config tab in device details.

Onesense device config now supports nested config value which allows multiple parameters to be set in one config value thus eliminating the need for using a different config value for every configuration.

For example :


Alt Text


Config name Values
weather_station
{"weather_flag":0, "weather_slave_id":48, "weather_baud_rate":19200, "weather_delay":5}

Here for the config Name “weather_station” the values that can be set are

Alt Text
"weather_flag" : flag value is used to Enable/Disable the weather station polling on device. 0 being Disabled and 1 being enabled
Alt Text
"weather_slave_id": slave_id value lets user input the current Slave-ID of the weather station. The device will change the Slave-ID and CRC of the Modbus Request frame dynamically as per user defined value.
Alt Text
"weather_baud_rate": baud_rate value lets user input the current Baud-Rate the sensor is set to. The device will poll the sensor at the user defined baudrate.
Alt Text
“weather_delay”: This is used to set the delay between each message in minutes
The various configurations that are currently supported, and their Config names and Values are listed in the table below.

Once testing is done and the Config names and Values fixed these can be added as check boxes or drop-down lists In the UI making the process easier for users.


Alt Text


Sl.N Config Name Values
1
Include GPS
Check Box
2
Include Firmware Details
Check Box
3
Config OTA
0 or 1
4
LogLevel
1 or 2 or 3
5
Weather_Station
{"weather_flag":0, "weather_slave_id":48, "weather_baud_rate":19200, "weather_delay":5}
6
Solar_control
{"solar_flag":0, "solar_slave_id":1, "solar_baud_rate":19200, "solar_delay":5}
7
ORP
{"orp_flag":0, "orp_slave_id":3, "orp_baud_rate":19200, "orp_delay":5}
8
ph
{"ph_flag":0, "ph_slave_id":2, "ph_baud_rate":9600, "ph_delay":5}
9
Turbidity
{"turbidity_flag":0, "turbidity_slave_id":7, "turbidity_baud_rate":9600, "turbidity_delay":5}
10
Conductivity
{"conductivity_flag":0, "conductivity_slave_id":5, "conductivity_baud_rate":9600, "conductivity_delay":5}
11
Vibration
{"vibration_flag":0, "vibration_slave_id":23, "vibration_baud_rate":9600, "limit_x":2, "limit_y":-2, "limit_z":4.4}
12
Pump_L921
{"L921_flag":0, "L921_slave_id":1, "L921_baud_rate":9600, "L921_cut_off_value":48, "L921_A_cut_in_value":160, "L921_B_cut_in_value":0, "L921_over_flow_value":170, "L921_delay":5}
13
Pump_L922
{"L922_flag":0, "L922_slave_id":1, "L922_baud_rate":9600, "L922_cut_off_value":48, "L922_A_cut_in_value":160, "L922_B_cut_in_value":0, "L922_over_flow_value":170, "L922_delay":5}
14
Tank
{"tank_flag":0, "tank_R1":1, "tank_R2":2.2, "tank_volume":40000, "tank_vmin":0.5, "tank_vmax":4.5, "tank_delay":5}
15
Silent_mode
0 or 1
16
Flowmeter
{"flowmeter_flag":0, "flowmeter_baud_rate":115200, "flowmeter_delay":5}
17
Pump_SK_002
{"SK_002Flag":1, "SK_002SlaveId":1, "SK_002BaudRate":9600, "SK_002Delay":5}
18
Msg_delay
Integer
19
SEM1000
{"SEM1000_flag":0, "SEM1000_slave_id":1, "SEM1000_baud_rate":4800, "SEM1000_delay":5}
20
SEM227
{"SEM227_flag":1, "SEM227_slave_id":1, "SEM227_baud_rate":4800, "SEM227_delay":0, "SEM227_parameter_select":"00011000000010000000"}
21
qsd_flow
{"qsd_flag":1, "qsd_slave_id":2, "qsd_baud_rate":9600, "qsd_delay":5}

These configs can be divided into 4 groups depending on their functionality:

  1. Configure Device parameters

  2. Configure Modbus sensors.

  3. Configure ADC sensors calibration

  4. Configure pump controller parameters


Configure Device parameters

The various device parameters currently supported are:


Alt Text


Config Name
Values
Include GPS
Check Box
Include Firmware Details
Check Box
Config OTA
0 or 1
LogLevel
1 or 2 or 3
Silent_mode
0 or 1
Msg_delay
Integer
Alt Text
Include GPS

The device sends GPS co-ordinates to Onesense if GPS module is connected to Device and the “include GPS” check mark is checked. If the check mark is unchecked, then the device doesn't poll for its GPS location and no data is sent to Onesense.

Alt Text
Include Firmware Details

The device will send its current Firmware version and other details (like Firmware build date/time, Device type etc.) regarding firmware to onesense if the checkbox “Include Firmware Details” is checked.

This feature needs to be developed and integrated into the device Firmware. Currently No firmware info is sent to Onesense even if the checkbox is checked.

Alt Text
Config OTA

This config is used to switch between the OLD device update process (the OTA URL configured using BLE App) and New Device Update feature where no BLE config is needed. The OTA URL is sent to the device directly as payload when the OTA is invoked from Onesense.

The supported values are:

  1. 0 – Device is configured to OLD device update process where OTA URL needs to be set using BLE App
  2. 1 – Device is configured to NEW device update process where device receives OTA URL dynamically when OTA is invoked from Onesense.

This config was added so that the OTA process can be dynamic, and user can choose which OTA process the device will follow as the NEW process is still under testing and it can run into issues. As the NEW process is stabilized, we will phase out of the old process.

Alt Text
Log Level

This config enables user to set the level of HTTPs logging level. Based on the logging level set the device will send minimal logs with only Errors/Warnings or Detailed logs with all the info, warnings and Errors to Onesense via HTTPS.

The supported values for Log level config are:


Alt Text


  1. Log level set to errors and device published messages only

  2. Log level set to Errors, Warnings and published messages.

  3. Log level set to Errors, Warnings, Information and published messages.

Alt Text
silent_mode

This config enables user to set the buzzer on or off. The supported values for silent_mode config are:

  1. 0 : Enables the buzzer

  2. 1: Disables the buzzer and enters silent mode

Alt Text
msg_delay

This config enables to set the delay between each polling cycle. Its value should be an integer.

For example, if it is set as 5, there is a 5 second delay between each polling cycle

Configure Modbus sensors

Different MODBUS configurations implemented are:


Alt Text


Config Name
Values
Weather_station
{"weather_flag":0, "weather_slave_id":48, "weather_baud_rate":19200, "weather_delay":5}
Solar_control
{"solar_flag":0, "solar_slave_id":1, "solar_baud_rate":19200, "solar_delay":5}
ORP
{"orp_flag":0, "orp_slave_id":3, "orp_baud_rate":19200, "orp_delay":5}
Ph
{"ph_flag":0, "ph_slave_id":2, "ph_baud_rate":9600, "ph_delay":5}
Turbidity
{"turbidity_flag":0, "turbidity_slave_id":7, "turbidity_baud_rate":9600, "turbidity_delay":5}
Conductivity
{"conductivity_flag":0, "conductivity_slave_id":5, "conductivity_baud_rate":9600, "conductivity_delay":5}
Vibration
{"vibration_flag":0, "vibration_slave_id":23, "vibration_baud_rate":9600, "limit_x":2, "limit_y":-2, "limit_z":4.4}
SEM227
{"SEM227_flag":1, "SEM227_slave_id":1, "SEM227_baud_rate":4800, "SEM227_delay":0, "SEM227_parameter_select":"000110000000100000"}
qsd_flow
{"qsd_flag":1, "qsd_slave_id":2, "qsd_baud_rate":9600, "qsd_delay":5}

These will allow user to

Alt Text
flag: Enable/disable different sensors connected to the device. The flag value can be set to 0 or 1 which Enables or Disables the sensor polling respectively. Disabled sensor parameters won’t be polled or published to Onesense.
Alt Text
slave_id : Set the Slave-ID of each sensor. slave_id value lets user input the current Slave-ID of the weather station. The device will change the Slave-ID and CRC of the Modbus Request frame dynamically as per user defined slave ID.
_This breaks the dependency of each sensor slave-ID to be set to predetermined slave-ID. The user just has to know what the current slave-ID of the sensor is and can set the value in Onesense and the device starts polling the sensor with that slave-ID._
Alt Text
Baud_rate: Set different Modbus Baud rates for different sensors. baud_rate value lets user input the current Baud-Rate the sensor is set to. The device will poll the sensor at the user defined Baud rate. Different sensors connected to same device can have different baudrates and the device will change the Master Modbus Baudrate to the baudrate of corresponding sensor and poll the sensor.
Alt Text
Delay: Sets the delay in minutes between each published message
Alt Text
LimitX, limitY, limitZ: They are the threshold values of the accelerometer and they can either be positive or negative.
Alt Text
The parameters of the SEM227 sensor can now be controlled by an 20 bit number. For example, “11001100110011111100”. Each bit controls a different parameter and is inputted in the device config as SEM227_parameter_select as a string. So the device config for SEM227 has an additional part which looks like this: “SEM227_parameter_select”: “11001100110011111100”. The 0th bit is the right most bit from the string.
Bit Position
Parameter to be Polled
0
Due Point Temperature
1
Odour
2
Civil Gas
3
Ammonia
4
Chlorine
5
Nitrogen Dioxide
6
Air Quality
7
Hydrogen Sulphide
8
Ozone
9
Formaldehyde
10
TVOC
11
Sulphur Dioxide
12
Carbon Monoxide
13
Oxygen
14
Dust10
15
Dust2.5
16
Carbon Dioxide
17
Air Pressure
18
Humidity
19
Temperature

This breaks the dependency of every Modbus sensor needing to be set to same Baudrate.

Configure ADC sensors calibration

These configs allow user to set various ADC sensor caliberation parameters.


Alt Text


The ADC configuration implemented is:

Config Name
Values
Tank
{"tank_flag":0, "tank_R1":1, "tank_R2":2.2, "tank_volume":40000, "tank_vmin":0.5, "tank_vmax":4.5, "tank_delay":5}
  1. Tank_flag: Enable/disable tank level sensor ADC measurement

  2. Tank_R1: Value of resistor R1 of the Voltage dividing circuit

  3. Tank_R2: Value of resistor R2 of the Voltage dividing circuit

  4. Tank_volume: Total Tank volume in Litres

  5. Tank_vmin: Minimum Voltage output of the Analog sensor at Tank empty.

  6. Tank_vmax: Maximum Voltage output of the Analog sensor at Tank Full.

  7. Tank_delay: Delay between each published message in minutes

Configure pump controller parameters


Alt Text


Config Name
Values
pump_L921
{"L921_flag":0, "L921_slave_id":1, "L921_baud_rate":9600, "L921_cut_off_value":48, "L921_A_cut_in_value":160, "L921_B_cut_in_value":0, "L921_over_flow_value":170}
pump_L922
{"L922_flag":0, "L922_slave_id":1, "L922_baud_rate":9600, "L922_cut_off_value":48, "L922_A_cut_in_value":160, "L922_B_cut_in_value":0, "L922_over_flow_value":170}

L921 and L922 have similar configurations.

  1. pump_flag: Enable/disable L992/L991 Pump controller polling.

  2. Pump_ slave_id: set slave Id of pump controller

  3. pump_baud_rate: set baudrate of pump controller

  4. pump_cut_off_value: Set the pump cut off value

  5. pump_A_cut_in_value: Set the Pump A cutin value

  6. pump_B_cut_in_value: Set the Pump B cutin value

  7. over_flow_value: Set the overflow alarm threshold value.

The Pump controller Slave_ID and BaudRate have not been made dynamic. It is not yet implemented as the pump controller working involves polling of parameters and Actions to remotely start or stop the pumps. The Slave-ID and baudrate will have to be dynamically changed when Actions are invoked, and this implementation will be done after testing of all other configs are done.

The Action command is case sensitive. Here is the list of all supported action commands. Methods :

Alt Text RLY1-Close

Alt TextRLY1-Open

Alt Text RLY2-Close

Alt Text RLY2-Open

Alt Text RLY3-Close

Alt Text RLY3-Open

Alt Text RLY4-Close

Alt Text RLY4-Open

Alt Text RLY5-Close

Alt Text RLY5-Open

Alt Text OTA_start

Alt Text BUZ_ON

Alt Text BUZ_OFF

Alt Text Restart_esp

Previous
Device
Next
Device Group