"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearHO
Jump
Fetch data from TuyaAPI sensors in ESP8266
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTE
    terragady
    11mo ago 100%

    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?

    1
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearHO
    Home Automation terragady 11mo ago 50%
    Fetch data from TuyaAPI sensors in ESP8266

    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](https://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.

    0
    2
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearHO
    Jump
    TuyaAPI - fetch with ESP8266
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTE
    terragady
    11mo ago 100%

    I am already fetching data from other source through https so this is already solved.

    Yes that is what I thought, other option is esp32 or raspberry pi zero to replace 8266. For the while I thought there might be some local shortcut of both devices are in the same network pinging directly ip address of the sensor (but this gets tricky with zigbee devices and hub but I also have WiFi sensors which i can use), did you hear about this method? I saw it somewhere where googling and it didn't require as much authentication.

    1
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearHO
    Home Automation terragady 11mo ago 100%
    TuyaAPI - fetch with ESP8266

    Hi, I have few zigbee temp sensors with tuya ecosystem (not connected to HA) and I have DIY smart screen based on ESP8266. I would like to fetch temp data from those sensors but I do not know where to start. I do have [iot.tuya.com](https://iot.tuya.com/) account and I can get it to fetch in API explorer and postman but can't do it with ESP. Getting token and adding sign headers is a bit tricky to do. I did not find any similar project around. Does anyone done something similar and can put me in a right tracks? :) request looks like this for example: curl --request GET "[https://openapi.tuyaeu.com/v1.0/devices/XXXXXXX](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" and I know that before that I need to request a token (or refresh it).

    3
    2