Smarthome/J Tuya Binding for openHAB 4

UPDATE:
I have checked the IP settings in my fritzbox and found nothing unusual. Rebooting did not help either.
So I manually added the local IP to all Tuya devices in the config.
I can get 13 out of 15 devices online in OH this way.
At least a temporary solution for me.

The reluctant 2 are the new ceiling lights with the following log message:

2024-12-15 14:17:07.613 [DEBUG] [.internal.local.handlers.TuyaEncoder] - bfb93a120daa586a72s2eb/192.168.178.49:6668: Sending payload B798A70AXYZ
2024-12-15 14:17:07.617 [TRACE] [.internal.local.handlers.TuyaEncoder] - bfb93a120daa586a72s2eb/192.168.178.49:6668: Sending encoded '000055AA0000000XYZ
2024-12-15 14:17:07.622 [DEBUG] [al.local.handlers.TuyaMessageHandler] - bfb93a120daa586a72s2eb/192.168.178.49:6668: Connection established.
2024-12-15 14:17:07.754 [DEBUG] [al.local.handlers.TuyaMessageHandler] - bfb93a120daa586a72s2eb/192.168.178.49:6668: Connection closed.
==> /var/log/openhab/events.log <==
2024-12-15 14:17:07.627 [INFO] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:bfb93a120daa586a72s2eb' changed from OFFLINE to ONLINE
2024-12-15 14:17:07.758 [INFO] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:tuyaDevice:bfb93a120daa586a72s2eb' changed from ONLINE to OFFLINE

Does anyone have the same problems, approaches or even solutions?

Smarthome/J Tuya binding not appearing in add-on store of OH 4.3.0 or in OH 4.3.1

EDIT(4/1/25):
After realizing that version 4.3.0-snapshot was contained in “https://download.smarthomej.org/addons.json”, I set “Json 3rd Party Add-on Service” to this file. I then cleared cache and restarted openhab twice and the “Smarthome/J Tuya” binding finally appeared. Note that it was a fresh 4.3.0 installation without any binding installed yet.

OLD MESSAGE:
I am trying to migrate from OH 4.2.1 to OH 4.3.1 but I am unable to install the “Smarthome/J Tuya binding”, as it does not appear in the list of bindings that can be installed in the “Add On Store”.

I tried to add in “Json 3rd Party Add-on Service” either
https://download.smarthomej.org/addons-snapshot.json
or
https://download.smarthomej.org/addons.json
and I tried all combinations of
“Show Non-Stable Add-ons” (in “Json 3rd Party Add-on Service”)
and
“Include (Potentially) Incompatible Add-ons” (in “Add-on management”)

I have seen in https://docs.smarthomej.org/
that the version available for OH 4.3.0 is only for snapshot. Is this the cause?

Hi everybody!

I have added a new TUYA device in OH and keep getting “Waiting for IP” etc.
After hours, when eval found out that my brand new device (lumiere Pendelleuchte) needs the protocol version 3.5

import tinytuya

# Tuya-Geraet konfigurieren
d = tinytuya.OutletDevice('bff1248b395386e28djyqw', '192.168.178.132', 'XF<`-=G7G_......')
d.set_version(3.5)  #

# Geraetestatus abrufen
data = d.status()
print('Device Status:', data)

I get the correct returns:

`Device Status: {'dps': {'20': True, '21': 'white', '22': 1000, '23': 200, '25': '0700000000000000000003e800c0', '26': 0, '34': False}`

all other versions 3.1, 3.3 & 3.4 give me the error feedback:

`Device Status: {'Error': 'Unexpected Payload from Device', 'Err': '904', 'Payload': None}`

After

If I add it manually in the OH THINGS UI in section CODE, I get the error in the UI:

`HANDLER_CONFIGURATION_PENDING {protocol=Der Wert 3.5 ist nicht in den erlaubten Optionen enthalten. Erlaubte Optionen sind: [ParameterOption [value="3.1", label="3.1"], ParameterOption [value="3.3", label="3.3"], ParameterOption [value="3.4", label="3.4"]]}`

Could you anyone add the NEW protocol version and its dependencies, please?
(Manual configuration is also not possible with this add-on, as the protocol vision is not supported.)

BTW:
According to my research, the protocol version has been available since at least the beginning of the year. The question is whether 3.6 is already available and can be implemented at the same time :wink: ?
All my devices of the last 3 years rely on API version 3.3 or higher. Here is an excerpt of my devices:

THX a lot

I spoke with @J-N-K recently, and they’ve been too busy with other facets of life to give attention to the Tuya binding. I can appreciate that, as I also spent very little time on openHAB in 2024.

I don’t suppose you have the coding skills to take a stab at forking/adding the 3.5 protocol? I think a lot of people would be very appreciative, including @J-N-K.

Hello and Happy New Year !!!

I have a fresh OH4.3.1 installed in Docker, where the Smarthome/J Tuya binding is online, all WiFi devices added in Tuya app are shown in the cloud and are listed in the Inbox of Things.
1 device added as Thing is online with configurable channels and fully controllable with OH, while the others remain offline with: " CONFIGURATION_ERROR No channels added and schema not found" error.

All devices added as Things, have all fields filled from the cloud except the IP and protocol version , which remain blank (including the one device that fully works anyway).
Adding the IP manually and selecting either protocol version, the error message remains the same, Thing is offline with no channels to configure.

What could be the issue and solution?

thank you

The Smarthome/J Tuya binding is in the process of being included into the official openhab repository [tuya] Initial contribution by ccutrer · Pull Request #17937 · openhab/openhab-addons · GitHub

It will hopefully be added in time into openhab 5.0

4 Likes

That’s awesome. Is there any way to make a test version available for 4.3, so that we can solve the short-term issues with a quick download?

What do you mean by that ? It would still be needed to install a 4.3 version from the marketplace.
So what’s the difference to install the smathome/J version ?

As I understand it from the posts above, people are having trouble with the current version (possibly due to a lack of support for the version 3.5 protocol). So, I’m just wondering how we help them now, since OH5 is a ways off.

Ok, understood, but I don’t see the ported binding supports protocol 3.5.
No enhancements as far I can see…

Ah, so that would be the question I forgot to ask: “has it been updated for protocol 3.5?” :wink:

Initially, the PR aims to bring in the binding as is, with only minor adjustments to comply with the overall openhab standards. Once it’s merged, then further work can be done on it. Currently, as far as I can tell, protocol 3.5 isn’t yet supported.

I’m not sure if eventually it can be compiled against openhab 4.3 / java17, but we’ll see when we get there.

3 Likes

I am very happy to hear that Tuya Adon will be an integral part of openHAB 5.0. Many thanks also to the 3rd party developer @J-N-K for all the work and development !

I understand that migration takes priority over further development for now.
Historically, I believe that protocol version 3.4 of Tuya was made available in 2022 and we are still here today in 2025 (absolutely no offence to anyone). There will probably be more and more devices using version 3.5 that cannot be supported by OH, but maybe by other systems.

That’s why I think it’s essential that Tuya version 3.5 is also made available for the openhab 5.0 release. Otherwise it would feel a bit like a lame duck.

(I don’t want to personally offence anyone here, just point out the need)

JFYI: ioBroker integrated Tuya protocol version 3.5 a few days ago (Release Release v3.17.0 · Apollon77/ioBroker.tuya · GitHub)

Nobody said V3.5 will not make it into openHAB 5. It might not be backported to openHAB 4.3, as this major version just gets bug fixed.

2 Likes