Lora iot sensors and micro-bridge for remote monitoring (19 pages)
Summary of Contents for Fludia FM432
Page 1
FM432 – User Guide LoRaWAN IoT sensors for remote monitoring Document Ref FLD10068 version 1.1.0 Product references: FM432e: electricity meter optical reading Ref: FM432e_nc_1mn, FM432e_nc_10mn, FM432e_nc_15mn FM432ir: electricity infrared meter optical reading (SML protocol) Ref: FM432ir_nc_1mn, FM432ir_nc_15mn FM432g: gas meter optical reading (ATEX)
Page 2
2022-05-30 1.0.4 Adding FM432ir code examples 2022-05-31 1.0.5 FM432 instead of FM232 in the illustration (overview chapter) 2022-06-01 1.0.6 Firmware version FM210ir_v1.6 replaces v1.2. Clarification (chapter 7.1): message 2022-08-24 contains 15 or 20 values depending on the type of meter.
Table of Contents 1. Overview ............................5 2. Installing the sensors and joining the LoRaWAN Network ............6 Installing the FM432e (optical reading of electricity meters) ............6 Installing the FM432ir (optical reading of electricity meters in Germany) ........8 Installing the FM432g (optical reading of gas meters) ..............
Page 4
Types of messages ........................... 45 Data message (T1) structure ......................45 Service message (T2) structure......................46 Technical message (TT1) structure ....................47 Code examples ..........................48 10. Decoding FM432p-(a n)_nc_1mn ....................51 10.1 Types of messages ........................... 51 10.2 Data message (T1) structure ......................
(if a callback has been set up between the LoRaWAN Network and Fludia data server) Selecting data and downloading related files from the dashboard (if a callback has been set up between the LoRaWAN Network and Fludia data server)
2. Installing the sensors and joining the LoRaWAN Network Installing the FM432e (optical reading of electricity meters) First identify the type of meter you want to measure. It could be either an electronic electricity meter (with a blinking light) or an electromechanical electricity meter (with a rotating disk). In case the white cable is plugged in the radio/battery box, it is recommended to unplug it (and leave only the optical side connected) before proceeding with the installation.
Page 7
Connect the white cable between the optical head and the FM432 battery/radio box. In the case of an electromechanical meter, make sure the optical head is still perfectly aligned with the disk. The FM432e starts measuring automatically. The optical head LEDs (lights) should blink this way: 1.
Installing the FM432ir (optical reading of electricity meters in Germany) First identify the type of meter you want to measure. It could be either an mME electricity meter (with an infrared port supporting SML protocol) or an electromechanical electricity meter (with a rotating disk). In case the white cable is plugged in the radio/battery box, it is recommended to unplug it (and leave only the optical side connected) before proceeding with the installation.
Page 9
Connect the white cable between the optical head and the FM432 battery/radio box. In the case of an electromechanical meter, make sure the optical head is still perfectly aligned with the disk. The FM432ir starts measuring automatically. The optical head LEDs (lights) should blink this way: 1.
>> In some cases, the digit can be higher or lower than normal. Position the arrows at mid-height of the frame, not at mid-height of the digit. Clip the optical sensor to the holder. Connect the white cable between the optical head and the FM432 battery/radio box. The FM432g starts measuring automatically.
Installing the FM432p (detecting meter pulse outputs: gas, water, elec, heat…) The FM432p comes with a cable that needs to be connected to the meter pulse interface. By default, the end of the cable shows two wires: red wire (pulse), black wire (ground). If the meter output shows a polarity, make sure to connect the cable accordingly.
Installing the FM432t (measuring temperature) Start the join process by removing the batteries, waiting for 10 seconds, and putting them back on. The LEDs on the radio/battery box show the progress of the join process: Red and Green LED blinking together (join in progress) Green LED blinking alone (join successful) Red LED blinking alone (join failed) Position the FM432t box wherever you want to measure temperature.
In case of an ATEX certified product such as the FM432g, when operating in an ATEX zone you should only use certified batteries provided by Fludia, so that the product is still considered certified. 4. Removing the batteries to make a sensor forget its join To make a sensor forget its join, you simply must cut the energy source: remove the batteries.
5. Decoding FM432e_nc_1mn messages Types of messages Time-step Message Type 1 minute Every 20 minutes Data message (T1) (20 x 1 minute) Service message (T2) Every 24 hours FM432e_nc_1mn generates two kinds of messages: • T1: contains twenty power values and the last index. It is generated every 20 minutes. •...
Page 15
if energy is low, there is time to wait for a late optical detection, necessary to compute average power, and attribute their share to the power values before sending the message. 5.2.3 Byte structure Byte #9 #10 #11 #40 #41 #42 #43 #44 #45 Signification Header* P(t0)
Service message (T2) structure The T2 data message transmits technical information about the sensor (firmware, meter type, battery status indicator) and more info about the measurements (a longer index, the time-step, and a max power value). The T2 data message is sent on sensor start and then every 24 hours. Byte Signification Header Number...
Code examples We present examples of codes that perform the calculation for the index and for the power values. 5.4.1 Python code example #!/usr/bin/env python # -*- coding: utf-8 -*- # return index from T1 payload decode_index(payload): len(payload) == 90: index = int(payload[2:10],16) return...
Page 18
// Exemple : $payload "5b0afdff00068f068f0649066a067e0682057a04ad049f04bd04c204c004c604bf04ae04a504a304b0049b04ac"; $index = decode_index($payload); $power_list = decode_power_list($payload); ($power_list null && $index != null) echo "Index: ".$index."\n"; foreach ($power_list $power) echo $power. "\n"; else echo "the payload has the wrong size \n"; ?> 5.4.3 JavaScript Code example //return index from T1 payload function decode_index(payload) {...
6. Decoding FM432e_nc_10mn and FM432e_nc_15mn messages Types of messages Sensor version 10 minutes 15 minutes 1 hour Every 80 minutes Every 2 hours Every 8 hours Data message (T1) (8 x 10 minutes) (8 x 15 minutes) (8 x 1 hour) Service message (T2) Every 24 hours Every 24 hours...
Page 20
6.2.2 Timestamping Index value should be time stamped as follows: received Each increment should be time stamped as follows: t - ((8 - i)*Time_step) received Where: • is the timestamp for one element of the data message i ϵ {0,7}. •...
Service message (T2) structure The T2 data message transmits technical information about the sensor (firmware, meter type, battery status indicator) and more info about the measurements (a longer index, the time-step, and a max power value). The T2 data message is sent on sensor start and then every 24 hours. Byte Signification Header Number...
Technical message #2 (TT2) structure Header (hexa): 13 Size: 11 Bytes Code examples We present examples of codes that perform the calculation for the index and for the increments. At the end of each code a way of converting increments in average power values is included. 6.6.1 Python code example #!/usr/bin/env python...
7. Decoding FM432ir_nc_1mn messages Types of messages Time-step Message Type 1 minute Data message (T1) Every 15 minutes (15 x 1 minute) Service message (T2) Every 24 hours FM432ir_nc_1mn generates two kinds of messages: • T1: contains 15 or 20 successive values (depending on the type of meter) and the last index. It is generated every 15 or 20 minutes.
Page 26
/ 10 … Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) Special values 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE and 0xFFFF are error codes to be communicated to Fludia for support. Decoding FM432ir_nc_1mn messages Page 26 / 76...
7.3.3 Byte structure Byte #9 #10 #11 #40 #41 #42 #43 #44 #45 Signification Header Index P(t0) P(t1) P(t2) P(t17) P(t18) P(t19) 7.3.4 Header Header value (Hexa) Signification 1 min time step 7.3.5 Index calculation The index can be obtained this way: Index = (Byte_2 * 2^24) + (Byte_3 * 2^16) + (Byte_4 * 2^8) + Byte_5 Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) 7.3.6...
Page 29
Time-step Byte Value Signification 1-minute time step Type of measure Byte Value Signification E-POS values (OBIS code 1.8.0) E-SUM values (OBIS code 16.8.0) E-NEG values (OBIS code 2.8.0) Forced Type? Byte Value Signification Type of measure hasn’t been forced via a downlink since starting up Type of measure has been forced via a downlink since starting up Firmware version Byte...
Service message (T2) structure in the case of an electromechanical meter The T2 data message transmits technical information about the sensor (firmware, battery status indicator) and reminder of key values (index and time-step). The T2 data message is sent on sensor start and then every 24 hours.
Code examples We present examples of codes that perform the calculation for the index and for the power values, in the case of an infrared meter (mME). Examples of codes for the electromechanical meter are identical to the FM432e case (see chapter 5.4). 7.6.1 Python code example #!/usr/bin/env python...
Page 32
7.6.2 PHP code example <?php // return index from T1 payload function decode_index($payload) $signed = hexdec(substr($payload,6,2)); if($signed){ //s is for signed values on 16 bits see https://www.php.net/manual/fr/function.pack.php $str = substr($payload,8,16); $temp = unpack('J', pack("H*", $str)); $index = reset($temp); }else{ $index = hexdec(substr($payload,8,16));...
Page 33
echo "Index: ".$index."\n"; echo "Step: ".$step."\n"; foreach ($list_increment $value) echo $value. "\n"; // Power conversion / $step; $list_power = []; = 0; foreach ($list_increment $increment) //iteration over the increment if($increment != null) $list_power[$i] = round($increment*$n,2); //fills power list else $list_power[$i] = null; $i++;...
8. Decoding FM432ir_nc_15mn Types of messages Time-step Message Type 15 minutes Every 2 hours Data message (T1) (8 x 15 minutes) Service message (T2) Every 24 hours FM432ir_nc_15mn generates two kinds of messages: • T1: contains eight successive values and the last index. It is generated every 2 hours. The successive values are index increments.
Page 36
Increment(t2) = ((Byte_16 * 2^8) + Byte_17) / 10 … Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) Special values 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE and 0xFFFF are error codes to be communicated to Fludia for support. Decoding FM432ir_nc_15mn Page 36 / 76...
8.2.9 Example Given the following T1 message for a 15 minutes time-step sensor: F02F 0F 00 0000000000107900 0A0A 0A0B … 0E17 0C11 The decoded values should be: Byte #9 #10 #11 #12 #13 #14 #15 #16 #25 #26 #27 Signification Header* Time Sign Index...
8.3.5 Index calculation The index can be obtained this way: Index = (Byte_2 * 2^24 ) + (Byte_3 * 2^16 ) + (Byte_4 * 2^8 ) + Byte_5 Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) 8.3.6 Increment calculation Increment values are labelled (t0) to (t7) and represent successive increments.
Page 39
Forced Type? Byte Value Signification Type of measure hasn’t been forced via a downlink since starting up Type of measure has been forced via a downlink since starting up Firmware version Byte Value Signification Optical head firmware version Sensor sensitivity Byte Value Signification...
Service message (T2) structure in the case of an electromechanical meter The T2 data message transmits technical information about the sensor (firmware, battery status indicator) and reminder of key values (index and time-step). The T2 data message is sent on sensor start and then every 24 hours.
Code examples We present examples of codes that perform the calculation for the index and for the power values, in the case of an infrared meter (mME). Examples of codes for the electromechanical meter are identical to the FM432e case (see chapter 5.4). 8.6.1 Python code example #!/usr/bin/env python...
Page 42
8.6.2 PHP code example <?php // return index from T1 payload function decode_index($payload) $signed = hexdec(substr($payload,6,2)); if($signed){ //s is for signed values on 16 bits see https://www.php.net/manual/fr/function.pack.php $str = substr($payload,8,16); $temp = unpack('J', pack("H*", $str)); $index = reset($temp); }else{ $index = hexdec(substr($payload,8,16));...
Page 43
foreach ($list_increment $value) echo $value. "\n"; // Power conversion / $step; $list_power = []; = 0; foreach ($list_increment $increment) //iteration over the increment if($increment != null) $list_power[$i] = round($increment*$n,2); //fills power list else $list_power[$i] = null; $i++; echo "List of power values in W: \n";...
9. Decoding FM432g_nc_10mn et FM432g_nc_15mn Types of messages Sensor version 10 minutes 15 minutes 1 hour Every 80 minutes Every 2 hours Every 8 hours Data message (T1) (8 x 10 minutes) (8 x 15 minutes) (8 x 1 hour) Service message (T2) Every 24 hours Every 24 hours...
Number of starts Byte Signification Number of starts since initial configuration (= number of times the sensor is unplugged from the radio module) Time synchronization information Byte Signification 1 - 7 Jitter (in seconds) Synchro querying (needs specific implementation on the server side): 0 = no synchro querying 1 = synchro querying...
Code examples We present examples of codes that perform the calculation for the index and for the increments. 9.5.1 Python code example #!/usr/bin/env python # -*- coding: utf-8 -*- # return index from T1 payload decode_index(payload): len(payload) == 40: index = int(payload[2:8],16) return index...
10. Decoding FM432p-(a n)_nc_1mn 10.1 Types of messages Time-step Message Type 1 minute Every 20 minutes Data message (T1) (20 x 1 minute) Service message (T2) Every 24 hours FM432p-(a n)_nc_1mn generates two kinds of messages: • T1: contains twenty successive values and the last index. It is generated every 20 minutes. The successive values are index increments.
10.2.5 Index calculation The index can be obtained this way: Index = (Byte_2 * 2^16) + (Byte_3 * 2^8) + Byte_4 Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) 10.2.6 Increment values calculation Increment values are labelled (t0) to (t19) and represent successive increments. The formulas for obtaining increment values are: Incr(t0) = (Byte_5 * 2^8) + Byte_6 Incr(t1) = (Byte_7 * 2^8) + Byte_8...
Long index Bytes Index calculation #5, #6, #7, #8 Index = (Byte_#5 * 2^24 ) + (Byte_#6 * 2^16 ) + (Byte_#7 * 2^8 ) + Byte_#8 Number of increment values in T1 Byte Value (Hexa) Signification 20 increment values in each T1 message Time step Byte Value (Hexa)
11. Decoding FM432p-(a n)_nc_10mn and FM432p-(a n)_nc_15mn 11.1 Types of messages Sensor version 10 minutes 15 minutes 1 hour Every 80 minutes Every 2 hours Every 8 hours Data message (T1) (8 x 10 minutes) (8 x 15 minutes) (8 x 1 hour) Service message (T2) Every 24 hours...
11.2.4 Header * Header values (Hexa) Signification 10-min time step 15-min time step 1-hour time step 11.2.5 Index calculation The index can be obtained this way: Index = (Byte_2 * 2^16 ) + (Byte_3 * 2^8 ) + Byte_4 Make sure to first convert from hexadecimal to decimal: Byte_i <= hex2dec(Byte_i) 11.2.6 Increment calculation Increment values are labelled (t0) to (t7) and represent successive increments.
Firmware version Bytes Value example (to be considered as ASCII) Signification #2, #3, #4 33, 31, 36 33 is ASCII code for 3, 31 is ASCII code for 1, 36 is ASCII code for 6. So, in this example the firmware version is 3.1.6 Long index Bytes Index calculation...
Page 59
11.4.2 PHP Code example <?php // return index from T1 payload function decode_index($payload) $index = hexdec(substr($payload,2,6)); return $index; // return increment_hex from T1 payload function payload_to_hex($payload) if(strlen($payload) == 40) = 0; < 16; $i++) $increment_hex[$i] = substr($payload,8 * $i,2); return $increment_hex;...
Page 60
list_increment_hex = [] (payload.length == 40){ for(i=0;i<16;i++){ list_increment_hex.push(payload.substring((8+2*i),2+(8+2*i))) return list_increment_hex //return power list from T1 payload function decode_list_increment(payload) { list_increment = [] list_increment_hex = [] (payload.length == 40){ list_increment_hex = payload_to_hex(payload) if(list_increment_hex.length == 16){ for(i=0;i<8;i++){ list_increment.push(parseInt(list_increment_hex[i*2]+list_increment_hex[i*2+1], 16)) return list_increment //return step from T1 payload function decode_step(payload){ step...
12. Decoding FM432t_nc_1mn 12.1 Types of messages Time-step Message Type 1 minute Every 20 minutes Data message (T1) (20 x 1 minute) Service message (T2) Every 24 hours FM432t_1mn generates two kinds of messages: • T1: contains twenty successive values. It is generated every 20 minutes. The successive values are temperatures.
Max Temp variation Bytes Value example (signed hexadecimal) Signification #6, #7 FDEA Maximum Temperature variation between two successive measurements over the last 24 hours. Convert to decimal and divide by 100. Example: FF06 => -5.34°C (temperature drop of 5.34°C in one minute) Number of values in each T1 message Byte Value (Hexa)
13. Decoding FM432t_nc_10mn and FM432t_nc_15mn 13.1 Types of messages Sensor version 10 minutes 15 minutes Every 80 minutes Every 2 hours Data message (T1) (8 x 10 minutes) (8 x 15 minutes) Service message (T2) Every 24 hours Every 24 hours FM432t generates two kinds of messages: •...
13.2.5 Time-step Time-step (Hexa) Signification 10 minutes 15 minutes 13.2.6 Temperature calculation Temperature values are labelled (t0) to (t7). The formulas for obtaining Temperature values are: Increment(t0) = ((Byte_3 * 2^8) + Byte_4)/100 Increment(t1) = ((Byte_5 * 2^8) + Byte_6)/100 Increment(t2) = ((Byte_7 * 2^8) + Byte_8)/100 …...
Page 67
Max Temp variation Bytes Value example (Hexa) Signification #6, #7 FDEA Maximum Temperature variation between two successive measurements over the last 24 hours. Convert to decimal and divide by 100. Example: FF06 => -5.34°C (temperature drop of 5.34°C in one minute) Number of increment values in T1 Byte Value (Hexa)
13.4 Code examples We present examples of codes that perform the calculation for the temperature. 13.4.1 Python code example #!/usr/bin/env python # -*- coding: utf-8 -*- # return temperatures from T1 payload decode_temp(payload): len(payload) == 36: temp_hex [payload[(4 i):((4 + 2) + * i)] range(16)] list_temp...
Page 69
else echo "the payload has the wrong size \n"; ?> 13.4.3 JavaScript Code example //return hexadecimal temperature list from T1 payload function payload_to_hex(payload) { temp_list_hex = [] (payload.length == 36){ for(i=0;i<16;i++){ temp_list_hex.push(payload.substring((4+2*i),2+(4+2*i))) return temp_list_hex //return temperature list from T1 payload function decode_temp_list(payload) { temp_list...
14. Accessing the dashboard to check communication and data In case a callback has been set up to forward messages to Fludia data server, it is possible to access the dashboard with a Web browser, by typing the following URL: https://fm400-api.fludia.com/console...
15. Retrieving data from the server with the API In case a callback has been set up to forward messages to Fludia data server, it is possible to use Fludia API. The access is done through HTTPS with the following URL: https://fm430-api.fludia.com/v1/API/...
15.1 Device list request GET https://fm430-api.fludia.com/v1/API/FM400 returns the list of devices (Last 8 characters of the device ID), the timestamp of the last received message for each device and some additional attributes. Result example: "Nom": "", "SerialNumber": "a000596c", "Type": "FM430", "Type_decodage": "V2",...
This constant can be set through the API (for example to take into account the constant of an electromechanical meter in Wh per disk turn). Default value is 1. 15.2 Interval data request https://fm430-api.fludia.com/v1/API/pxm/SerialNumber[?limit=n[&tsDeb=x&tsFin=x]&show_missing=true] Input data SerialNumber...
(pulse detection): the value is the number of pulses detected over the time step Température (temperature): the value is the average temperature over the time step 15.3 Index data https://fm430-api.fludia.com/v1/API/index_brut/SerialNumber[?limit=n[&tsDeb=x&tsFin=x]] Input data SerialNumber limit...
(pulse detection): the value is the cumulative number of pulses since installation Température (temperature): the value is the average temperature over the time step 15.4 Message list https://fm430-api.fludia.com/v1/API/trames?SerialNumber=SerialNumber[&limit=n&offset=m] Input data SerialNumber limit...
17. Annex A: product references and what they mean FM432e: electricity meter optical reading • Ref: FM432e_nc_1mn => no compression, average power measured over 1 minute; message sent every 20 minutes including 20 values • Ref: FM432e_nc_10mn => no compression, average power measured over 10 minutes; message sent every 80 minutes including 8 values •...