Node-red-contrib-tuya-smart-device : can't connect to a battery powered sensor TH08

I have connected sockets, a ceiling fan, all work well with this node because they are constantly powered.
I bought a TH08 battery-powered thermometer/hygrometer, which works well with the TUYA app on a smartphone : measurements are uploaded every hour, and which I can find in the "tuya iot platform" :

Capteur T& H "online", Smart plug "online"

measurements are uploaded every hour

the smart plug is connected while the Temp/hum sensor is disconnected

question: can the node-red-contrib-tuya-smart-device connect to a battery-powered TUYA device that only wakes up once an hour?

Well I'm no expert but logically if the battery device only wakes up once an hour, then you cannot talk to it while it is sleeping as it not listening at that time.

that's what I said to myself, so I waited for the sensor to wake up after 1 hour and try to send a CONNECT ACTION in this "opening window" of 4 seconds but the connection failed (and I don't can't retrieve the measurements).

Tuya IOT platform receives measurements every hour for 4 seconds

That's why I ask myself the question does this node-red-contrib-tuya-smart-device work with battery sensors in deep sleep? And maybe update it to make it compatible :Sniff the sensor and wait for it to wake up to retrieve the measurements like Tuya iot platform does?

But doesn't it send you measurements when it wakes up anyway ?
If you need to persist these values then store them to context when they arrive.

the node should connect first, and then the sensor sends the data to it, I think? The tuya-smart-device node has reconnection delays, I test on 1000ms to see... it will fall well when the sensor wakes up?

I put a DEBUG node as output if it picks up something it should display it (as I do on the other permanently powered nodes)?

how does "Tuya IOT platform" capture measurements without visibly logging in? he waits for him to connect and wait for a measurement...

I don't use this node so have no experience with it, however I found this info which suggests battery powered device do not work with the node.

  • TuyAPI does not support sensors due to the fact that they only connect to the network when their state changes. There are no plans to add support as it's out of scope to intercept network requests.

Exact... even if some succeeded by entering the ID and the IP (whereas it should not be done in normal times !?:

... from there, I found another way to retrieve the sensor measurements by querying "Tuya IOT platform" rather than waiting for the sensor to wake up (which does not work) like this:

the result

1 Like

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