Smarthome/J Tuya Binding for openHAB 4

I had a look but can only find a free 1 month trial and an upgrade.
I’m having trouble with a door contact now.
From device debugging i have this and the DP number 1 and 2:

|doorcontact_state|Boolean|“{true,false}”|
| — | — | — |
|battery_percentage|Integer|{ “unit”: “%”, “min”: 0, “max”: 100, “scale”: 0, “step”: 1 }|

With this definition it becomes 1, but never 0

Number Contact1 "Contact sensor 1" {channel="tuya:tuyaDevice:contact1:doorcontact_state"}

With this definition it becomes ON, but never OFF

Switch Contact1 "Contact sensor 1" {channel="tuya:tuyaDevice:contact1:doorcontact_state"}

Battery state is read just fine.

UID: tuya:tuyaDevice:contact1
label: 1 Contact sensor
thingTypeUID: tuya:tuyaDevice
configuration:
  pollingInterval: 0
  productId: qxu3flpqjsc1kqu3
  deviceId: XXXXXXXXXXXXXXXX
  localKey: XXXXXXXXXXXXXXXX
channels:
  - id: doorcontact_state
    channelTypeUID: tuya:switch
    label: doorcontact_state
    description: ""
    configuration:
      dp: 1
  - id: battery_percentage
    channelTypeUID: tuya:number
    label: battery_percentage
    description: ""
    configuration:
      dp: 2
      max: 100
      min: 0

What am I doing wrong?

Can you share TRACE logging?

  • disable thing
  • start TRACE logging
  • enable thing (write down time)
  • open door (write down time)
  • close door (write down time)
  • stop TRACE logging

You can send it to github@klug.nrw. In general: battery powered devices are difficult.

I’ve sent you the requested log via email.

1 Like

For everyone’s info :
I tought I will be able to make it work with only one item and one dimmer channel (the configuration the discovery gave me).
But instead it work only with 2 channel, one for the dimmer and one for the switch. So I need 2 items. And the channel for the dimmer should have the Switch DP empty.

Hi all. I seem to be having problems with getting the Tuya binding working.
Story so far:
Fresh install of Bookworm Lite 64 on a 4Gb Pi 4 in an Argon case. Samba installed and working along with other packages that aren’t relevant here (Icecast, mpd, mpc, virtual radar server, mono, Webmin, etc).
I’ve installed openhab 4.1.2 from the git repository, set it all up with openhabian-config. Java 17 is installed.
I’ve restored a known working openhab-backup.zip setup and confirmed that the Tasmota based devices and MQTT are working.
I’ve added https://download.smarthomej.org/addons-snapshot.json as the 3rd party repo & added the SmartHome/J Tuya Binding from ‘Other Add-ons’. So far so good.
But… When I go to Add-On Settings and select the smarthome-j tuya binding, the screen is blank with just back and save across the top.

I’ve already extracted the private keys as used in AgentK’s method so don’t really need to go through the cloud iot thing.

Here’s the response from the api:

[
  {
    "UID": "tuya:project",
    "label": "Tuya Cloud Project",
    "description": "This thing represents a single cloud project. Needed for discovery.",
    "listed": true,
    "supportedBridgeTypeUIDs": [],
    "bridge": false
  },
  {
    "UID": "tuya:tuyaDevice",
    "label": "Generic Tuya Device",
    "description": "A generic Tuya device. Can be extended with channels.",
    "listed": true,
    "supportedBridgeTypeUIDs": [],
    "bridge": false
  }
]

I would appreciate whatever help you can offer.

There are no Add-On Settings for the Tuya binding, so this would be expected. You might find the same for some other bindings that don’t use this screen. I agree that it’s a little odd. It’s because the Add-on Settings are a more recent addition to openHAB.

Assuming you’ve got everything else set up properly, you just need to add a thing for your Tuya Cloud project. After that, it should auto-detect all devices you’ve added to your cloud account.

Note the conversation from two weeks ago where @Andreas_Pircher thought the same thing, but found that their existing cloud project didn’t work. It’s hard to know why since there’s a lot going on in Tuya’s IoT settings, so they just created a new cloud project. If you run into issues with the connection, I’d suggest doing the same.

1 Like

Thank you. That was probably the nudge I needed.

1 Like

Hello everyone.
I’m running into a weird issue.
Everything was running well until I just update my instance (sudo apt-get upgrade) and update from the sudo openhabian-config command.
After restarting my raspberry, my Tuya devices are not working. There is a handler missing error on all my tuya things :

Status: UNINITIALIZED

HANDLER_MISSING_ERROR

Handler factory not found

And it actually looks that the binding is not installed anymore because I have an “install” button and not “remove” button.
When I try to install it again, I just got this error : “Installation of add-on json:org-smarthome-binding-tuya failed” and I don’t know where to go from here. I wanted to install manually but I could not find the kar/jar file.
I also tried a sudo openhab-cli clean-cache with no luck

What is written to the log?

Nothing shows in the log
What log should I enable?

1 Like

I tried to enable some logs, and this is what I found.

Can’t really tell if it’s right or wrong myself.

2024-04-08 18:55:00.159 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - REQUEST for //localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=0}
GET //localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json HTTP/1.1
2024-04-08 18:55:00.160 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=63/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=2} parsed true HttpParser{s=CONTENT,0 of -1}
2024-04-08 18:55:00.161 [DEBUG] [.eclipse.jetty.server.HttpConnection] - releaseRequestBuffer HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=64/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=3}
2024-04-08 18:55:00.162 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - handle //localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=4} 
2024-04-08 18:55:00.164 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action DISPATCH HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=6}
2024-04-08 18:55:00.165 [DEBUG] [org.eclipse.jetty.server.Server     ] - REQUEST GET /rest/addons/json:org-smarthome-binding-tuya on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=7}
2024-04-08 18:55:00.166 [DEBUG] [etty.server.handler.gzip.GzipHandler] - GzipHandler@1f80225{STARTED,min=1024,inflate=-1} handle Request(GET //localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json)@16c6b9b in null
2024-04-08 18:55:00.166 [DEBUG] [.jetty.server.handler.ContextHandler] - scope null||/rest/addons/json:org-smarthome-binding-tuya @ o.o.p.w.s.j.i.PaxWebServletContextHandler@192ac72{/rest,null,AVAILABLE}
2024-04-08 18:55:00.167 [DEBUG] [.jetty.server.handler.ContextHandler] - context=/rest||/addons/json:org-smarthome-binding-tuya @ o.o.p.w.s.j.i.PaxWebServletContextHandler@192ac72{/rest,null,AVAILABLE}
2024-04-08 18:55:00.170 [DEBUG] [eclipse.jetty.servlet.ServletHandler] - servlet /rest||/addons/json:org-smarthome-binding-tuya -> cxf-servlet==javax.servlet.Servlet@e2fb1709{jsp=null,order=-1,inst=true,async=true,src=EMBEDDED:null,STARTED}
2024-04-08 18:55:00.186 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=89/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=28} filled 0 HeapByteBuffer@7ac575[p=0,l=0,c=8192,r=0]={<<<>>>GET /rest...\x00\x00\x00\x00\x00\x00\x00}
2024-04-08 18:55:00.188 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=90/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=30} parse HeapByteBuffer@7ac575[p=0,l=0,c=8192,r=0]={<<<>>>GET /rest...\x00\x00\x00\x00\x00\x00\x00} null
2024-04-08 18:55:00.190 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onContentComplete HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=32}
2024-04-08 18:55:00.192 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onRequestComplete HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=34}
2024-04-08 18:55:00.194 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=96/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=36} parsed false HttpParser{s=END,0 of -1}
2024-04-08 18:55:00.195 [DEBUG] [.eclipse.jetty.server.HttpConnection] - releaseRequestBuffer HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=98/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,0 of -1},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=37}
2024-04-08 18:55:00.202 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - COMMIT for /rest/addons/json:org-smarthome-binding-tuya on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=44}
2024-04-08 18:55:00.208 [DEBUG] [org.eclipse.jetty.io.ChannelEndPoint] - flushed 221 SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=W,to=110/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,0 of -1},g=HttpGenerator@deda9b{s=COMMITTED}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=50}
2024-04-08 18:55:00.217 [DEBUG] [org.eclipse.jetty.io.ChannelEndPoint] - flushed 461 SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=W,to=7/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,0 of -1},g=HttpGenerator@deda9b{s=COMPLETING}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=59}
2024-04-08 18:55:00.220 [DEBUG] [org.eclipse.jetty.io.ChannelEndPoint] - flushed 7 SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=W,to=2/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,0 of -1},g=HttpGenerator@deda9b{s=COMPLETING}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=62}
2024-04-08 18:55:00.226 [DEBUG] [org.eclipse.jetty.server.Server     ] - handled=true async=false committed=true on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMPLETED is=READY awp=false se=false i=true al=0},r=1,c=false/true,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=68}
2024-04-08 18:55:00.229 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action COMPLETE HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=COMPLETING os=COMPLETED is=READY awp=false se=false i=false al=0},r=1,c=false/true,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=70}
2024-04-08 18:55:00.232 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action TERMINATED HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=COMPLETED os=COMPLETED is=READY awp=false se=false i=false al=0},r=1,c=true/true,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya?serviceId=json,age=74}
2024-04-08 18:55:00.233 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onCompleted for /rest/addons/json:org-smarthome-binding-tuya written=464
2024-04-08 18:55:04.792 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - REQUEST for //localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=0}
POST //localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json HTTP/1.1
2024-04-08 18:55:04.794 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=82/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of 2},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=2} parsed true HttpParser{s=CONTENT,0 of 2}
2024-04-08 18:55:04.796 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - handle //localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=3} 
2024-04-08 18:55:04.798 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action DISPATCH HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=6}
2024-04-08 18:55:04.799 [DEBUG] [org.eclipse.jetty.server.Server     ] - REQUEST POST /rest/addons/json:org-smarthome-binding-tuya/install on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=7}
2024-04-08 18:55:04.801 [DEBUG] [etty.server.handler.gzip.GzipHandler] - GzipHandler@1f80225{STARTED,min=1024,inflate=-1} handle Request(POST //localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json)@16c6b9b in null
2024-04-08 18:55:04.802 [DEBUG] [etty.server.handler.gzip.GzipHandler] - GzipHandler@1f80225{STARTED,min=1024,inflate=-1} excluded by method Request(POST //localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json)@16c6b9b
2024-04-08 18:55:04.803 [DEBUG] [.jetty.server.handler.ContextHandler] - scope null||/rest/addons/json:org-smarthome-binding-tuya/install @ o.o.p.w.s.j.i.PaxWebServletContextHandler@192ac72{/rest,null,AVAILABLE}
2024-04-08 18:55:04.805 [DEBUG] [.jetty.server.handler.ContextHandler] - context=/rest||/addons/json:org-smarthome-binding-tuya/install @ o.o.p.w.s.j.i.PaxWebServletContextHandler@192ac72{/rest,null,AVAILABLE}
2024-04-08 18:55:04.809 [DEBUG] [eclipse.jetty.servlet.ServletHandler] - servlet /rest||/addons/json:org-smarthome-binding-tuya/install -> cxf-servlet==javax.servlet.Servlet@e2fb1709{jsp=null,order=-1,inst=true,async=true,src=EMBEDDED:null,STARTED}
2024-04-08 18:55:04.835 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=123/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=CONTENT,0 of 2},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=43} parse HeapByteBuffer@e864b5[p=1598,l=1600,c=8192,r=2]={POST /res...ive\r\n\r\n<<<null>>>=&quot;0&...p://upd} {}
2024-04-08 18:55:04.841 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onContent HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=49} Content@8b1025{HeapByteBufferR@d38580[p=1598,l=1600,c=8192,r=2]={POST /res...ive\r\n\r\n<<<null>>>=&quot;0&...p://upd}}
2024-04-08 18:55:04.845 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onContentComplete HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=53}
2024-04-08 18:55:04.848 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onRequestComplete HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=56}
2024-04-08 18:55:04.851 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=139/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,2 of 2},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=59} parsed false HttpParser{s=END,2 of 2}
2024-04-08 18:55:04.855 [DEBUG] [.eclipse.jetty.server.HttpConnection] - releaseRequestBuffer HttpConnection@16a0ae8::SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=-,to=143/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,2 of 2},g=HttpGenerator@deda9b{s=START}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=62}
2024-04-08 18:55:04.863 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - COMMIT for /rest/addons/json:org-smarthome-binding-tuya/install on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=70}
2024-04-08 18:55:04.873 [DEBUG] [org.eclipse.jetty.io.ChannelEndPoint] - flushed 134 SocketChannelEndPoint@10709bd{l=/127.0.0.1:8080,r=/127.0.0.1:56776,OPEN,fill=-,flush=W,to=161/30000}{io=0/0,kio=0,kro=1}->HttpConnection@16a0ae8[p=HttpParser{s=END,2 of 2},g=HttpGenerator@deda9b{s=COMPLETING}]=>HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMMITTED is=READY awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=81}
2024-04-08 18:55:04.904 [DEBUG] [org.eclipse.jetty.server.Server     ] - handled=true async=false committed=true on HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=BLOCKING os=COMPLETED is=READY awp=false se=false i=true al=0},r=2,c=false/true,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=112}
2024-04-08 18:55:04.914 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action COMPLETE HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=HANDLING rs=COMPLETING os=COMPLETED is=READY awp=false se=false i=false al=0},r=2,c=false/true,a=HANDLING,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=121}
2024-04-08 18:55:04.927 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - action TERMINATED HttpChannelOverHttp@85ce4a{s=HttpChannelState@10970fa{s=IDLE rs=COMPLETED os=COMPLETED is=READY awp=false se=false i=false al=0},r=2,c=true/true,a=IDLE,uri=//localhost:8080/rest/addons/json:org-smarthome-binding-tuya/install?serviceId=json,age=134}
2024-04-08 18:55:04.928 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - onCompleted for /rest/addons/json:org-smarthome-binding-tuya/install written=0

You should see an error message in the log without changing any log level (at WARN or ERROR) level that explains why the installation fails. You can also check on the karaf console what is currently installed:

list -s | grep smarthomej

There should be no bundle installed when the add-on page shows no installed add-on.

So I downloaded the kar file found in https://download.smarthomej.org/addons-snapshot.json
I put it in /usr/share/openhab/addons/ and it is working now.
However, it does not appear as installed in the list of installed modules.

So I tried many times to install through web interface, but no error is appearing in the logs.

The list -s | grep smarthomej command show this now (with the kar file manually placed) :
317 x Active x 80 x 4.1.0 x org.smarthomej.binding.tuya
318 x Active x 80 x 4.1.0 x org.smarthomej.commons

But I noticed the version shown in the web interface is 4.0.0-SNAPSHOT (I mean the version ready to install but that fails)
But it should show 4.1.0 I guess since I have openhab 4.1.2?

Same error here. Happened after updating OH to the latest dot release.

Downgraded OpenHAB to 4.1.1 but it still does not let me install the Tuya add-on. I would recommend Tuya users NOT TO upgrade to OH4.1.2 until this problem is resolved. You will lose your Tuya devices.

Use https://download.smarthomej.org/addons.json for all versions. That should do the trick.

Sorry,

Same installation error persists even with that adress.

Doesn’t work for me either unfortunately.

I had the same issues with trying to install, I ended downloading the .kar file and installing it in the addons folder.

Use wget with url for correct version .kar file

Regards
harry

1 Like

This fix by our Lordude works! Here is the link he presented for all of you to copy and paste:

sudo wget https://repo1.maven.org/maven2/org/smarthomej/addons/bundles/org.smarthomej.binding.tuya/4.1.0/org.smarthomej.binding.tuya-4.1.0.kar