Smarthome/J Tuya Binding for openHAB 4

Hi all,
I still have the same issue.
Is the above mention sudo command the only one i need? OH is running on version 4.1.2 and if I use addons.json or addons-snapshot.json, the install version will be tuya 4.0.0 any time.
Message will be:
“Installation of add-on json:org-smarthome-binding-tuya failed”
I tried to restart OH and also to clear cache. Nothing helped.

sudo wget … link didn´t solve the issue.

Best regards Julian

The best suggestion I have is to stop openHAB, then edit the JSON file to see if there’s still an entry for the Tuya binding.

If so, delete the entry (making sure you match parentheses), and then start openHAB. In theory that should remove the binding, but I’ve never actually tried this. I’ve only done it with things that get stuck when I try to remove them.

Hi all,

if I start OH new i will get this Message:

Reinstalling missing marketplace KAR: json:org-smarthome-binding-tuya
2024-04-20 23:06:44.966 [WARN ] [community.CommunityKarafAddonHandler] - Failed reinstalling add-on from cache
org.openhab.core.addon.marketplace.MarketplaceHandlerException: The local cache folder doesn’t contain a single file: /var/lib/openhab/marketplace/kar/json_3Aorg_2Dsmarthome_2Dbinding_2Dtuya
at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.installFromCache(CommunityKarafAddonHandler.java:163) ~[?:?]
at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.lambda$8(CommunityKarafAddonHandler.java:185) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.ensureCachedKarsAreInstalled(CommunityKarafAddonHandler.java:182) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]

Any possible solutions?
Best regards Julian

Did you execute the command in the addons directory? On my system the addons are located int

/usr/share/openhab/addons/

It worked, still getting the same message at startup of OH. But TuyaCloud is working again and i can control my device. Thanks

1 Like

I transferred my SD cart from one Pi to an other PI same network, same everything. Tuya binding has communication problem, before it worked, altough not very stable either, but it was online for & week. Rebooting doesn’t help. I don’t understand why.
This binding seems very unstable.
Running openhab 4.1.3
Any pointers what to do ?

error msg in the log smile: [ding.tuya.internal.cloud.TuyaOpenAPI] - Request failed: Result{timestamp=1717706837875, code=2406, msg=skill id invalid, success=false, result=null}, no token received

Solved :

  1. login to tuya iot platform
  2. navigate to “cloud” on the left side menu bar
  3. navigate to “Link tuya app account”
  4. click unlink for your homeassistant app (i only have one account)
  5. click “add app account” and scan the QR with your phone app

Not sure why.

1 Like

Hi Alexandre, I am (still) struggling with something comparable as you: all Tuya switches/plugs work fine and can be controlled by Openhab but for a led strip (calex) I cannot control via openhab, all changes via the Tuya app are captured by openhab but the control from openhab the other way around is not working. Did you solve it yet? Best regards,
Henk

Hi Everyone,
i got one echos irrigation valve and at this point i got no idea what i am missing.
OpenHab 4.1.3
Smarthome/J Tuya Binding 4.1.0 by 3rd Party (json)

I got an Tuya Cloud Project with this specific device and the Tuya Cloud Project thing is online an connected.
My irrigation valve is displayed by automatic scan. I changed the IP Address to the fixed local WIFI Address of the valve.
I tried alle Protocol Versions (3.1,3.3,3.4) and with all of these protocols is get a connection refused in the debug logs
09:59:00:620 [DEBUG] [inding.tuya.internal.local.TuyaDevice] - bfdf30d3a98d5284c89syj/192.168.2.152:6668: Failed to connect: Connection refused: /192.168.2.252:6668

What can i do to get some more details why the connection is refused.

Best Regards & Thanks

Looks like everyone has a problem with Tuya, anyone know how to get the device IP (Zigbee), I have tried everything.

Also the device just saya “Waiting for IP address” does this come from the Tuya server or from the local Zigbee coordinator.

The Tuya binding is for WiFi devices, not Zigbee. So I don’t think you’ll get that to work.

I use Zigbee devices with a Sonoff coordinator and Zigbee2mqtt.

Welcome to openHAB! Sorry for the lack of replies. I’ve personally been quite busy over the past few months and haven’t been able to spend much time in the community.

It sounds like you’ve done everything correctly. However, you shouldn’t need to set an IP address if the device was found by openHAB, so I’d suggest removing that.

If that doesn’t help, the problem is most likely on the Tuya cloud side. An issue we often run into is that individual brands can make small changes to how their Tuya-supplied devices work. For example, InkBird changes their sensors so that they pretty much don’t work with the Tuya cloud servers or the Smart Life/Tuya Smart apps.

Unfortunately, I can’t offer any more advice than that. I’ve tried a fair number of Tuya devices with varying degrees of success.

2 Likes

Hi Russ,

thanks for your reply. The removal of the IP address doesnt work as expected and the binding waiting for the local discovery (without success).
At this Point i will change the connection to a cloud only binding without the local component. Not perfect but should work for me.

Thanks

This normally happens when you have more than one device/app connected to your Tuya device. Please make sure to have no connection open from any mobile app.
Then disable/reenable the Tuya Cloud Thing.
Regarding the IP-Address, you can find the devices MAC Adress in the mobile app.
Check your router for this MAC and you can see the IP.
I always assign the same IP to those devices in my router settings and change the name in router settings to something meaningful…

Do i need to pay for using Tuya Cloud project?

If nothing changed in the past weeks: no. There is a free trial which works without time-limit.

2 Likes