How to take actions based on IoT data using Signomix

The Signomix platform allows you to define actions taken based on data received from connected IoT devices. This allows the system to react to these data on the fly.
This functionality is available thanks to the ability to define a Java Script preprocessor code for each device. A data received through the integration API, is transformed from its original format into a ChannelData object list. This list can be analyzed and processed by the preprocessor.

Currently, the following actions are possible to be called from the preprocessor level:

  • sending a notification to the facility owner and the associated team
  • correcting data values
  • creation of new data
  • rejecting incorrect data

Please note! The "developer preview" version allows notifications to be sent only to an e-mail address.

Notification channels

The platform user can define in his profile the ways of sending notifications (notification channels) specifying how to send them depending on the type of notification.
Signomix uses 4 types of notifications:

  • INFO

Their names may suggest their destination, but it is the user who determines in which cases they will be sent.

After entering the user profile change mode (option "User Profile > My Account" from the menu), we have the possibility to specify the address and the way of sending for each type of message. For example, if you enter the value "" in the "WARNING Notification Channel" field, then if a notification of "WARNING" type appears in the system, the content of this notification will be sent as an e-mail to the given address.

Similarly, if you enter the value of SMS:112233434455 in the "WARNING Notification Channel" field, an SMS message will be sent to the specified telephone number.

Envelope of the data processor script

If the preprocessor code is defined by the user of the device, this code will be injected into the packaging "envelope". The result code will be executed each time new data is received by one of the integration channels. The result of the result code operation will be:

  • modified list of data
  • list of generated events

Signomix saves the modified list of data to relevant data channels in the database and handles events from the list in a manner appropriate to their category and type.

Preprocessor envelope code:

// default script
var ChannelData = Java.type("com.signocom.signode.out.iot.ChannelData");
var IotEvent = Java.type("com.signocom.signode.iot.IotEvent");
var ScriptResult = Java.type("com.signocom.signode.out.script.ScriptResult");
var channelData;

var processData = function (eui, dataReceived, channelReader) 
  var result = new ScriptResult();
  //fill result with original values
  for (i = 0; i < dataReceived.length; i++) 
    channelData = dataReceived[i];
  //the line below will be replaced with a preprocessor code 
  return result;


Notification of the need to replace batteries or exceed a defined value

If our IoT device sends information about the battery charge status (e. g. charge level), we may use this information to send you a notification. In some cases, we can also take advantage of the fact that the sensor sends faulty data if the power supply voltage drops below the minimum. In this case, in addition to sending a notification, we can also omit such data so that it is not saved in the database.

Similarly, we can react to exceeding the set parameters - e. g. humidity drop below the minimum.

In order to send a notification, in the field "Data processor code" of the definition of our device, we must create an Event object setting the desired type and content of the message.

for (i=0; i<dataReceived.length; i++)
  if(dataReceived[i].getName() == 'battery' && dataReceived[i].getValue()<75)
    result.addEvent("warning","battery must be replaced");
  if((dataReceived[i].getName() == 'temperature' || dataReceived[i].getName() == 'humidity') && dataReceived[i].getValue()>100)
    result.addEvent("warning","cigarillo battery must be replaced");
    // remove errors from actual results
    // if we need to correct humidity sensor measures
    if(dataReceived[i].getName() == 'humidity')
      var newData=new ChannelData();
      newData.setValue(dataReceived[i].getValue()+10); //correction

Temperature rises too rapidly

The preprocessor also allows us to compare the current value of the data with the last recorded value. In this way, for example, we can react to an excessively rapid increase of temperature.

var actualTemperature = 0;
for (i=0; i<dataReceived.length; i++)
  if(dataReceived[i].getName() == "temperature")
    actualTemperature = dataReceived[i].getValue();
var previousTemperature = channelReader.getLastData("temperature");
if(previousTemperature!=null && (actualTemperature - previousTemperature.getValue() > 20))
  result.addEvent("alert","Temperature rises too fast!");

Target Signomix functionality

The currently available version of Signomix platform offers only some functionality. In a publicly available release it will be also possible:

  • sending SMS messages
  • sending a push notification to smartphone using the Pushover application
  • redirecting data to virtual devices
  • sending commands to actuator devices

More information


No Comments Yet.

Leave a comment

You must be Logged in to post a comment.