Programming Cloud Service configuration
Last updated
Last updated
The user can manage different program templates. So it is possible "save" a valid program and use it later by clicking the "Load" button. This is useful in order to program several nodes which belong to the same Plug & Sense! model. So the user can use the same template with different serial IDs.
The "serial ID" is the unique identifier of the Plug & Sense! device. This serial ID can be found in the bottom-side sticker where the number is specified. It is a 16-digit identifier defined in hexadecimal digits. The PCS form allows the user to search for a specific serial ID among all registered devices. The user must keep in mind that the generated program will only work for the serial number specified in this field.
This optional field permits to use a legible name for the device instead of using the serial ID only. It is possible to define a node identifier such as "node_001" which can be easier to be managed within a network of several devices. The user must keep in mind that if this field is defined, less payload size will be available for sensor data. This restriction specially applies for the XBee-PRO 802.15.4 radio. So it is recommended to rely on the "serial ID" instead of the "node name".
The user must select the Plug & Sense! model related to the device to be programmed. The drop-down selector lists all Plug & Sense! models so the correct one must be chosen.
The user must select the sensor probes to be configured in each socket. There are 6 sockets dedicated to sensor probes (from 'A' to 'F'). Depending on the Plug & Sense! Model, a different list of sensors is displayed in each drop-down selector when clicking the socket menu.
There are specific cases when the sensor probes need special configuration parameters. The next chapters explain each special case.
Some sensor probes are not included in the Programming Cloud Service by default (Like Eureka Manta multi sensor probe or Proteus). Please ask your sales agent for more information about the possibilities.
When a Smart Water sensor is selected, the calibration points are displayed as a new option to be configured. Each sensor will need different calibration values depending on the points to be measured. The calibration values consist of different points to be determined. Depending on the sensor it can be a voltage level or a resistance value. The calibration points must be determined by the user through a calibration process which is described in the corresponding Smart Water Board Guide.
Compared with other smart water sensors, the Smart Water Xtreme sensors can be easily calibrated following the instructions printed on the serial monitor. There is no need of selecting any calibration point in the configuration step.
Once the compiled binary has been uploaded into a node, a message will be prompted on the serial monitor asking to type 'C' and press 'Enter' to enter the calibration menu and therefore begin the calibration process. If no key is pressed, then the code will continue after a few seconds. Bear in mind that only sensor probes placed on socket E can be calibrated. A complete description of the calibration process of each sensor can be found on the Smart Water Xtreme technical guide.
Note: Remember that the calibration process can be only be performed on socket E, because it is the only socket with RS-485 signals (needed for calibration). The calibration process stores the calibration values on the sensor's memory, so afterwards it can be connected to any socket. That means that if your node has, for example, 2 sensors probes, you will create 2 binaries with the PCS for calibration (each sensor, always in socket E), and then a final 3rd binary with the final sensor distribution (each calibrated sensor can be connected to any available socket, for example, A and C).
When a Smart Water Ions sensor is selected, the calibration points are displayed as a new option to be configured. Each sensor will need different calibration values depending on the points to be measured. The calibration values consist on 3 calibration points specified by 2 numbers: concentration in ppm units and related measured point in Volts. The calibration values must be determined by the user through a calibration process which is described on the corresponding Smart Water Ions Board Guide.
For the Radiation Control model, it is mandatory to define the amount of time to be spent for the radiation sensor reading (in millisecond units).
This model permits to configure sensor events for certain sensors probes. The behavior of these events must be determined by the user in the Sensor Configuration window. Besides, the Smart Security model provides a relay output in order to manage an external system. This relay can be activated by any available sensor event programmed by the user.
The output relay (only available in socket F) supports 2 possible configuration modes:
Relay activated for specified 'Timeout': When the relay is triggered by one of the sensor events, the device waits for the specified timeout before deactivating the relay. For instance: the water level in a tank rises up to the liquid level sensor, the interruption occurs and the relay is activated for the number of seconds defined in the form.
Relay activated until sensors are deactivated: When the relay is triggered by one of the sensor events, the device waits for all sensor events to be deactivated before deactivating the relay. For instance: the PIR sensor stops detecting motion around the device.
For each sensor event it is possible to configure the next options:
Disabled: The sensor is not enabled for treating any generated event. Warning: if other sensors were enabled for waking-up the node, this disabled-sensor will be still powered on, so it will trigger the event although this sensor was not enabled for waking-up the node.
Wake-up the node: If this option is selected for any of the sockets, it remains all sensors active within the sleep mode. So, it is possible to generate events and wake-up the node. When the platform wakes-up, a new sensor reading and sending is done.
Wake-up the node + trigger relay: (Only available if the relay in socket 'F' was previously enabled by the user). This possibility is displayed as a new option for sensor event behavior in the drop-down menu. This means the sensor event wakes up the platform, sends sensor data and triggers the relay following the relay option selected.
Note: This feature is only supported by PRO and Elite license versions.
If the user purchased a Plug & Sense! device which includes an Industrial Protocol module, this means that this optional field should be managed. Besides, the PCS Basic license does not support the Industrial protocol configuration. A PRO or Elite license is needed for this purpose. The available Industrial protocols are:
Modbus (over RS-232)
Modbus (over RS-485)
CAN Bus
Regarding the Modbus protocol, both RS-232 and RS-485 can be used in order to read input registers working with the Plug & Sense! device as master of the Modbus interface. The "input registers" function code is used to read contiguous input registers in a slave. Up to 3 different reading operations can be programmed. For each one of them, it is mandatory to define the slave address, the starting register address and the number of data (number of registers to read). Each register read from the Modbus interface is defined as 2 bytes. For each register, the first byte contains the MSB, and the second one the LSB.
Each successful reading is inserted into the Frame generated to be sent via the communication module. There is a particularity about the Modbus readings as it is explained in the "How data frames are generated" section.
Regarding the CAN Bus protocol, several operations can be programmed according to the customer requirements:
Get engine RPM
Get vehicle speed (km/h)
Get engine fuel rate (l/h)
Get fuel level (%)
Get throttle position (%)
Get fuel pressure (kPa)
If the Plug & Sense! device provides the GPS module, in this section it will be possible to enable this feature. When enabled, the timeout to wait for satellites signal must be defined in second units.
Besides, several GPS fields can be attached to the data frame:
GPS location (latitude and longitude in degrees)
GPS speed (km/h)
GPS course (degree)
GPS altitude (m)
This field is related to the period of time the device will spent in a sleep mode before a new sensor reading and data sending are performed. This permits to keep the battery level. The user must keep in mind that the greater the sleep time is, the longer the battery life will be and vice-versa.
The user must define the period of time in the 4 fields related to this section: Days, hours, minutes and seconds.
Sleep periods less than 10 minutes will imply very high use of energy. It is recommended to use sleep period greater than 10 minutes in order to deploy an energy-efficient system.
The RTC Watchdog allows the user to set up a watchdog reset as a backup feature. In the case the device experiences any kind of hanging issue, the RTC watchdog will reset the device after the watchdog period is consumed. The RTC Watchdog period must be defined in minute units. The PCS follows a simple rule to limit the minimum watchdog period. The minimum Watchdog period must be greater than the sleep time plus an offset of 10 minutes. The reason for applying this rule is to make sure all tasks (reading, sending and sleeping) are performed before triggering the Watchdog reset signal.
This optional setting permits to enable and configure a battery level warning message when battery thresholds are reached. When this field is enabled, the user must define 3 different thresholds following the next rule: Threshold 1 > Threshold 2 > Threshold 3. The thresholds are defined in % units related to battery level values. If the battery level decreases below one of these thresholds, a special warning packet is sent using the corresponding communication radio. The packet related to each threshold is sent once after crossing the threshold value and no more times. Only when the battery level gets over the threshold level, the program will be able to trigger this warning again.
The warning messages are different depending on the threshold. So, if the first threshold is exceeded, a string field is attached to the frame with the next contents: "LOW1". The same happens with the second threshold ("LOW2"). And again the same with the third threshold ("LOW3").
Example: if the thresholds are established to 60%, 40% and 20%. Thus, the system reads a 60% battery level in the loop \'n\'. And afterwards the loop 'n+1' reads 59%, then a "LOW1" warning message is sent as a string field (SENSOR_STR) within the frame.
The communication module provides the task of transmitting the frame with sensor data. All communication modules generate "binary" frames because this type of frame permits to insert more sensor fields in a single frame. The short-payload protocols (LoRaWAN and Sigfox) take advantage of the "tiny" frame.
For further information, refer to the Data Frame Guide.
The XBee-PRO 802.15.4 can send frames to another XBee radio. A Meshlium device should be used in order to receive the frames from the Plug & Sense! device. The PCS can configure several parameters:
Region: It permits to select between XBee-PRO 802.15.4 and XBee-PRO 802.15.4 EU. You can see the radio type in the sticker in the bottom side of the Plug & Sense! device.
MAC: Defines the destination MAC address. Where the packet is sent to. If you are using a Meshlium device to collect the data, the "RF modules" tab in the Manager System permits to read the Meshlium's XBee radio MAC address. The MAC addresses always start by 0013A200. The rest of the address must be correctly written down.
Sending attempts: Number of sending attempts in the case there are any RF errors.
PANID: Personal Area Network identifier. This is a 2-byte field. It is necessary to define it as 4 hexadecimal digits (from 0000 to FFFF). It must be the same as the receiver's.
Channel: The frequency channel defined for the network. It must be the same as the receiver's channel.
Link encryption: This parameter enables/disables the XBee AES-128 link encryption layer. If enabled, a 16-byte encryption key must be defined for the AES-128 encryption process. It must be defined as 16 chars. The receiver must be configured with the same encryption key. If Meshlium is used as data collector, the "RF modules" tab in the Manager System permits to configure it. This encryption layer is related to "Device to Device" encryption level described in the IoT Security Infographic.
When working with this protocol, the user needs to define the same parameters on all nodes in the network (that includes the Plug & Sense! device(s) and the Meshlium device). Besides, the Meshlium\'s XBee radio MAC address must be inserted on the PCS form.
The Manager System permits to configure the Meshlium's XBee radio as follows:
The PCS form should be filled with the same configuration that the receiving Meshlium has:
If the user wants to enable the "link encryption" security layer, this feature must be also configured in both PCS form and Meshlium Manager System. The Meshlium Manager System provides the interface to enable link encryption:
For further information, refer to the 802.15.4 Networking Guide.
The XBee-PRO 900HP can send frames to another XBee radio. A Meshlium device should be used in order to receive the frames from the Plug & Sense! device. The PCS can configure several parameters:
Region: It permits to select between XBee-PRO 900HP US/BR/AU.
MAC: Defines the destination MAC address. Where the packet is sent to. If you are using a Meshlium device to collect the data, the "RF modules" tab in the Manager System permits to read the Meshlium's XBee radio MAC address. The MAC addresses always start by 0013A200. The rest of the address must be correctly written down.
Sending attempts: Number of sending attempts in the case there are any RF errors.
PANID: Personal Area Network identifier. This is a 2-byte field. It is necessary to define it as 4 hexadecimal digits (from 0000 to FFFF). It must be the same as the receiver's.
Channel mask: This is a bitmap to select the channels used for RF communications. It goes from 0000000001FFFFFF to FFFFFFFFFFFFFFFF. It must be the same as the receiver's.
Preamble: The preamble defined for the network must be the same as the receiver's.
Link encryption: This parameter enables/disables the XBee AES-128 link encryption layer. If enabled, a 16-byte encryption key must be defined for the AES-128 encryption process. It must be defined as 16 chars. The receiver must be configured with the same encryption key. If Meshlium is used as data collector, the "RF modules" tab in the Manager System permits to configure it. This encryption layer is related to "Device to Device" encryption level described in the IoT Security Infographic.
When working with this protocol, the user needs to define the same parameters on all nodes in the network (that includes the Plug & Sense! device(s) and the Meshlium device). Besides, the Meshlium's XBee radio MAC address must be inserted on the PCS form.
The Manager System permits to configure the Meshlium's XBee radio as follows:
The PCS form should be filled with the same configuration that the receiving Meshlium has:
If the user wants to enable the "link encryption" security layer, this feature must be also configured in both PCS form and Meshlium Manager System. The Meshlium Manager System provides the interface to enable link encryption:
For further information, refer to the 900 Networking Guide.
The XBee 868LP can send frames to another XBee radio. A Meshlium device should be used in order to receive the frames from the Plug & Sense! device. The PCS can configure several parameters:
MAC: Defines the destination MAC address. Where the packet is sent to. If you are using a Meshlium device to collect the data, the "RF modules" tab in the Manager System permits to read the Meshlium's XBee radio MAC address. The MAC addresses always start by 0013A200. The rest of the address must be correctly written down.
Sending attempts: Number of sending attempts in the case there are any RF errors.
PANID: Personal Area Network identifier. This is a 2-byte field. It is necessary to define it as 4 hexadecimal digits (from 0000 to FFFF). It must be the same as the receiver's.
Channel mask: This is a bitmap to select the channels used for RF communications. It goes from 00000000 to 3FFFFFFF.
Preamble: The preamble defined for the network must be the same as the receiver's.
Link encryption: This parameter enables/disables the XBee AES-128 link encryption layer. If enabled, a 16-byte encryption key must be defined for the AES-128 encryption process. It must be defined as 16 chars. The receiver must be configured with the same encryption key. If Meshlium is used as data collector, the "RF modules" tab in the Manager System permits to configure it. This encryption layer is related to "Device to Device" encryption level described in the IoT Security Infographic.
When working with this protocol, the user needs to define the same parameters on all nodes in the network (that includes the Plug & Sense! device(s) and the Meshlium device). Besides, the Meshlium's XBee radio MAC address must be inserted on the PCS form.
The Manager System permits to configure the Meshlium's XBee radio as follows:
The PCS form should be filled with the same configuration that the receiving Meshlium has:
If the user wants to enable the "link encryption" security layer, this feature must be also configured in both PCS form and Meshlium Manager System. The Meshlium Manager System provides the interface to enable link encryption:
For further information, refer to the 868 Networking Guide.
The XBee ZigBee 3 can send frames to another XBee ZigBee radio. A ZigBee receiver device should be used in order to receive the frames from the Plug & Sense! device (Meshlium or Bridge do not support ZigBee). The PCS can configure several parameters:
MAC: Defines the destination MAC address. Where the packet is sent to. If you are using a ZigBee receiver device to collect the data, it should allow to read and display its XBee radio MAC address (or maybe it's shown in an external sticker). The MAC addresses always start by 0013A200. The rest of the address must be correctly written down.
Sending attempts: Number of sending attempts in the case there are any RF errors.
PANID: Extended Personal Area Network identifier. This is a 8-byte field. It is necessary to define it as 16 hexadecimal digits (from 0000000000000000 to FFFFFFFFFFFFFFFF). It must be the same as the receiver's.
Channel mask: The channels configuration where the ZigBee will scan the network. It must be the same as the receiver's configuration. This is a 2-byte field.
Link encryption: This parameter enables/disables the XBee AES-128 link encryption layer. If enabled, a 16-byte encryption key must be defined for the AES-128 encryption process. It must be defined as 16 chars. The receiver must be configured with the same encryption key. This encryption layer is related to "Device to Device" encryption level described in the IoT Security Infographic.
When working with this protocol, the user needs to define the same parameters on all nodes in the network (that includes the Plug & Sense! device(s) and the ZigBee receiver device). Besides, the XBee ZigBee receiver radio MAC address must be inserted on the PCS form.
The PCS form should be filled with the same configuration that the receiving ZigBee device has:
For further information, refer to the ZigBee Networking Guide.
The 4G radio supports different protocols: SMS, TCP, HTTP and HTTPS. It permits to send data to an external system.
The PCS can configure several parameters:
Region: It permits to select the radio version between Europe and Brazil, Americas or Australia.
APN: Access Point Name of the Mobile Network Operator network.
Login: Login of the Mobile Network Operator network.
Password: Password of the Mobile Network Operator network.
PIN: Defines the SIM card\'s PIN number.
GPS: It permits to enable/disable the GPS feature. Not available for Australian version.
For further information, refer to the 4G Networking Guide.
The WiFi radio supports different protocols: TCP, HTTP, HTTPS and send a frame to Meshlium. It permits to send data to an external system.
The PCS can configure several parameters:
ESSID: Extended service set identifier of the Access Point to join.
Security: It permits to configure the security settings for OPEN, WEP64, WEP128, WPA and WPA2. Depending on the security option, a different format of password is required.
OPEN: no security.
WEP64: 10 hexadecimal digits.
WEP128: 26 hexadecimal digits.
WPA/WPA2: at least 8 characters for the password.
IP method: It permits to select Static of DHCP methods.
Static: IP address, DNS, gateway and netmask addresses must be defined
DHCP: no parameters required.
The PCS form allows the user to select the "Send to Meshlium" protocol option. This will configure the Plug & Sense! device to send data via HTTPS request to the Meshlium unit. Also, the user must make sure that the AP settings are defined correctly. The Meshlium Manager System permits to configure the AP settings:
On the other hand, the PCS form must be configured with the same settings: SSID, security and password.
For further information, refer to the WiFi Networking Guide.
The Sigfox radio permits to send 12-byte packets to the Sigfox Cloud wherever the coverage and Sigfox standard is supported. For further information about coverage, please refer to Sigfox website. No special configuration is needed for this protocol.
The maximum payload is 12 bytes. In order to send data frames, the "tiny frame" format was designed. It permits to create several tiny frames from an original binary frame.
For further information, refer to the Sigfox Networking Guide.
The LoRaWAN radio permits to send variable-size packets to the LoRaWAN cloud system used by the user. For this purpose, a special LoRaWAN gateway is needed on the user side to be able to connect the Plug & Sense! device to the network.
The maximum payload is variable and it depends on the network conditions. In the worst case, the payload can decrease down to 11 bytes in the American version. In order to send data frames, the "tiny frame" format was designed. It permits to create several tiny frames from an original binary frame.
The PCS can configure several parameters:
Region: It permits to select among LoRaWAN EU, LoRaWAN US, LoRaWAN AU, LoRaWAN IN, LoRaWAN ASIA-PAC / LATAM and LoRaWAN JP / KR.
ADR: It permits to enable/disable the Adaptive Data Rate scheme which optimizes data rates, air-time and energy consumption in the network.
Sending mode: It permits to select between confirmed (with ACK) or unconfirmed (without ACK) transmissions.
Port: Defines the port used for data reception in the LoRaWAN back-end. Range: 1 to 223.
Protocol: Defines the protocol preferred by the user:
ABP (Association By Personalization):
DevEUI: The Device EUI identifies the LoRaWAN radio in the global network. It is defined by a 8-byte identifier. The user must insert the 16 hexadecimal digits that define the identifier. It must be the same as the one registered in the user back-end.
DevAddress: The Device Address identifies the LoRaWAN radio in the local network. It must be the same as the one registered in the user back-end.
NwkSKey: The Network Session Key is used for generating the message integrity check. It is defined by a 16-byte key. The user must insert the 32 hexadecimal digits that define the key. It must be the same as the one registered in the user back-end.
AppSKey: The Application Session Key is used for payload encryption. It is defined by a 16-byte key. The user must insert the 32 hexadecimal digits that define the key. It must be the same as the one registered in the user back-end.
OTAA (Over The Air Activation):
DevEUI: The Device EUI identifies the LoRaWAN radio in the global network. It is defined by an 8-byte identifier. The user must insert the 16 hexadecimal digits that define the identifier. It must be the same as the one registered in the user back-end.
AppEUI: The Application EUI identifies the user's LoRaWAN back-end application. It is defined by a 8-byte identifier. The user must insert the 16 hexadecimal digits that define the identifier. It must be the same as the one registered in the user back-end.
AppKey: The Application Key is used for the Over The Air Activation. It is defined by a 16-byte key. The user must insert the 32 hexadecimal digits that define the key. It must be the same as the one registered in the user back-end.
For further information, refer to the LoRaWAN Networking Guide.
Several communication modules in the Plug & Sense! line permit to send collected sensor data:
XBee-PRO 802.15.4
XBee-PRO 900HP
XBee 868LP
WiFi
4G
LoRaWAN
Sigfox
LoRaWAN and Sigfox protocols cannot send data directly to a final cloud service or Meshlium as they send frames to the customer's LoRaWAN cloud (the Network Server) and the Sigfox Cloud, respectively.
The XBee radios send data directly to Meshlium as there is another XBee radio inside Meshlium that allows reception. The XBee ZigBee 3 radio module is an exception since Meshlium does not support the ZigBee protocol.
Regarding the WiFi radio, it can connect to the Meshlium's WiFi Access Point (AP) and proceed with the HTTP request. However, it is also possible to send data to Meshlium via Ethernet or 4G interface, or directly to a final cloud service if a WiFi AP different from the Meshlium's is used. The user only needs an external WiFi AP with Internet connectivity and the public Meshlium's IP address and port.
Regarding the 4G radio, it always uses the mobile network operator infrastructure, so they may use the Meshlium's Ethernet or 4G interfaces in order to send sensor data to Meshlium.
Note: The "Use Encryption Key" and "HTTPS" features are only supported by PRO and Elite license versions.
The "Use Encryption Key" parameter enables/disables the AES-256 application encryption layer. This encryption layer is related to "Device to Gateway" and "Device to Cloud" encryption level described in the IoT Security Infographic. So there are 3 possible values for this parameter: Disabled, Device to Cloud and Device to Gateway.
The PCS form allows the user to configure these types of communication radios to send data to different destinations. Let's see all cases step by step.
In the previous section we learned how to send frames to the XBee module that Meshlium has. Besides, the PCS allows the user to select the protocol and destination of the frame. When using XBee modules, the protocol is fixed and the PCS allows the user to select between 2 destinations: "Send to Meshlium GW" and "Send to Libelium Cloud Bridge".
Send to Meshlium GW (Meshlium Gateway)
The Meshlium Manager System provides the interface to enable payload encryption:
When Meshlium is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 96" frames.
Send to Libelium Cloud Bridge service
If the user wants to enable the payload encryption security layer, this feature must be also configured in both PCS form and the Libelium Cloud Bridge. The Bridge provides the interface to enable payload encryption:
When the Bridge is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
Please refer to the "Waspmote Data Frame Programming Guide" to see the different types of frames and their behaviour.
In the previous section we learned how to send frames to the XBee module that Meshlium has. Besides, the PCS allows the user to select the protocol and destination of the frame. When using XBee modules, the protocol is fixed and the PCS allows the user to select between 2 destinations: "Send to Meshlium GW" and "Send to Libelium Cloud Bridge".
Send to Meshlium GW (Meshlium Gateway)
The Meshlium Manager System provides the interface to enable payload encryption:
When Meshlium is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 96" frames.
Send to Libelium Cloud Bridge service
If the user wants to enable the payload encryption security layer, this feature must be also configured in both PCS form and the Libelium Cloud Bridge. The Bridge provides the interface to enable payload encryption:
When the Bridge is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
Please refer to the "Waspmote Data Frame Programming Guide" to see the different types of frames and their behaviour.
In the previous section we learned how to send frames to the XBee module that Meshlium has. Besides, the PCS allows the user to select the protocol and destination of the frame. When using XBee modules, the protocol is fixed and the PCS allows the user to select between 2 destinations: "Send to Meshlium GW" and "Send to Libelium Cloud Bridge".
Send to Meshlium GW (Meshlium Gateway)
The Meshlium Manager System provides the interface to enable payload encryption:
When Meshlium is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 96" frames.
Send to Libelium Cloud Bridge service
If the user wants to enable the payload encryption security layer, this feature must be also configured in both PCS form and the Libelium Cloud Bridge. The Bridge provides the interface to enable payload encryption:
When the Bridge is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
Please refer to the "Waspmote Data Frame Programming Guide" to see the different types of frames and their behaviour.
Besides the required configuration for the module to connect to the acces point properly. The PCS allows the user to select the "protocol and destination" of the frame. When using the 4G communication module, the PCS allows the user among different options.
Send to Libelium Cloud Bridge
When this option is selected, the frames sent from P&S! will be type 103, AES128 encrypted.
If the "Use encryption Key" box is enabled the P&S! will encrypt using AES256 the content of the frame before doing the previous AES128 encryption. This results in a frame type 100 inside of a frame type 103.
Send to Meshlium GW
When this option is selected, the P&S! will send type 6 frames, type 7 frames or type 8 frames, depending on the sensor board within the P&S!. If the "Use encryption Key" box is enabled the P&S! will send type 96 frames.
When using the 4G radio, the user must keep in mind that the Meshlium's public IP address and port must be known in order to send data to Meshlium. The Meshlium device can be reached over Ethernet and 4G interfaces. The user is responsible for providing the correct IP address and port to the PCS form. These settings must be public so the 4G radio can reach them through an Internet connection.
Also, the Meshlium certificate must be specified in the PCS form. In order to know how to download the Meshlium certificate please refer to the section "How to download the Meshlium certificate for HTTPS connections".
If the user wants to enable the payload encryption security layer, this feature must be also configured in both PCS form and the Libelium Cloud Bridge. The Bridge provides the interface to enable payload encryption:
SMS
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
The data is sent to the defined phone number as a text message via SMS. The SMS body consists on the frame as hexadecimal digits.
HTTTP
When this option is selected as destination, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
The data is sent to a specific server as an HTTP GET request. There are several parameters to fill. The request will be sent as http://<host>:<port><path>?frame=<data>. Where <data> is the sensor data frame created by the device. It follows the structure defined in the Data Frame Guide. The rest of the parameters must be defined by the user:
Host: Consists on the host\'s URL or IP address.
Port: The remote port the server is listening for.
Path: The resource in order to access to the server.
HTTTPS
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
The data is sent to a specific server as an HTTP GET request. There are several parameters to fill. The request will be sent as https://<host>:<port><path>?frame=<data>. Where <data> is the sensor data frame created by the device. It follows the structure defined in the Data Frame Guide. The rest of the parameters must be defined by the user:
Host: Consists on the host\'s URL or IP address.
Port: The remote port the server is listening for.
Path: The resource in order to access to the server.
Certificate: The CA certificate that must be installed in the 4G radio in order to open the secure connection to the server.
TCP
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
In the case of the TCP connection, the frame is sent to the host in raw format (hexadecimal digits) with no headers. The rest of the parameters must be defined by the user:
Host: Consists on the host\'s URL or IP address.
Port: The remote port the server is listening for.
Please refer to the "Waspmote Data Frame Programming Guide" to see the different types of frames and their behaviour.
Besides the required configuration for the module to connect to the acces point properly. The PCS allows the user to select the "protocol and destination" of the frame. When using the WiFi communication module, the PCS allows the user among different options.
Send to Libelium Cloud Bridge
When this option is selected, the frames sent from P&S! will be type 103, AES128 encrypted.
If the "Use encryption Key" box is enabled the P&S! will encrypt using AES256 the content of the frame before doing the previous AES128 encryption. This results in a frame type 100 inside of a frame type 103.
Send to Meshlium GW
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 96" frames.
The "Select protocol and destination" form must be configured with the same settings defined in the Meshlium Manager System and the Meshlium certificate. In order to know how to download the Meshlium certificate please refer to the section "How to download the Meshlium certificate for HTTPS connections".
If the user wants to enable the payload encryption security layer, this feature must be also configured in both PCS form and the Libelium Cloud Bridge. The Bridge provides the interface to enable payload encryption:
HTTP
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
The data is sent to a specific server as an HTTP GET request. There are several parameters to fill. The request will be sent as http://<host>:<port><path>?frame=<data>. Where <data> is the sensor data frame created by the device. It follows the structure defined in the Data Frame Guide. The rest of the parameters must be defined by the user:
Host: Consists on the host\'s URL or IP address.
Port: The remote port the server is listening for.
Path: The resource in order to access to the server.
HTTPS
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
The data is sent to a specific server as an HTTP GET request. There are several parameters to fill. The request will be sent as https://<host>:<port><path>?frame=<data>. Where <data> is the sensor data frame created by the device. It follows the structure defined in the Data Frame Guide. The rest of the parameters must be defined by the user:
Host: Consists on the host\'s URL or IP address.
Port: The remote port the server is listening for.
Path: The resource in order to access to the server.
Certificate: The CA certificate that must be installed in the WiFi radio in order to open the secure connection to the server.
TCP
When this option is selected, the Plug & Sense! unit will send "type 6" frames, "type 7" frames or "type 8" frames, depending on the sensor board inside Plug & Sense!. If the "Use encryption Key" box is enabled, Plug & Sense! will send "type 100" frames.
In the case of the TCP connection, the frame is sent to the host in raw format (hexadecimal digits) with no headers. The rest of the parameters must be defined by the user:
Host: Consists on the host's URL or IP address.
Port: The remote port the server is listening for.
Please refer to the "Waspmote Data Frame Programming Guide" to see the different types of frames and their behaviour.
Sigfox protocol cannot send data directly to a Cloud or Meshlium as they send sensor frames to the Sigfox Cloud.
Regarding the PCS, the "Select protocol and destination" section will be disabled since the destination of the packets must be set in the Sigfox backend.
LoRaWAN protocol cannot send data directly to a Cloud or Meshlium as they send sensor frames to the customer\'s LoRaWAN network server.
Regarding the PCS, the "Select protocol and destination" section will be disabled since the destination of the packets must be set in the LoRaWAN network server.
Imagen
After filling the form, the user must press the "Check Configuration" button which will provide the list of the selected preferences. In the end, a text file is generated according to all choices given by the user.
Besides, information about the data frames will be also provided including the different sensor fields to be added during the program execution. For more information refer to the Data Frame Guide.
The "Compile and Download Binary" button generates the binary file to be upgraded into the Plug & Sense! device. When the button is pressed, a zip file is downloaded to the computer. After extracting the contents of the zip file, you will find a summary of the options selected in the PCS form and the corresponding binary file which name follows the next format: <serial_id>-<yy>-<mm>-<dd>-<hh>-<mm>-<ss>.hex.
Libelium Smart Devices App is an important tool developed by Libelium that allows users install programs to Plug & Sense! devices.
First of all and before installing anything, users have to take into account the platform where the application is going to be installed. To install the Libelium Smart Devices App, it is compulsory to have installed the JDK 1.8. If it is not installed in the computer, you can follow the steps and download it from this website:
https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html
Once installed JDK, users can download the application using the appropriate link depending on the operative system:
Then customers only have to extract the content of the SmartDeviceApp zip file downloaded in a place with the right permissions, and finally execute the file called "SmartDeviceApp" that will initialize the application. Please, note that the extension of this file will depend on the operating system the user is using at the moment (.sh for Linux and OSX, and .bat for Windows).
When the Smart Devices App is launched the user must go to the "Plug&Sense!" tab. In this window, the user can select the firmware they would like to upgrade to the device.
Besides, the Plug & Sense! device must be connected to the USB port and switched on (press the On/Off button to turn it on).
Finally, in the "USB settings" section it is possible to refresh the available USB ports where the Plug & Sense! port identifier should be found. The user must press the "Install" button in order to upgrade the binary file.
After few seconds, a small window should appear indicating that the program was uploaded successfully:
On the other hand, the user might experience some issue. In that case, the following message will be displayed in the Smart Devices App. The most common errors are due to a bad USB port selection or a device powered-off state. So keep in mind the previous steps in order to use the Smart Devices App properly.
The PCS does not allow the user to repeat the same sensor probe in more than one socket. For instance, regarding the Smart Security model, the form does not permit to select a "luxes" sensor in both 'A' and 'C' sockets at the same time. This limitation applies to the following Plug and Sense! models and sensors:
Smart Cities PRO: BME280, luxes, ultrasound and all gases sensors.
Smart Environment PRO: All gases sensors.
Smart Security: PIR, hall effect, liquid level, liquid presence, BME280, luxes and ultrasound sensors.
Smart Water: ORP sensor.
Smart Water Ions Single/Double/PRO: All ions and pH sensors.
However, there are some exceptions. The Smart Agriculture and Smart Agriculture PRO models allow the user to select up to three "soil moisture" sensors in sockets 'B', 'C' and 'E'.
As the PCS form permits to enable and configure so many possibilities, there could be some memory issues if the user considers using all PCS features in the same device. This limitation is not due to the PCS, it is due to the Waspmote's microcontroller: its flash memory allows binaries of a certain size. So this limitation applies to any Waspmote or Plug & Sense! unit, not only to those Plug & Sense! devices programmed with the PCS.
This case will happen only for very rare and complex selections. So it is not regular to find this type of restriction. For instance, besides using a Plug and Sense! model and probes, the user desires to enable the GPS module, an industrial protocol module and 4G HTTPS protocol at the same time. This combination would require a lot of memory allocation and will lead to memory issues.