Tuya device not being properly recognized in the binding? Modification needed in the Tuya Binding maybe?

I am trying this device which connects perfectly fine with Tuya and was easily discovered in OH.

Problem is, the Thing added now reports:

HANDLER_INITIALIZING_ERROR
A unit hint must not be set if the item type is not a number with dimension!

I’ve even tried to add it manually, by adding a Generic Tuya device and inserting all necessary data, but unfortunately it gives me the exact message.

Any suggestion on how I can “override” this somehow?

While using the Tuya IoT Platform, I can see for this device this information regarding the Standard Status Set:

temp_current	Integer	
{
  "unit": "℃",
  "min": -550,
  "max": 1250,
  "scale": 1,
  "step": 1
}
humidity_value	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 1000,
  "scale": 1,
  "step": 1
}
battery_state	Enum	
{
  "range": [
    "low",
    "middle",
    "high"
  ]
}
charge_state	Boolean	
"{true,false}"
temp_unit_convert	Enum	
{
  "range": [
    "c",
    "f"
  ]
}
maxtemp_set	Integer	
{
  "unit": "℃",
  "min": -550,
  "max": 1250,
  "scale": 1,
  "step": 1
}
minitemp_set	Integer	
{
  "unit": "℃",
  "min": -550,
  "max": 1250,
  "scale": 1,
  "step": 1
}
maxhum_set	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 1000,
  "scale": 1,
  "step": 1
}
minihum_set	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 1000,
  "scale": 1,
  "step": 1
}
temp_alarm	Enum	
{
  "range": [
    "loweralarm",
    "upperalarm",
    "cancel"
  ]
}
hum_alarm	Enum	
{
  "range": [
    "loweralarm",
    "upperalarm",
    "cancel"
  ]
}
bright_value	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 100,
  "scale": 0,
  "step": 1
}
temp_periodic_report	Integer	
{
  "unit": "秒",
  "min": 30,
  "max": 3600,
  "scale": 0,
  "step": 1
}
switch	Boolean	
"{true,false}"
temp_calibration	Integer	
{
  "unit": "℃",
  "min": -30,
  "max": 30,
  "scale": 1,
  "step": 1
}
hum_calibration	Integer	
{
  "unit": "%",
  "min": -200,
  "max": 200,
  "scale": 1,
  "step": 1
}
alarm_time	Integer	
{
  "unit": "秒",
  "min": 1,
  "max": 3600,
  "scale": 0,
  "step": 1
}
beep	Boolean	
"{true,false}"

I can also see the Standard Instruction Set:

temp_unit_convert	Enum	
{
  "range": [
    "c",
    "f"
  ]
}
maxtemp_set	Integer	
{
  "unit": "℃",
  "min": -550,
  "max": 1250,
  "scale": 1,
  "step": 1
}
minitemp_set	Integer	
{
  "unit": "℃",
  "min": -550,
  "max": 1250,
  "scale": 1,
  "step": 1
}
maxhum_set	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 1000,
  "scale": 1,
  "step": 1
}
minihum_set	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 1000,
  "scale": 1,
  "step": 1
}
temp_periodic_report	Integer	
{
  "unit": "秒",
  "min": 30,
  "max": 3600,
  "scale": 0,
  "step": 1
}
switch	Boolean	
"{true,false}"
temp_calibration	Integer	
{
  "unit": "℃",
  "min": -30,
  "max": 30,
  "scale": 1,
  "step": 1
}
hum_calibration	Integer	
{
  "unit": "%",
  "min": -200,
  "max": 200,
  "scale": 1,
  "step": 1
}
alarm_time	Integer	
{
  "unit": "秒",
  "min": 1,
  "max": 3600,
  "scale": 0,
  "step": 1
}
beep	Boolean	
"{true,false}"

In the JSON editor, I have these options:

[
  {
    "code": "temp_unit_convert",
    "value": "c"
  },
  {
    "code": "maxtemp_set",
    "value": 1250
  },
  {
    "code": "minitemp_set",
    "value": -400
  },
  {
    "code": "maxhum_set",
    "value": 1000
  },
  {
    "code": "minihum_set",
    "value": 0
  },
  {
    "code": "temp_periodic_report",
    "value": 60
  },
  {
    "code": "switch",
    "value": true
  },
  {
    "code": "temp_calibration",
    "value": 0
  },
  {
    "code": "hum_calibration",
    "value": 0
  },
  {
    "code": "alarm_time",
    "value": 15
  },
  {
    "code": "beep",
    "value": true
  }
]

Product name appears like so: (停产)WIFI温湿度报警器

If any other information might be needed in order to fix the binding, please let me know so I can pass that and make it work properly.

Thank you very much!

Open an issue not a thread. And check the logs. There’s likely to be an entry “Channel … has unit … but openHAB doesn’t know the dimension” or “Unknown unit from pattern …”.

Although the current Tuya binding should convert both the Chinese for seconds and the single-glyph degrees Celsius to something the openHAB core understands so be sure to provide version numbers too.

I have the same problem and opened an issue.

I was just about to open an issue. I will post more information in there regarding my device.

EDIT: For future reference, this is the issue.

EDIT2: Problem solved here.

Hi Pedro,

Did you also unload the official Tuya binding and put the jar in the addons and noticed the netty features were missing?

I have put the missing netty jars also in the addons folder to get it resolved.

What did you do to get it to work?

I first uninstalled the binding, then went to openhab console via terminal and installed the binding from there, starting it in the end and that’s it, it just worked. :slight_smile:

Aha. You probably had another binding which installed the netty bundles. After removing the official Tuya binding my Netty bundles were gone. That why I had to reinstall the Netty bundles using jars.

Did you already install the Milestone version where the repaired binding was merged into?