Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New device won't come online #584

Open
psmedley opened this issue Jun 29, 2024 · 3 comments
Open

New device won't come online #584

psmedley opened this issue Jun 29, 2024 · 3 comments

Comments

@psmedley
Copy link

I bought an electric blanket which has tuya control of the individual controllers.

Trying to add it into OpenHAB. The 2x controllers are detected fine, but report "CONFIGURATION_ERROR
No channels added and schema not found."

I've tried adding the IP address, and also changing the polling interval from 0.

The devices in question are 192.168.1.132 and 192.168.1.67

Code view in openHAB is:
UID: tuya:tuyaDevice:11152208a4e57cb111 label: Julie's Blanket thingTypeUID: tuya:tuyaDevice configuration: pollingInterval: 10 protocol: "3.3" productId: xxxxxxxxxxxxxxxxxx deviceId: 11152208a4e57cb111 ip: 192.168.1.67 localKey: xxxxxxxxxxxxxxxx

Excerpt of log is:
2024-06-29 17:43:46.803 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Received encoded '000055AA0000000000000013000000AC00000000D09766676F3369EB10B5E9F132FD802A928D582D607A50D05A350F3251A1DC787445901F2AC1999A1EDBD1741DBED0E2293A2C7DFD824D2BB647958922AED7904CB2E96C0A7F1E413BAED18D2F9CE89DD98A2083CC863E53249CDFED5EC93122B4B2BBEECE5882C45B23697E1DAAC6FC75A1960D2F87849519263C633993BD3E0280EA7371BD425875C843DF05523C7B768FFC6AB334859566B8DB83B5BC22158542706B0000AA55' 2024-06-29 17:43:46.804 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Decoded raw payload: 7B226970223A223139322E3136382E312E313332222C2267774964223A223131313532323038613465353763623438396264222C22616374697665223A322C226162696C697479223A302C226D6F6465223A302C22656E6372797074223A747275652C2270726F647563744B6579223A226D336B6D636E3965766F676E6B6C7370222C2276657273696F6E223A22332E33227D0D0D0D0D0D0D0D0D0D0D0D0D0D 2024-06-29 17:43:46.804 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=UDP_NEW, content='DiscoveryMessage{ip='192.168.1.132', deviceId='11152208a4e57cb489bd', active=2, ability=0, mode=0, encrypt=true, productKey='xxxxxxxx', version='3.3', token= true, wf_cfg=true}'} 2024-06-29 17:43:46.807 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Received encoded '000055AA0000000000000013000000AC00000000D09766676F3369EB10B5E9F132FD802A928D582D607A50D05A350F3251A1DC787445901F2AC1999A1EDBD1741DBED0E2293A2C7DFD824D2BB647958922AED7904CB2E96C0A7F1E413BAED18D2F9CE89DD98A2083CC863E53249CDFED5EC93122B4B2BBEECE5882C45B23697E1DAAC6FC75A1960D2F87849519263C633993BD3E0280EA7371BD425875C843DF05523C7B768FFC6AB334859566B8DB83B5BC22158542706B0000AA55' 2024-06-29 17:43:46.807 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Decoded raw payload: 7B226970223A223139322E3136382E312E313332222C2267774964223A223131313532323038613465353763623438396264222C22616374697665223A322C226162696C697479223A302C226D6F6465223A302C22656E6372797074223A747275652C2270726F647563744B6579223A226D336B6D636E3965766F676E6B6C7370222C2276657273696F6E223A22332E33227D0D0D0D0D0D0D0D0D0D0D0D0D0D 2024-06-29 17:43:46.807 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=UDP_NEW, content='DiscoveryMessage{ip='192.168.1.132', deviceId='11152208a4e57cb489bd', active=2, ability=0, mode=0, encrypt=true, productKey='xxxxxxxx', version='3.3', token= true, wf_cfg=true}'} 2024-06-29 17:43:48.415 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Received encoded '000055AA0000000000000013000000AC00000000D09766676F3369EB10B5E9F132FD802A17F99270A6EE2D03B2D94FE220997382E24D82EE0ABAD12EC766707B75553B52BBADC06C25BF6933F127C9C9CA0AC516CB5924BB8792FE5EAE7C9040E5921A98017F2170860421E6FC66F0A1ADE138915FDE850CD157270C5F3D1AB5AE90B30087487189FD37F56DAC4A9898965D43871C8343BC25F3403C0C4C3DB59350D34AE0BD1F2CBAD705886D4ED8EED5AB9EB96709F7B10000AA55' 2024-06-29 17:43:48.416 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Decoded raw payload: 7B226970223A223139322E3136382E312E3637222C2267774964223A223131313532323038613465353763623438653131222C22616374697665223A322C226162696C697479223A302C226D6F6465223A302C22656E6372797074223A747275652C2270726F647563744B6579223A226D336B6D636E3965766F676E6B6C7370222C2276657273696F6E223A22332E33227D0E0E0E0E0E0E0E0E0E0E0E0E0E0E 2024-06-29 17:43:48.416 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=UDP_NEW, content='DiscoveryMessage{ip='192.168.1.67', deviceId='11152208a4e57cb48e11', active=2, ability=0, mode=0, encrypt=true, productKey='xxxxxxxxx', version='3.3', token= true, wf_cfg=true}'} 2024-06-29 17:43:48.419 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Received encoded '000055AA0000000000000013000000AC00000000D09766676F3369EB10B5E9F132FD802A17F99270A6EE2D03B2D94FE220997382E24D82EE0ABAD12EC766707B75553B52BBADC06C25BF6933F127C9C9CA0AC516CB5924BB8792FE5EAE7C9040E5921A98017F2170860421E6FC66F0A1ADE138915FDE850CD157270C5F3D1AB5AE90B30087487189FD37F56DAC4A9898965D43871C8343BC25F3403C0C4C3DB59350D34AE0BD1F2CBAD705886D4ED8EED5AB9EB96709F7B10000AA55' 2024-06-29 17:43:48.419 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Decoded raw payload: 7B226970223A223139322E3136382E312E3637222C2267774964223A223131313532323038613465353763623438653131222C22616374697665223A322C226162696C697479223A302C226D6F6465223A302C22656E6372797074223A747275652C2270726F647563744B6579223A226D336B6D636E3965766F676E6B6C7370222C2276657273696F6E223A22332E33227D0E0E0E0E0E0E0E0E0E0E0E0E0E0E

@psmedley
Copy link
Author

pastebin log at https://pastebin.com/TJUB27um

@Manni51
Copy link

Manni51 commented Aug 5, 2024

I have similar behavior for my Tuya wifi rf ir remote control 433mhz/315mhz.

@JustinGeorgi
Copy link

I am trying the Tuya binding for the first time and I am getting this same error. I'm attempting to connect a Micro USB switch.

Tuya Smart app has control over the device.

Cloud account is working and Cloud Account Thing is connected (as far as I can tell).

USB switch is not discovered by Thing scan.

Trace logs show that UDP info is being properly received and decoded:

24-08-10 11:51:55.243 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Received encoded 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

2024-08-10 11:51:55.243 [TRACE] [.internal.local.handlers.TuyaDecoder] - udpListener: Decoded raw payload: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2024-08-10 11:51:55.243 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=BROADCAST_LPV34, content='DiscoveryMessage{ip='XXX.XXX.XXX.XXX', deviceId='XXXXXXXXXXXXX', active=2, ability=0, mode=0, encrypt=true, productKey='XXXXXXXXXXXXXX', version='3.4', token= true, wf_cfg=true}'}

During Thing scan trace logs show that device information is being collected:

2024-08-10 11:51:53.345 [TRACE] [a.internal.cloud.TuyaContentListener] - Received from 'https://openapi.tuyaus.com/v1.0/users/XXXXXXXXX/devices?from=&page_no=1&page_size=100': Code = {200}, Headers = {Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Date: Sat, 10 Aug 2024 18:51:53 GMT, Access-Control-Allow-Credentials: true, Access-Control-Allow-Headers: , Access-Control-Allow-Headers: access_token,Content-Type, Access-Control-Allow-Methods: POST, Access-Control-Allow-Methods: OPTIONS, Access-Control-Allow-Methods: GET, Access-Control-Allow-Methods: DELETE, Access-Control-Allow-Methods: PUT, Access-Control-Allow-Origin: https://iot.tuya.com,https://platform.tuya.com, Gateway-Info: highway, Server: Sec, Strict-Transport-Security: max-age=31536000}, Content = {{"result":[{"active_time":1723311084,"biz_type":0,"category":"tdq","create_time":1723311084,"icon":"smart/icon/ay1521618643672lvY0O/e4dc63f82a38c22351614ab5bb9424fe.png","id":"XXXXXXXXXXXX","ip":"XXX.XXX.XXX.XXX","lat":"XX.XXX","local_key":"XXXXXXXXXX","lon":"XXX.XXX","model":"","name":"USB Smart Adapter","online":true,"owner_id":"XXXXXX","product_id":"XXXXXXXXXXX","product_name":"","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0},{"code":"test_bit","value":0},{"code":"relay_status","value":"2"},{"code":"random_time","value":""},{"code":"cycle_time","value":""}],"sub":false,"time_zone":"-07:00","uid":"az1714705028689iIC41","update_time":1723311086,"uuid":"6d48db3a9a7fbe90"},...other devices...}],"success":true,"t":1723315913326,"tid":"9bf74c2e574911efbfc576d2ae8dc145"}}

Subsequent log files do show an api error:

2024-08-10 11:51:53.444 [TRACE] [a.internal.cloud.TuyaContentListener] - Received from 'https://openapi.tuyaus.com/v1.0/iot-03/devices/factory-infos?device_ids=eb7c36cec3847a20c2yesr': Code = {200}, Headers = {Content-Type: application/json;charset=UTF-8, Content-Length: 231, Connection: keep-alive, Date: Sat, 10 Aug 2024 18:51:53 GMT, Access-Control-Allow-Credentials: true, Access-Control-Allow-Headers: , Access-Control-Allow-Headers: access_token,Content-Type, Access-Control-Allow-Methods: POST, Access-Control-Allow-Methods: OPTIONS, Access-Control-Allow-Methods: GET, Access-Control-Allow-Methods: DELETE, Access-Control-Allow-Methods: PUT, Access-Control-Allow-Origin: https://iot.tuya.com,https://platform.tuya.com, Gateway-Info: highway, Server: Sec, Strict-Transport-Security: max-age=31536000}, Content = {{"code":60009001,"msg":"API permission package error. For the solution, see https://developer.tuya.com/en/docs/iot/authentication-method?id=Ka49gbaxjygox.","success":false,"t":1723315913425,"tid":"9c08f4ef574911efa290626d6914b0af"}}

(The link in that error message does seem to indicate that something changed about API access only two months ago.)

Attempt to create device manually with the information from the above log results in the same error as reported by OP:

CONFIGURATION_ERROR No channels added and schema not found.

OH Details

runtimeInfo:
  version: 4.3.0
  buildString: "Build #4186"
locale: en-US
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 17.0.11
  javaVendor: Debian
  osName: Linux
  osVersion: 6.8.8-2-pve
  osArchitecture: amd64
  availableProcessors: 2
  freeMemory: 689058568
  totalMemory: 1291845632
  uptime: 1658316
  startLevel: 100
addons:
  - automation-jsscripting
  - binding-ambientweather
  - binding-astro
  - binding-chatgpt
  - binding-chromecast
  - binding-ephemeris
  - binding-gpstracker
  - binding-harmonyhub
  - binding-hpprinter
  - binding-http
  - binding-logreader
  - binding-mqtt
  - binding-nest
  - binding-network
  - binding-networkupstools
  - binding-openuv
  - binding-openweathermap
  - binding-snmp
  - binding-solaredge
  - binding-sonos
  - binding-weathercompany
  - misc-metrics
  - misc-openhabcloud
  - persistence-mapdb
  - persistence-rrd4j
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - transformation-scale
  - transformation-xpath
  - ui-basic
  - ui-habot
  - voice-mimictts
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    pixelRatio: 1
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: en-US
    languages:
      - en-US
      - en
    onLine: true
    platform: Linux x86_64
  screen:
    width: 1920
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
    blocklyRenderer: null
  userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
    Gecko) Chrome/126.0.0.0 Safari/537.36
timestamp: 2024-08-10T20:03:33.572Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants