Apollon77 / ioBroker.tuya

ioBroker adapter to connect to several small and cheap Wifi devices that care connected to the Tuya Cloud and mostly use the Smartlife App/Alexa-Skill
MIT License
88 stars 22 forks source link

Tuya IoT Platform Service IoT Core expired: Battery devices are not synced any more #502

Closed Ilovegym66 closed 1 year ago

Ilovegym66 commented 1 year ago

since Version 3.9.x my battery devices T&H 1-5 are not AUTO synced any more, only if I restart the Adapter and set in the config the renew-flag for the credentials, than after the complete sync, are the objects updated.

My setup in the Config: image

image

image

from 12.11.22 it work fine: image

from 17,12,22 updated only if I restart the adapter: image

any hints for me? :)

Apollon77 commented 1 year ago

not without a debug log ... in fact battery devices can only be updated when using the MQTT connection with the iot cloud from tuya, right? Did you checked there that this has not expotred? It needs to prolonged from time to time. Nothing was changed in 3.9.3 in this regard

Does older versions still work or also not?

Ilovegym66 commented 1 year ago

I monitor the devices and check the logfiles, so far I can see the connection of the wifi battery devices... there are sometimes online.. looks like the temp is changing.. need time to check everything..

Apollon77 commented 1 year ago

Ok, normally - as in the past, battery devices are not long online to save battery and so the adapter needs to have big luck to get a connection, so getting the values from the cloud via polling is the one solution ... but also this shoukd still work ... if not as said ... full debug log please long enought that local and cloud pollssing intervals are in theat 2-3 times minimum

Ilovegym66 commented 1 year ago

debuglog, logged 16:58 to 17:06: tuyadebug.log

Apollon77 commented 1 year ago

Strange ...Bei Dir scheint das ganze App Cloud zeug nicht zu tun. Kannst Du doch noch vom Heim-WLAN ins die App einloggen? und das tut? Resette mal die App-Cloud-ession (ist eine checkbox im Adapter, dann speichern, restart abwarten). tut das dann?

Sonst versuch mal ein "curl -v https://a1.tuyacn.com/api.json" an der kommandozeile und piste ergebnis bitte

Ilovegym66 commented 1 year ago

Hi, ja, iobroker hat zugriff und kann auch vom Handy mit der App im gleichen Wlan einloggen, ohne Probleme.

Habe wieder ein Debug-log gestartet, um 9.58 umgeschaltet von Info auf Debug, da hat er auch Daten aus der Cloud geholt ( habs am Temp-Verlauf in Grafana gleich gesehen, da sich die Werte stark geaendert haben), dann gewartet und um 10:07 dann mal die App-Cloud-Session resettet.

Hier das Debug-log: tuyadebug.log

Hier das Ergebnis von dem Curl: ` ilovegym@iobrokerS /opt/iobroker $ curl -v https://a1.tuyacn.com/api.json

`

Apollon77 commented 1 year ago

Also "nach app cloud reset" ist in deinem log nicht drin, das endet 10:07 ... danach müsste adapter restarted haben.

Sonst nimm mal bitte GitHub version ... da ist mehr logging drin

Ilovegym66 commented 1 year ago

debuglog: tuyadebug.log

Ilovegym66 commented 1 year ago

tuyadebug.log

Ilovegym66 commented 1 year ago

so, hier jetzt nochmal: tuyadebug.log

Apollon77 commented 1 year ago

Issue was expired Tuya IoT Cloud service ... I added a fallback cloud polling

seers84 commented 1 year ago

I think I have the same problem. Plugged devices are working fine. The batterie things don't sync.

One question: is this necessary to extend? How long I have to wait?

image
Apollon77 commented 1 year ago

One question: is this necessary to extend? How long I have to wait?

es you have to, no idea how long you need to wait ... Hopefully not that long?

You can also try the GitHub version/3.12.0 (Beta) which is doing a "app cloud polling fallback" when no mqtt updates were received