Tuya device is switching status online/offline

I use OH 3.3 and smarthomej tuya binding. I have some Tuya`s devices. Part of them added and work correctly, but two of them is switching status online/offline:

15:54:29.959 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:9f33009b6b' changed from UNKNOWN to ONLINE
15:54:30.214 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:9f33009b6b' changed from ONLINE to OFFLINE
15:54:35.278 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:9f33009b6b' changed from OFFLINE to ONLINE
15:54:35.590 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:9f33009b6b' changed from ONLINE to OFFLINE

What does it can be?

Exactly same issue with my 1st smart bulb! Did you solve your issue? I haven’t tried any others yet.
They are from Costco (Canada) Globe Electric


OH 3.3 release build
Source: 3rd Party (json)
Provided By: SmartHome/J
Version: 3.2.15
Type: binding
Content Type: Karaf KAR Archive
Provisioned With: Linked KAR file

WiFi devices in general tend to do this when they don’t have a strong signal from the router. Even if it’s close to the router, there could be a wall/appliance/etc. that’s blocking it.

If you can, move the bulb into line of sight of the router to see if this continues. If so, the bulb may be faulty. If the issue goes away, you’ll need to find a way to improve the signal where you want to use the bulb.

I have a relatively small space (800sq.ft.), but my refrigerator and stove are right in the middle of it. So I installed a mesh router to eliminate the dead zone the appliances were creating.

Now I have not solution. The way, as I see, is to use Mqtt. I will try after New Year.

Not in this situation(. Devices can be near the Wifi router and give the same problem. In Tuya aplication they work correctly.

When you say that the devices are switching status, are they staying offline and inaccessible from openHAB (while remaining available in a Tuya app)? Or are you seeing these flaps in the log while generally being able to operate them from openHAB?

The reason I ask is that the Tuya apps don’t report every single status update, which is what you’re seeing in your log. So it would be possible for them to flap and you’d never notice on the Tuya side. In contrast, the SmarthomeJ binding connects to devices locally and is logging when those flaps occur.

I’ll be curious if this makes a difference. I’m not convinced that the SmarthomeJ binding is the problem, since other devices are working fine with it. All it can do is report when OH loses and regains contact with a device. Worth trying, though.

Before doing that, you might want to try reserving IP addresses for these devices in your router, then denying them Internet access. That would isolate them so that only OH and the SmarthomeJ binding can access them.

Yes, I cannot control by OH, but get full control from Tuya app.

With my opinion, problem is in firmware of the device. As I remember, I got different results for working and non woking devices when I used iot portal Tuya.
*upd If divice did not work in OH, it did not get status here (control from Tuya aplication): *

then denying them Internet access.

It`s interesting. Will try.

1 Like

Please note that it is not possible to use app and binding in parallel. If you have the app opened, the binding will show the mentioned behavior.

1 Like

Are the non-working devices identical to working devices? Or are they different models? Tuya seems to allow a lot of flexibility with how individual companies program their devices, which results in a lot of non-standard behaviour.

I have a Tuya ceiling light that allows me to activate the scene mode via openHAB, but not change scenes. I bought a table lamp expecting the same thing, but it would only allow scenes to be activated via the app or by pushing the single button on the back of the device. When I looked in the IOT portal, there was nothing in the JSON stream that I could use. It’s interesting that Tuya allows such flexibility, and maddening for the lack of consistency.

Could this also be related to firmware? I haven’t had any problems using OH and the app/portal to control my Tuya devices at the same time.

I haven’t problem with such use…

There are different kinds of devices. But I have also relay and dimmer from one manufacture, they stay in one place (big box). Dimmer is working with OH without problem, relay is not…

If you want, I can change connection of this devices to other Tuya account and give login& password.

Firmware could vary between any combination of device type and manufacturer. There are a lot of variables due to how Tuya operates.

No thanks. I would rather not have access to someone else’s devices.

That’s why I suggest trying to deny them Internet access. It’s possible that some firmwares are okay with simultaneous connections (the working devices) and other firmwares are not okay with it (the non-working devices). Every brand/type of device should probably be treated as having unique firmware.

1 Like

It did not help(. The same problem.

Darn. When it goes offline, what do you have to do to get it working again?

If it’s possible to disable and re-enable the thing to get it working again, you could use a rule that detects when it goes offline and do that.


I did it. And I re-powered controler without Internet connection. The same(.

I don’t know what you mean by this. You can’t get it to reconnect at all? Or it eventually comes back online without you having to do anything (which is not the impression I got earlier)?

I’m pretty much out of ideas and inclined to think the device is faulty.

I’ve tried mine with 2 bulbs (same package…Globe brand from Costco Canada) with same result. I haven’t done as much troubleshooting as Pavel due to my not feeling well. My bulbs just flap on-off line almost immediately and repeats. I can post some of my log when I get home, but it looks pretty much the same as Pavel’s in his original post. Note, my Globe smart plugs work great with the Tuya binding.


PS. The bulbs NEVER stay online. Just continuously toggle.

I’d suggest returning them to Costco, but I wouldn’t replace them with the same Globe bulbs. Get TP-Link Kasa bulbs instead.

There are also TP-Link Tapo bulbs (I know…it’s confusing), but I don’t have any experience with those or the binding (which may be unofficial).