# ZENNER EASY PROTECT Radio decoder

**URL:** <https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486>\
**Category:** Hardware\
**Created:** [October 20, 2022, 12:10am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486 "2022-10-20T00:10:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![HSN-TTN](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/hsn-ttn/32/46690_2.png) [@HSN-TTN](https://www.thethingsnetwork.org/forum/u/HSN-TTN)\
**Post date:** [October 20, 2022, 12:10am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/1 "2022-10-20T00:10:02Z")

</div>

Good morning,  
I am looking for a TTN decoder for the ZENNER EASY PROTECT radio.  
Unfortunately I am not so well versed that I can create this asu the instructions myself.  
I’ve found 2 on the net, but unfortunately they don’t work for me.  
Does anyone have this in operation and a working decoder to hand that I can use?  
Thanks

---

<div class="post-metadata">

**Author:** ![MarcVanBracht](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marcvanbracht/32/44818_2.png) [@MarcVanBracht](https://www.thethingsnetwork.org/forum/u/MarcVanBracht)\
**Post date:** [October 26, 2022, 10:29am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/2 "2022-10-26T10:29:36Z")

</div>

I use this one:

/\*

- studierendenwerk-ulm/payload-decoder-zenner-easy-protect-radio-lora/master/decoder.js  
\*/

/\*\*

- Main decoder function

- @param bytes

- @param port

- @constructor  
_/  
function Decoder(bytes, port) {  
if(bytes === null || bytes === 0){  
 [//obj.port](https://obj.port) = port;  
obj.status\_dedcoded = false;  
obj.status\_info = "payload\_raw: " + payloadRawHexToString(bytes);  
} else {  
// Definition of head line daily value.  
/_ let S\_SMOKE\_CHAMBER\_POLLUTION\_PREWARNING = 0x0800;  
let S\_SMOKE\_CHAMBER\_POLLUTION\_WARNING = 0x1000;  
let S\_TEST\_BUTTON\_FAILUER = 0x2000;  
let S\_ACCUSTIC\_ALARM\_FAILUER = 0x4000;  
let S\_REMOVAL\_DETECTION = 0x8000;  
let S\_TEST\_ALARM = 0x0001;  
let S\_SMOKE\_ALARM = 0x0002;  
let S\_OBSTRUCTION\_DETECTION = 0x0004;  
let S\_SURROUNDING\_AREA\_MONITORING = 0x0008;  
let S\_LED\_FAILURE = 0x0010;\*/

/\*\*

- decodes date (EN13757-3:2013, Annex A, data type G).
- input: int, lower two bytes interpreted.
- output: date string YYYY-MM-DD.
- @param bytes
- @returns {string}  
\*/  
function decodeDate(bytes) {  
//TODO Handling errors with 0xFF see LoRa radio packet definitions page 15  
var day = (bytes & 0x1F00) \>\> 8;  
var month = (bytes & 0x000F);  
var year = ((bytes & 0xE000) \>\> 10) | ((bytes & 0x00F0) \>\> 4);  
return “20” + year.toString() + “-” + month.toString() + “-” + day.toString();  
}

/\*\*

- Date and time format.
- Date&Time stamp coding according to EN13757-3:2013, Annex A, data type F
- @param bytes
- @returns {string}  
\*/  
function decodeDateAndTime(bytes) {  
var minute = (bytes & 0x3F000000) \>\> 24;  
var hour = (bytes & 0x001F0000) \>\> 16;  
var day = (bytes & 0x00001F00) \>\> 8;  
var month = (bytes & 0x0000000F);  
var year = ((bytes & 0x0000E000) \>\> 10) | ((bytes & 0x000000F0) \>\> 4);  
return “20” + year.toString() + “-”  
+ month.toString() + “-”  
+ day.toString() + “T”  
+ hour.toString() + “:”  
+ minute.toString()  
+ “:00Z”;  
}

/\*\*  
\*

- @param byteArray
- @returns {string}  
\*/  
function payloadRawHexToString(byteArray) {  
var str;  
if(byteArray === null){  
return “00”;  
}else {  
str = byteArray.map(function (byte) {  
return (‘0’ + (byte & 0xFF).toString(16)).slice(-2);  
}).join(‘’);  
var strArray = str.match(/.{2}/g);  
str = strArray.map(function (value, index, array) {  
return array[index];  
});  
var x = str.join();  
return x.replace(/([,])/g, " ").toLocaleUpperCase();  
}  
}

/\*\*

- Build the summary for package 9.1.

- @param a

- @param b

- @param S\_STATUS\_SUMMERY\_VALUES

- @returns {}  
\*/  
function buildStatusSummery(a, b,S\_STATUS\_SUMMERY\_VALUES) {

---

<div class="post-metadata">

**Author:** ![MarcVanBracht](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marcvanbracht/32/44818_2.png) [@MarcVanBracht](https://www.thethingsnetwork.org/forum/u/MarcVanBracht)\
**Post date:** [October 26, 2022, 10:31am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/3 "2022-10-26T10:31:38Z")

</div>

But I do not get the data correcly into Datacake…as I do not have the knowledge of java, databases and decoding the info

---

<div class="post-metadata">

**Author:** ![HSN-TTN](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/hsn-ttn/32/46690_2.png) [@HSN-TTN](https://www.thethingsnetwork.org/forum/u/HSN-TTN)\
**Post date:** [October 26, 2022, 4:13pm UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/4 "2022-10-26T16:13:16Z")

</div>

Can you please the complete payload in code.  
I can not copy it.  
THX

---

<div class="post-metadata">

**Author:** ![MarcVanBracht](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marcvanbracht/32/44818_2.png) [@MarcVanBracht](https://www.thethingsnetwork.org/forum/u/MarcVanBracht)\
**Post date:** [October 27, 2022, 4:45pm UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/5 "2022-10-27T16:45:51Z")

</div>

Hi ,  
how do I do that…?  
Marc

---

<div class="post-metadata">

**Author:** ![HSN-TTN](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/hsn-ttn/32/46690_2.png) [@HSN-TTN](https://www.thethingsnetwork.org/forum/u/HSN-TTN)\
**Post date:** [October 28, 2022, 4:05am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/6 "2022-10-28T04:05:47Z")

</div>

Write in a File und Upload here.  
This is the best way.

---

<div class="post-metadata">

**Author:** ![MarcVanBracht](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marcvanbracht/32/44818_2.png) [@MarcVanBracht](https://www.thethingsnetwork.org/forum/u/MarcVanBracht)\
**Post date:** [October 28, 2022, 4:48am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/7 "2022-10-28T04:48:20Z")

</div>

Hi HSN-TTN

attached the file  
[Zenner.txt](https://www.thethingsnetwork.org/forum/uploads/short-url/lgp95HVUbFHZNnkCAMceb1GTbS.txt) (9.1 KB)

Let me know if you can download the file

Best  
Marc

---

<div class="post-metadata">

**Author:** ![HSN-TTN](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/hsn-ttn/32/46690_2.png) [@HSN-TTN](https://www.thethingsnetwork.org/forum/u/HSN-TTN)\
**Post date:** [April 11, 2023, 4:12am UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/8 "2023-04-11T04:12:51Z")

</div>

Hello,  
Unfortunately I only got around to testing now.  
But the payload only brings me:  
Decode uplink data message failure

---

<div class="post-metadata">

**Author:** ![tom1000](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/t/6f9a4e/32.png) [@tom1000](https://www.thethingsnetwork.org/forum/u/tom1000)\
**Post date:** [July 20, 2024, 3:35pm UTC](https://www.thethingsnetwork.org/forum/t/zenner-easy-protect-radio-decoder/59486/9 "2024-07-20T15:35:53Z")

</div>

Just an update on this old thread, my ZENNER devices seem to work fine with TTN and I just share my experience here:

- I bought 8 of the Zenner Easy Protect Radio LoRaWAN directly from here:  
[ZENNER LoRaWAN® Rauchwarnmelder EASY PROTECT RADIO](https://iot.zenner.shop/ZENNER-LoRaWAN-Rauchwarnmelder-EASY-PROTECT-RADIO-p-160928)
- On the delivery note (only the paper version in the parcel!), I automatically received a password for a portal website where I can see and download meta data including the EUIs, AppKey, FW-Version, LoRaWan version, etc.
- As soon as I mounted the devices on the base plate, the devices turned on and I was able to join the devices to TTN via OTAA.
- As payload formatter I use: [loracodede/lorawan\_payload\_decoder: This project provides a collection of LoRaWAN payload decoders designed to interpret and transform data transmitted over the LoRaWAN (Long Range Wide Area Network) into a human-readable format. The decoder facilitates the integration of LoRaWAN into various applications. - Codeberg.org](https://codeberg.org/loracodede/lorawan_payload_decoder)
- Every night the devices send a status message. If I remove a device it sends an “Alert” status message before it turns off. I did not test any other alert type yet.
