# Problems sending boolean values to TTN

**URL:** <https://discourse.nodered.org/t/problems-sending-boolean-values-to-ttn/79606>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, function-node, mqtt\
**Created:** [5 July 2023 17:48 UTC](https://discourse.nodered.org/t/problems-sending-boolean-values-to-ttn/79606 "2023-07-05T17:48:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [5 July 2023 17:48 UTC](https://discourse.nodered.org/t/problems-sending-boolean-values-to-ttn/79606/1 "2023-07-05T17:48:24Z")

</div>

Hello everyone,

I am realizing a Dashboard application for smart irrigation where I use LoRa as communication.

I am trying to send a command to open and close a solenoid valve to my end node, although I want it to appear in TTN first.  
I decided to use boolean values to open and close the solenoid valve. The question is that I can send to TTN "true" values but not "false" values. I have tried to inject the "false" value directly and nothing, I have tried to inject a ramdon value too and here it works as well as with "true" values that I receive them. That is, all values are received except the value "false".

This is the function I use for the MQTT Out:

```auto
return {
    "payload": {
        "downlinks": [{
            "f_port": 1,
            "frm_payload": msg.payload.toString("base64"),
            "priority": "NORMAL"
        }]
    }
}

```

It is the same used for the node to send "true" values and I have obtained it directly from TTN.

What can happen?

Best regards, thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 August 2023 17:49 UTC](https://discourse.nodered.org/t/problems-sending-boolean-values-to-ttn/79606/2 "2023-08-04T17:49:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
