User Tools

Site Tools


public:application:diehl_scylar_m15_diehl_sharky_calorimeter_reading_via_m-bus_to_nb-iot_converter

Diehl Scylar M15 and Diehl Sharky calorimetr - remote reading via M-Bus to NB-IoT converter



ACR-CV-101N-M-D
Diehl Scylar M15

Introduction

Application note aims to help you with implementation of Diehl Scylar M15 and Diehl Sharky calorimeter and sending a readings every 5 minutes via NB-IoT network.


Task

For this task, the default LUA script will be used. We will be continuously reading values from the calorimeter and will send them every 5 minutes to test the reliability of frequent readings. The calorimeter should communicate with our converter with using default LUA script and no custom implementation should be needed.


Hardware

This application can be implemented using ACR-CV-101N-M-D (D2, EAC or EDC also available).

ACR-CV-101L-M-D (D2, EAC or EDC also available) can be also used to read the M-Bus values and send them via NB-IoT network.

The calorimeter itself is: “SCYLAR INT 8 is a high-precision calculator designed to meet European standards. It measures heating, cooling energy and can be used in combined mode too. SCYLAR INT 8 enables the utility to monitor and optimize its metering remotely; it can be directly connected to a Centralized Technical Management unit, to provide large quantities of instant or saved parameters.” - source.

ACR-CV-101N-M-D


Deafult LUA script

-----------------------
--- CONFIGURATION -----
-----------------------
----- NB-IoT ----------
APN = "nb.m2mc"
PLMNID = "23003"
protocol = "UDP"	-- UDP or TCP
ip = "192.168.0.20"
port = 4242
receiveTimeout = 500 -- the maximum execution time in milliseconds
----- M-BUS -----------
baudrate = 2400		-- baudrate: up to 921600 baud
parity = 2			-- communication parity: 0 for none, 1 for odd and 2 for even parity
stopBits = 1		-- number of stop bits: 1 or 2
dataBits = 8		-- number of data bits: 7 or 8
------ Timing ---------
-- device wakeup interval
periodHours = 2
periodMinutes = 30
-----------------------
-----------------------
-- CONFIGURATION END --
-----------------------

function onWake ()

    -- set link parameters - 2400 baud, 8E1
    api.mbusSetup(baudrate,parity,stopBits,dataBits)
    api.mbusState(1)
    api.delayms(2000)


    -- CREATE MBUS QUERY --
    -- UD2
    --b=pack.pack('<b5', 0x10, 0x5B, 0xFE, 0x59, 0x16)
    b=pack.pack('<b5', 0x10, 0x7B, 0xFE, (0x7B+0xFE)%256, 0x16)
    status,c,a,ci,ans = api.mbusTransaction(b,3000,1)
    api.mbusState(0)

    print("From MBus Calorimeter: ")

    api.dumpArray(ans)
    
    if #ans < 1 then
        buf = "NO DATA RECEIVED"
    else
        buf = ans
    end

    print("To NBIOT: ")

    api.dumpArray(buf)

    print("Sending to NB-IoT")
    api.nbSend(ip, port, buf, receiveTimeout, protocol)
    
    print("Done sending")
    print("Sleep now, wake in " .. tostring(periodHours) .. "hrs:" .. tostring(periodMinutes) .. "mins.....")

    api.wakeUpIn(0,periodHours,periodMinutes,0)
end

function onStartup()
    print("Starting up NB-IoT default script with APN settings")

    result = api.nbAT("AT*MCGDEFCONT=\"IP\",\"" .. APN .."\"", 5000, 1)
    print("APN result: " .. result)

    result = api.nbAT("AT+COPS=1,2,\"" .. PLMNID .."\"", 5000, 1)
    print("PLMNID result: " .. result)


end

Deafult LUA script answer

NBIOT: module setup done successfully!
SYS: --- New request ---
SYS: Battery Voltage: 3622 mV
LUA: starting lua script version 1
LUA: Starting onWake() script
MBUS: sending command with size of 5 bytes
~>From MBus Calorimeter: 

	00 : 56 20 56 51 A5 11 A0 0C 0D 00 00 00 0C 0F 91 01 
	10 : 00 00 8C 10 0F 00 00 00 00 8C 20 14 50 96 48 00 
	20 : 0C 14 40 04 00 00 0C 2B 00 00 00 00 0B 3B 00 00 
	30 : 00 0A 5A 18 12 0A 5E 14 01 0A 62 03 11 0A 27 87 
	40 : 17 04 6D 3B 14 99 23 4C 0F 91 01 00 00 4C 14 40 
	50 : 04 00 00 CC 10 0F 00 00 00 00 CC 20 14 50 96 48 
	60 : 00 42 6C 7F 25 42 EC 7E 9F 25 CC 01 0F 91 01 00 
	70 : 00 CC 01 14 40 04 00 00 CC 11 0F 00 00 00 00 CC 
	80 : 21 14 50 96 48 00 C2 01 6C 7F 2C C2 01 EC 7E 9F 
	90 : 2C 

~>To NBIOT: 

	00 : 56 20 56 51 A5 11 A0 0C 0D 00 00 00 0C 0F 91 01 
	10 : 00 00 8C 10 0F 00 00 00 00 8C 20 14 50 96 48 00 
	20 : 0C 14 40 04 00 00 0C 2B 00 00 00 00 0B 3B 00 00 
	30 : 00 0A 5A 18 12 0A 5E 14 01 0A 62 03 11 0A 27 87 
	40 : 17 04 6D 3B 14 99 23 4C 0F 91 01 00 00 4C 14 40 
	50 : 04 00 00 CC 10 0F 00 00 00 00 CC 20 14 50 96 48 
	60 : 00 42 6C 7F 25 42 EC 7E 9F 25 CC 01 0F 91 01 00 
	70 : 00 CC 01 14 40 04 00 00 CC 11 0F 00 00 00 00 CC 
	80 : 21 14 50 96 48 00 C2 01 6C 7F 2C C2 01 EC 7E 9F 
	90 : 2C 

~>Sending to NB-IoT
NBIOT: Signal level 24.
NBIOT: No return data
~>Done sending
~>Sleep now, wake in 0hrs:3mins.....

How to get answer via debug mode on GUI

1. Connect the device to GUI
2. Turn on the debug mode
3. Send:

baudrate = 2400
parity = 2
stopBits = 1		
dataBits = 8		
 
 api.mbusSetup(baudrate,parity,stopBits,dataBits)
    api.mbusState(1)
    api.delayms(2000)

b=pack.pack('<b5', 0x10, 0x7B, 0xFE, (0x7B+0xFE)%256, 0x16)
    status,c,a,ci,ans = api.mbusTransaction(b,3000,1)
    api.mbusState(0)

    print("From MBus Calorimeter: ")

    api.dumpArray(ans)

4. The answer will be the M-Bus frame:



Proof of communication every 5 minutes on server side

Oct 09 16:12:10 challenger python[31631]: 2020-10-09 16:12:10 diff = 05:07  :  received message from:  ('46.234.125.38', 43069) in hex:  56205651A511A00C0F0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A16120A5E14010A6201110A278717046D0A1599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:17:16 challenger python[31631]: 2020-10-09 16:17:16 diff = 05:05  :  received message from:  ('46.234.125.38', 35917) in hex:  56205651A511A00C100000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A17120A5E14010A6203110A278717046D0F1599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:22:22 challenger python[31631]: 2020-10-09 16:22:22 diff = 05:05  :  received message from:  ('46.234.125.38', 52355) in hex:  56205651A511A00C110000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6203110A278717046D141599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:27:28 challenger python[31631]: 2020-10-09 16:27:28 diff = 05:05  :  received message from:  ('46.234.125.38', 59365) in hex:  56205651A511A00C120000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6204110A278717046D191599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:32:34 challenger python[31631]: 2020-10-09 16:32:34 diff = 05:06  :  received message from:  ('46.234.125.38', 40448) in hex:  56205651A511A00C130000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6204110A278717046D1E1599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:37:40 challenger python[31631]: 2020-10-09 16:37:40 diff = 05:05  :  received message from:  ('46.234.125.38', 58936) in hex:  56205651A511A00C140000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A16120A5E13010A6203110A278717046D231599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:42:45 challenger python[31631]: 2020-10-09 16:42:45 diff = 05:05  :  received message from:  ('46.234.125.38', 47124) in hex:  56205651A511A00C150000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A17120A5E14010A6203110A278717046D291599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:47:52 challenger python[31631]: 2020-10-09 16:47:52 diff = 05:06  :  received message from:  ('46.234.125.38', 42345) in hex:  56205651A511A00C160000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6203110A278717046D2E1599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:52:58 challenger python[31631]: 2020-10-09 16:52:58 diff = 05:05  :  received message from:  ('46.234.125.38', 60173) in hex:  56205651A511A00C170000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A19120A5E15010A6204110A278717046D331599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 16:58:04 challenger python[31631]: 2020-10-09 16:58:04 diff = 05:05  :  received message from:  ('46.234.125.38', 41933) in hex:  56205651A511A00C180000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A17120A5E14010A6202110A278717046D381599234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:03:10 challenger python[31631]: 2020-10-09 17:03:10 diff = 05:05  :  received message from:  ('46.234.125.38', 49912) in hex:  56205651A511A00C190000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A19120A5E14010A6204110A278717046D011699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:08:16 challenger python[31631]: 2020-10-09 17:08:16 diff = 05:06  :  received message from:  ('46.234.125.38', 49858) in hex:  56205651A511A00C1A0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A17120A5E13010A6203110A278717046D061699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:13:22 challenger python[31631]: 2020-10-09 17:13:22 diff = 05:05  :  received message from:  ('46.234.125.38', 46607) in hex:  56205651A511A00C1B0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6204110A278717046D0B1699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:18:28 challenger python[31631]: 2020-10-09 17:18:28 diff = 05:05  :  received message from:  ('46.234.125.38', 42422) in hex:  56205651A511A00C1C0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A16120A5E14010A6202110A278717046D101699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:23:34 challenger python[31631]: 2020-10-09 17:23:34 diff = 05:05  :  received message from:  ('46.234.125.38', 53981) in hex:  56205651A511A00C1D0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6204110A278717046D151699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C
Oct 09 17:28:40 challenger python[31631]: 2020-10-09 17:28:40 diff = 05:05  :  received message from:  ('46.234.125.38', 58891) in hex:  56205651A511A00C1E0000000C0F910100008C100F000000008C2014509648000C14400400000C2B000000000B3B0000000A5A18120A5E14010A6203110A278717046D1A1699234C0F910100004C1440040000CC100F00000000CC201450964800426C7F2542EC7E9F25CC010F91010000CC011440040000CC110F00000000CC211450964800C2016C7F2CC201EC7E9F2C

Remote readings via integrated module

ENBRA LORAEN-1 and NARBEN-1

The extension module can be integrated within the calorimeter, that add the option to send measured data over the LoRaWAN or NB-IoT network. Such a module is available only for Sharky 775 and Scylar INT8 calorimeter and is sold by ENBRA company. The development of this module was done by Acrios Systems s.r.o.

Possible adjustments

Since the NB-IoT network should be used with minimum data transfers possible, we recommend to use the built-in possibility of our converters to use internal logic for basic operation. What it means is, that you can set-up different alarm thresholds and have only relevant information being sent. Or you can send only specific positions from M-Bus data frame. Feel free to contact us with your project and we will be happy to offer you bespoke solution based on our products.

public/application/diehl_scylar_m15_diehl_sharky_calorimeter_reading_via_m-bus_to_nb-iot_converter.txt · Last modified: 2020/10/12 08:02 by Acrios Admin