# Encoding downlink

**URL:** <https://www.thethingsnetwork.org/forum/t/encoding-downlink/47364>\
**Category:** Uncategorized\
**Created:** [May 3, 2021, 9:39pm UTC](https://www.thethingsnetwork.org/forum/t/encoding-downlink/47364 "2021-05-03T21:39:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rikietje](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/rikietje/32/39322_2.png) [@rikietje](https://www.thethingsnetwork.org/forum/u/rikietje)\
**Post date:** [May 3, 2021, 9:39pm UTC](https://www.thethingsnetwork.org/forum/t/encoding-downlink/47364/1 "2021-05-03T21:39:37Z")

</div>

Hello,

I’m following the tutorial: [https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/](https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/)

I’m trying to write a payload encoder to send a downlink message to my device.

The downlink encode example with the collor array doesn’t seem to work for me.  
I have the impression that I cannot read the json data entry.  
See my example:  
 ![ttnexample](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/4/4/445e7894c89085113c950bb00a2733882b06013c.png)

Whatever I try, even the exact code from the example, I seem to not be able to read the input data (input.data.color (or input.data.settings\_id in this case))

I only get 00 as an respsonse

![ttn_example2](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/4/2/42b1d0914d93e4dc8f33e4fcb9fe6de8e51bf738.png)  
See here my second example trying the tutorial code.  
No matter what color, string or even number I put in I will just get FF as a response

I was hoping someone could help me out on what I’m missing out on! Thanks

---

<div class="post-metadata">

**Author:** ![fastlock](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/fastlock/32/35697_2.png) [@fastlock](https://www.thethingsnetwork.org/forum/u/fastlock)\
**Post date:** [October 7, 2021, 10:07am UTC](https://www.thethingsnetwork.org/forum/t/encoding-downlink/47364/2 "2021-10-07T10:07:14Z")

</div>

Same situation here,downlink is broken?
