Hi, i have a smart display made with esp8266 and I want to fetch temperature data from Tuya zigbee sensors. Using API explorer on tuya.com I am able to get the data but there are many headers which change all the time I am not able to reproduce it in my ESP8266 project. I was not able to find any info online where someone is fetching data to esp. Can you help me getting into right direction here? What is the best approach? Can I use a local network to fetch the data or it can only be done through the cloud?

curl --request GET “https://openapi.tuyaeu.com/v1.0/devices/XXXXXXX” --header “sign_method: HMAC-SHA256” --header “client_id: XXXXX” --header “t: XXXXX” --header “mode: cors” --header “Content-Type: application/json” --header “sign: XXXXX” --header “access_token: XXXXXX”

this works, but I do not know how to generate all this data in ESP project to put into headers.

  • terragadyOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    thanks, this is easy and already done as I am fetching some more info already from the web but it just required token as auth and with Tuya Cloud API they require so much authentication and sign generation that I am lost. Maybe there is some local fetching possible not with the cloud and then it will be easier? Do sensors have some open API I can fetch on my local network?