# Http request tuya

**URL:** <https://community.homey.app/t/http-request-tuya/86403>\
**Category:** Questions & Help\
**Created:** [August 7, 2023, 11:39am UTC](https://community.homey.app/t/http-request-tuya/86403 "2023-08-07T11:39:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthieu\_Moreau](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/matthieu_moreau/32/57526_2.png) [@Matthieu\_Moreau](https://community.homey.app/u/Matthieu_Moreau)\
**Post date:** [August 7, 2023, 11:39am UTC](https://community.homey.app/t/http-request-tuya/86403/1 "2023-08-07T11:39:07Z")

</div>

Hello everyone,

I would like to retrieve a value in Tuya, I have this request 🙂

```auto
curl --request GET "https://openapi.tuyaeu.com/v2.0/cloud/thing/XXXXXX/shadow/properties" --header "sign_method: HMAC-SHA256" --header "client_id: m83ffyg8rnhtpaeehum8" --header "t: 1691407832536" --header "mode: cors" --header "Content-Type: application/json" --header "sign: A582031913926966F2F658329CDE32F16B78189BBCC" --header "access_token: 09a207c817ae722c325322" 

```

And this answer

```auto
{
  "result": {
    "properties": [
      {
        "code": "Temp",
        "custom_name": "",
        "dp_id": 101,
        "time": 1691400091874,
        "value": 18
      },
      {
        "code": "Moisure",
        "custom_name": "",
        "dp_id": 102,
        "time": 1691400091938,
        "value": 33
      },
      {
        "code": "Flow",
        "custom_name": "",
        "dp_id": 103,
        "time": 1691401804045,
        "value": 1
      },
      {
        "code": "Rain",
        "custom_name": "",
        "dp_id": 104,
        "time": 1691399102097,
        "value": false
      },
      {
        "code": "BatteryCapacity",
        "custom_name": "",
        "dp_id": 105,
        "time": 1691399126451,
        "value": "2"
      },
      {
        "code": "WorkStatus",

I would like to store the value of Moisure in a variable but I don't know how.

Could you help me ?

        "custom_name": "",
        "dp_id": 106,
        "time": 1691401776444,
        "value": "0"
      },
      {
        "code": "ManualTimer",
        "custom_name": "",
        "dp_id": 107,
        "time": 1691399126642,
        "value": 59
      },
      {
        "code": "ManualSwitch",
        "custom_name": "",
        "dp_id": 108,
        "time": 1691401776380,
        "value": true
      },
      {
        "code": "LeftTime",
        "custom_name": "",
        "dp_id": 109,
        "time": 1691399102097,
        "value": 0
      },
      {
        "code": "Timer1",
        "custom_name": "",
        "dp_id": 110,
        "time": 1691400899261,
        "value": "ABUeABT+AAAAAAA="
      },
      {
        "code": "Timer2",
        "custom_name": "",
        "dp_id": 111,
        "time": 1691400999016,
        "value": "AAAAAAAAAAAAAAA="
      },
      {
        "code": "Timer3",
        "custom_name": "",
        "dp_id": 112,
        "time": 1691400535291,
        "value": "AAAAAAAAAAAAAAA="
      },
      {
        "code": "TimerDelay",
        "custom_name": "",
        "dp_id": 113,
        "time": 1691399126820,
        "value": "0"
      },
      {
        "code": "TimeFormat",
        "custom_name": "",
        "dp_id": 114,
        "time": 1691399102097,
        "value": "12"
      },
      {
        "code": "AddMoisureSensor",
        "custom_name": "",
        "dp_id": 115,
        "time": 1691399440267,
        "value": true
      },
      {
        "code": "AddRainSensor",
        "custom_name": "",
        "dp_id": 116,
        "time": 1691399127058,
        "value": false
      },
      {
        "code": "MoisurePowerStatus",
        "custom_name": "",
        "dp_id": 117,
        "time": 1691399460122,
        "value": true
      },
      {
        "code": "RainPowerStatus",
        "custom_name": "",
        "dp_id": 118,
        "time": 1691399102097,
        "value": false
      },
      {
        "code": "TempFormat",
        "custom_name": "",
        "dp_id": 119,
        "time": 1691399102097,
        "value": "1"
      },
      {
        "code": "AlarmStatus",
        "custom_name": "",
        "dp_id": 120,
        "time": 1691399126707,
        "value": 0
      },
      {
        "code": "FlowCount",
        "custom_name": "",
        "dp_id": 121,
        "time": 1691406036584,
        "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
      },
      {
        "code": "TempCount",
        "custom_name": "",
        "dp_id": 122,
        "time": 1691406444107,
        "value": "Ehf/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"
      },
      {
        "code": "MoisureCount",
        "custom_name": "",
        "dp_id": 123,
        "time": 1691406444211,
        "value": "IQf/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"
      },
      {
        "code": "RainCount",
        "custom_name": "",
        "dp_id": 124,
        "time": 1691399102097
      },
      {
        "code": "Stopirrigation",
        "custom_name": "",
        "dp_id": 125,
        "time": 1691399126579,
        "value": false
      },
      {
        "code": "SYS_TIME",
        "custom_name": "",
        "dp_id": 126,
        "time": 1691399102097
      },
      {
        "code": "MCU_Version",
        "custom_name": "",
        "dp_id": 127,
        "time": 1691399519339,
        "value": "W433H101-098-054-000"
      },
      {
        "code": "next_time",
        "custom_name": "",
        "dp_id": 128,
        "time": 1691407764508,
        "value": "AAAAAAA="
      }
    ]
  },
  "success": true,
  "t": 1691407834333,
  "tid": "d2d810b8351511eebce64a9bf16c60a7"
}

```

I would like to store the value of Moisure in a variable but I don’t know how.

Could you help me ?

---

<div class="post-metadata">

**Author:** ![Matthieu\_Moreau](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/matthieu_moreau/32/57526_2.png) [@Matthieu\_Moreau](https://community.homey.app/u/Matthieu_Moreau)\
**Post date:** [August 7, 2023, 3:30pm UTC](https://community.homey.app/t/http-request-tuya/86403/2 "2023-08-07T15:30:12Z")

</div>

I tested this

```auto
let data;

fetch('https://openapi.tuyaeu.com/v2.0/cloud/thing/bf2e9d867ceacda506bu4r/shadow/properties?codes=Moisure', {
  headers: {
        'sign_method': 'HMAC-SHA256',
        'client_id': 'jyjyujryjryuj',
        't': '1691421950571',
        'mode': 'cors',
        'Content-Type': 'application/json',
        'sign': 'jujytujytujyu',
        'access_token': 'f700f011d1d8d5cef981f8f9ujyujuyjyu0bb4913a'
  }
})
    .then((response) => response.json())
    .then(_data => {
        data = _data;
    })
    .catch(error => {
        console.error(error);
    });

```

and i have this answer 🙂

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/3/b3b6e95016071dfe060d18bd01af5d669222e86c.png)

while in command prompt I have a response 🙂

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/1/119e7cddd2eb334543f3a1178f2fecb23b6a5e08.png)

---

<div class="post-metadata">

**Author:** ![Stugan\_Bjare](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stugan_bjare/32/80078_2.png) [@Stugan\_Bjare](https://community.homey.app/u/Stugan_Bjare)\
**Post date:** [July 30, 2025, 8:53pm UTC](https://community.homey.app/t/http-request-tuya/86403/3 "2025-07-30T20:53:40Z")

</div>

I bought six Danfoss Allys about a year ago. They have been constantly messing up. They make up values. You can’t trust them at all. Now I have bought a Tuya TRV06 to try by Homey 2023 pro. The thread above describes how to get the unit in, if I understand it correctly. This is very complex. Is there any kind soul who can write step by step instructions?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 30, 2025, 9:03pm UTC](https://community.homey.app/t/http-request-tuya/86403/4 "2025-07-30T21:03:39Z")

</div>

These can be found in Post 1 of the [Tuya Cloud app topic](https://community.homey.app/t/app-pro-tuya-cloud/21313). It’s quite a bit, but when you read and perform all steps to the letter, you should succeed.

The script(s) above can be replaced by using RAW Commands, as mentioned in the same post.

But maybe you can add the TRV’s as ‘thermostat’ device just give it a go.

If not, use the workarounds called _tap-to-run scenes_ (to control devices) and/or the aforementioned workaround RAW Commands (to control devices, and to receive device data, like room temperature)

---

<div class="post-metadata">

**Author:** ![Stugan\_Bjare](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stugan_bjare/32/80078_2.png) [@Stugan\_Bjare](https://community.homey.app/u/Stugan_Bjare)\
**Post date:** [July 31, 2025, 6:54pm UTC](https://community.homey.app/t/http-request-tuya/86403/5 "2025-07-31T18:54:19Z")

</div>

Thank you for answering. I will try to follow the steps.

---

<div class="post-metadata">

**Author:** ![Stugan\_Bjare](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stugan_bjare/32/80078_2.png) [@Stugan\_Bjare](https://community.homey.app/u/Stugan_Bjare)\
**Post date:** [August 14, 2025, 6:30pm UTC](https://community.homey.app/t/http-request-tuya/86403/6 "2025-08-14T18:30:49Z")

</div>

I feel like a loser in the competition of smart thinking. I had hoped for step-by-step instructions. I still haven’t managed to get permission from Tuya Cloud. I’m giving up. It is very disappointing. To get the flow going in the underfloor heating, I have to lower the TRVs when the boiler temperature increases. For that reason, I bought Homey Pro and six Danfoss Ally units. How can one sell things that don’t work at all? Now I have ordered Sonoff TRV and hope that it will work, but I have little hope.
