Smarthome/J Tuya Binding for openHAB 4

Fixed in latest snapshot and this afternoon in 3.2.17.

1 Like

So, do I need to remove and re-install the binding to get the fix?

Yes

ok, updated

East Data Center still doesn’t work, but
Western America brought me online and things are discovered.

However, after adding things from Inbox they have status OFFLINE / CONFIG_PENDING, “Waiting for IP address”

I never got the “Western Europe” (which is also Azure) working in Germany. Using “Central Europe” works fine. I recently came across a document from Tuya that only lists “Western America”, “Central Europe”, “China” and “India” for app-access, so maybe the others are not available for 3rd party applications.

What type of device is it and if you set the log level org.smarthomej.binding.tuya to TRACE, do you see discovery messages from these devices:

2023-01-02 07:49:58.090 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener/: Received MessageWrapper{commandType=UDP_NEW, content='DiscoveryMessage{ip='192.168.178.xxx', deviceId='some-id', active=2, ability=0, mode=0, encrypt=true, productKey='some-key', version='3.3'}'}

let’s continue here: Tuya/Smart Lights: Things discovered, but state "Waiting for IP address"

I am using OH4 and

  • added the URL https://download.smarthomej.org/addons-snapshot.json at services → JSON 3rd Party Addons
  • installed SmartHome/J Tuya Binding from Other Add-ons
  • created a Tuya Cloud project as described in the readme
  • connected the cloud project with my tuya App account with some smart water valves

And at this place I have a problem:

When I go to Things → add → select the SmartHome/J Tuya binding then there ist a message “No thing types can be added with this binding.”

Where can I add the “project” thing?

2 Likes

which openHAB 4 version are you using? A milestone or latest snapshot? Under “Developer Tools/API Explorer/GET thing-types”, present “Try out”, if you enter tuya as bindingId and “Execute”, what is the response?

1 Like

I use openHAB 4.0.0.M2 Milestone Build

The response is:

curl -X 'GET' \
  'http://openhab:8080/rest/thing-types?bindingId=tuya' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJraWQiOm51bGwsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJvcGVuaGFiIiwiYXVkIjoib3BlbmhhYiIsImV4cCI6MTY4NzIwODI5NSwianRpIjoiV0Y1cEtGRGpUX3BzNjQ3YUJTNS0zQSIsImlhdCI6MTY4NzIwNDY5NSwibmJmIjoxNjg3MjA0NTc1LCJzdWIiOiJhZG1pbiIsImNsaWVudF9pZCI6Imh0dHA6Ly9vcGVuaGFiOjgwODAiLCJzY29wZSI6ImFkbWluIiwicm9sZSI6WyJhZG1pbmlzdHJhdG9yIl19.eFJTv_k0u4VROsT5zB2z2WjAdwfBb7XR-wDDrbRfrdMZ-dZY6fzn5iHxPpmnYNESRSU0uJsqIDGIYy12sNN1f41CsmxD60lIdu-afkA0OziqxyzF4r74yAwiJSDW0vYoKZg2um7pZc1tT9oxLbZrfKOybLpp5_wbffnWTOsBJYtur4pfzFApd-T0dxyPnn2bFBdfqu2feiPISilPVRAmeAVNbDvAfvkuR-cVM6tOZzfgg6sgM1AwuX0T9MBQj6GnKhc-yDP_2gMWX_ithHYRHaVPDtWSTiBAL0Vx95JZ1oPtKXeB5USdNjnW4vBfZYvq6ouAeU0STZH5hIksQYkeqg'

I made the update to M3.

The response ist:

curl -X 'GET' \
  'http://openhab:8080/rest/thing-types?bindingId=tuya' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJraWQiOm51bGwsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJvcGVuaGFiIiwiYXVkIjoib3BlbmhhYiIsImV4cCI6MTY4NzIwOTExNiwianRpIjoiMGZSRWJCZ1pDd3k5N3BoQk81NHpqdyIsImlhdCI6MTY4NzIwNTUxNiwibmJmIjoxNjg3MjA1Mzk2LCJzdWIiOiJhZG1pbiIsImNsaWVudF9pZCI6Imh0dHA6Ly9vcGVuaGFiOjgwODAiLCJzY29wZSI6ImFkbWluIiwicm9sZSI6WyJhZG1pbmlzdHJhdG9yIl19.B4oHnB5zSMffaHNrDPVqUXaWWmJhUUOUpeBWext4AKqBJHD2mGHgVSgbAuis5E0MZVcY0xzFkBae3ZV5G13D3NZJnVNaw1VMHX_al9SyYwRUoSEVbkDYr3jMfQgpVkZDnERHeRUnZWVn3NagUPwE9dTmhnWWNtm1AsPYd_4f9-iwjiULW6-vneWkQRZAWceKoiCikSyVvNeWNI8KCLMO0cJsSa5Y7f7xzdXGmkLgtsaaxIKRax10fL594PfbZd6uf6pQVQKs-1xM6cJPmnxRT_XhdUXG3rwrHGMdbZ1o74zb_r1YKC-cuFKHasOqaRfGjgmZ0sVkAr-3f-rRTgLx1g'

Hi

I have the exact same problem. I’m on M3 too and the result of the REST API call is:

I hope this help to identify the problem.
Kind regards

Just upgraded to the M4 build and it seems to work again now.
I can add the project as intended.

1 Like

For future reference, On OpenHab 4 M4 my mistake was that I was adding as 3rd Party Add-on Service
https://download.smarthomej.org/addons.json —> Wrong
https://download.smarthomej.org/addons-snapshot.json —> Correct

Thank you @J-N-K and @GebDat for mention

Hi All,
I have the same problem despite I think I’ve done all what the steps describle by the other users.
The issue just occured after upgrading from 3.2 → 4.0

  • I’ve added the link https://download.smarthomej.org/addons-snapshot.json in 3rd Party Add-on Service
    as it didn’t fix the issue, then
  • I’ve delete the Tuya thing and the Tuya Cloud Project
    now when I would like to add the Tuya Thing it returns me:
    No thing types can be added with this binding.

I’m running the following version:
openHAB 4.0.0
Release Build

OH Version
also here is attached the output of API Explorer

And the 4.0.0 Snapshot version of the Tuya binding:

Regards

Youness

Hi All,

Any one to help on that topic?

Is there any other tests to do or logs to get?

Regards

Youness

I believe the way that I got from 3.4.4 to 4.0 successfully with the smarthome/j Tuya and amazonechocontrol bindings I use was:
Backuped my 3.4.4 install
Created a new clean OH 4.0 install using openhabian to move to java 17
Downgraded OH to 3.4.4. (I did it before the release, so I just used openhabian-config - now you might have to figure out how to tell openhabian to install 3.4.5)
Restored the backup.
Waited for the OH 4 release
Using openhabian-config, upgraded to 4.0 (done this way to take advantage of the upgrade script that does things like handle the UoM changes that you will miss if you just restore your 3.4 to 4.0)
Smarthome/j bindings did not work after this.
First I tried updating the 3rd Party add on service to https://download.smarthomej.org/addons-snapshot.json. The Smarthome/j bindings appears, but I got an error when I tried to install them.
I changed 3rd Part add on back to the earlier setting (I don’t remember what it was). I then was able to delete the existing bindings.
Then I returned the 3rd Party add on service to https://download.smarthomej.org/addons-snapshot.json. I was then able to install the 4.0 bindings and they worked.

I think the key was deleting the old bindings, that seems to be in an in between state.

I installed the Smarthome/J snapshot binding (https://download.smarthomej.org/addons-snapshot.json) on 4.0.2. When creating the Tuya Cloud Project I get the following error:


What am I messing up?
I tried on versions 3.4.5 and 3.4.0 with the line https://download.smarthomej.org/addons.json.

I found in openhab.log: Cannot create thing. No binding found that supports creating a thing of type ‘tuya:project’.

Hi All, does Smarthome/J Tuya Binding support profiles?
I’m asking because my temperature sensor shows

even after I did configure divide by 10.

After several restarts the value gets divided by 10. I cannot recall any other related changes!?

Profiles are a core feature and should be available on every channel.