wildcs / oh3_compiled-addons

OpenHab3 Compile Addons by wildcs
14 stars 1 forks source link

ERR -1003 on L530 #9

Closed freddygood closed 5 months ago

freddygood commented 7 months ago

Hello, thanks for the addon

Since the bulb FW was updated to 1.3.0 I'm getting:

2023-11-26 16:57:32.100 [TRACE] [l.devices.wifi.TapoBaseDeviceHandler] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C) schedulerAction

2023-11-26 16:57:32.105 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) sendAsync unencrypted request: '{"method":"get_device_info","requestTimeMils":1701014252103}' to 'http://192.168.1.123:80/app/request' 

2023-11-26 16:57:32.111 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) encrypted request is '6fb942fec0c32e1ccb59a0dbdbd0017cd38cde16217934bf85dd697a3d0b900640627f220c21d0a9b9e7348d58e4e718707aa4200e145f4a28cba03000a29960fee37ce9e83e557e02d9d71f1fb13c7b5ff62fd0c664202f5504c103f526c099' with sequence '1002963035'

2023-11-26 16:57:32.240 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) receivedRespose '89e592f279717cae9b8f084fa93334a96f6fa888e9d408138422fb45e7d22c4c6deae8fe331fa8d6e94a4da858152ea4ed8237ccb410dfa207afb9561cefa31d826d3ee0eaff53b1fb20cd1f03162fbd37154cf97ddb0b4020036ed64fe338f4ce7db3fd6fc41da47d825653ee809788ebbf134d3b802feedc647ef19e79946292de692feadc25501434d5de7c8fcb059429a92ba2c6aad7fa963d069774170afb678bdc31459e36ba710a034cd481f448047f738d16ccbfdc18fd36ba836d468b85815e2735302e505001ce167444ab21cfa27ce59f13485d97c836f960cfcf89390b6ae1c2c559959dcaa4df0fdfee5671ca42ae07ef5e3294f1ffba2f04f3f877ad0eb6b470ae8a84d4dcd72688ac8c7272adc7bff58d1ceb7e3acffed6cdf6a27830e16dbce8cd6e1c42bdfbbf4e6976d4abdca5da54a6ca7752572abf0cf821b843389f1b78b097b93f8d65347e496c3962f9df3aac799d48034b80e036bed742820651db2c7e08d1264fb7d78155cad9e0f695984eccba522d16c82d6472332ebc797aa419bef06d10b48e7a8939d855c438fcee8d0704c213b872cc471ba281a3503b058addc4f4e3891133550d96e894e951cb53e1729a6ad4b2b4dac0b45b9993ace6a5e94cc5e19e41e7001dbe9ec052b0d454f0b9831c7dd799b2e218013bb303a15e32fca8f678aa8470478c4db35854afcd0cb337d8a431626e1f7325255666fef233d1be14b255a22c10d90881277dd23610c6e3349c999851c4ce012708a085daf77ecb32e3faa823a7561d9284eefab4a402106ca580fdd19d1f7786a3b78747cf775efb39b64f8a7dbb383933c8b133b30e881dba5124c8c82ab5ab5c1a62c1288477f8267920539bedc7630c89e95170d6bee153a03b53e413ec747bb4512d3d7dceb4b4cac9da3ec744898e4450df51b7c14ccdbfdba764760ed5b3075d75d6479685b51793e8fbdeeb885166caca0b42781514160b15a965d983ebd588108a41fd3284f3097ebd69f0a68bc8098b9220228115a466c1e4b87ee08b683272e2cfd9bc2f6b87eb35463ffb976005401e3cc8b077497f5713f5ac3c95d1243443ab831e2af1abf5f3a3ead3dc02f69d20271c643816d16926de3ecf23a5c2e624a05821abcbb0f24fb5fc4ab12758f3b8844e6947b6ae5af235cf0bf123334bf22749cde1c7f15c'

2023-11-26 16:57:32.245 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) decrypted response: '{"error_code":0,"result":{"device_id":"8023CBEE9DD03DF6BEEE070C4358650D1F328A4A","fw_ver":"1.3.0 Build 20230831 Rel. 75926","hw_ver":"1.0.0","type":"SMART.TAPOBULB","model":"L530 Series","mac":"5C-A6-E6-50-CB-4C","hw_id":"93F94D88DA9499F43B929DD38EBDF09A","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"D042998E924F77C9E23A75966003ADD8","specs":"EU","lang":"en_US","device_on":false,"on_time":0,"overheated":false,"nickname":"SUtFQSBKb25pc2s=","avatar":"bulb","brightness":12,"dynamic_light_effect_enable":false,"color_temp":2700,"default_states":{"type":"last_states","state":{"brightness":12,"color_temp":2700}},"time_diff":60,"region":"Europe/Amsterdam","longitude":46486,"latitude":523755,"has_set_location_info":true,"ip":"192.168.1.123","ssid":"ZmctbG9jYWw=","signal_level":2,"rssi":-65}}'

2023-11-26 16:57:32.249 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / DeviceConnector) handle singleResponse from command 'get_device_info'

2023-11-26 16:57:32.254 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / DeviceConnector) queryResponse successfull '{"errorcode":0,"result":{"device_id":"8023CBEE9DD03DF6BEEE070C4358650D1F328A4A","fw_ver":"1.3.0 Build 20230831 Rel. 75926","hw_ver":"1.0.0","type":"SMART.TAPOBULB","model":"L530 Series","mac":"5C-A6-E6-50-CB-4C","hw_id":"93F94D88DA9499F43B929DD38EBDF09A","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"D042998E924F77C9E23A75966003ADD8","specs":"EU","lang":"en_US","device_on":false,"on_time":0,"overheated":false,"nickname":"SUtFQSBKb25pc2s=","avatar":"bulb","brightness":12,"dynamic_light_effect_enable":false,"color_temp":2700,"default_states":{"type":"last_states","state":{"brightness":12,"color_temp":2700}},"time_diff":60,"region":"Europe/Amsterdam","longitude":46486,"latitude":523755,"has_set_location_info":true,"ip":"192.168.1.123","ssid":"ZmctbG9jYWw=","signal_level":2,"rssi":-65},"method":"","msg":""}'

2023-11-26 16:57:48.235 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) sendAsync unencrypted request: '{"method":"multipleRequest","params":{"requests":[{"method":"set_device_info","params":{"device_on":true,"brightness":12,"color_temp":2700,"hue":0,"saturation":100},"requestTimeMils":1701014268234},{"method":"get_device_info","requestTimeMils":1701014268234}]},"requestTimeMils":1701014268234}' to 'http://192.168.1.123:80/app/request' 

2023-11-26 16:57:48.242 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) encrypted request is '6354567ed3c6c3b49371b8b3ec5f878e801ac3494c51754507c96e89898c56f30d4754c8f4929671e62cba517c2716418c5123b073b33040af3ff1fb6f3c9315df882772e8e5816b18f330de34df30882216a8e940d5d37e995ce8ef8b0e793731ad10198065c03006c879b14fa4163f8fb29b4b19b0dbfb176e06a3d5c763a772c933197d5fab9a2ff54735ded95ac08259ac00108139327c4d6749b534f2a1ac093481e812db1a7b38a5602b620b7f2c850bd5b838665d6988bea9fa7a780b49ab69f1d67775956a5784138fa70b5ce2497bb4d6404c6f71a7836e0b4b6cd30910fe1a5da273e2c3b5ae9f82f016122d156f2a30ae0415923cb2e379cbe6340e2fe9708f941f69cc3d7c45bf9c07503dd30a9f5d276789f069d6bb3b70565bd224095fcf1598fd20461597b02bc30fca2eff9160b0813526f58799d8ac88f3d0ac94ebe45081403456f2ce46a1da48' with sequence '1002963036'

2023-11-26 16:57:48.294 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) receivedRespose '3b2a5e99d5356f5ded6c46cd6ede3fb8c85d0e1791a7e4800c16fbcde548ae9f2901d54e001e1965e4eef1f044bc5801a21dbc2ec103d0e1699004e35237b582'

2023-11-26 16:57:48.298 [TRACE] [ernal.api.protocol.klap.KlapProtocol] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / HTTP-KLAP) decrypted response: '{"error_code":-1003}'

2023-11-26 16:57:48.301 [DEBUG] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L530:fbd7e21644:5CA6E650CB4C / DeviceConnector) handle error '@text/error-api-json-decode-fail [ "-1003" ]'

2023-11-26 16:57:48.306 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L530:fbd7e21644:5CA6E650CB4C' changed from ONLINE to UNKNOWN: json decode failed (-1003)

I use the jar file org.openhab.binding.tapocontrol-4.0.4-SNAPSHOT.jar from Nov 25th (md5 77f681f99c95e0095ce10761127b5f97)

Screenshot 2023-11-26 at 17 02 26
wildcs commented 7 months ago

Mhh so this issue only occurs if you set som device info? Do you have a L530V1 or V2 (HW-Rev?)

freddygood commented 7 months ago

Yes, it fails only if I change any state from OpenHab, if I use the Tapo app I can see the changed state in OpenHab

hardwareVersion: 1.0.0
modelId: L530
firmwareVersion: 1.3.0 Build 20230831 Rel. 75926
vendor: Tapo
wildcs commented 7 months ago

Okay i have to test it with my devices, but im currently very busy. So it could take some time

Tuxorials commented 7 months ago

Same issue here

wildcs commented 6 months ago

Seem s that HW-Rev V1 is not supporting multiple-requests (anymore?). For HW V2 with newest Firmware is still working for me. I have to investigate that

wildcs commented 6 months ago

I uploaded a new snapshot for 4.2.0 with some fixes. This should fix it. version for 4.1.0 stable will follow next days. Happy new year

Tuxorials commented 6 months ago

Thank you for checking this issue out. Its still not working for me, but that now seems to be another issue. the lights can be turned on and off, but the color cant be changed unless they are already in "color mode" (idk if thats an actual thing or not). So, to set the color i have to first set A color in the tapo app and then i can change it in openhab. i can also set it with the python and rust tapo apis so maybe just a small bug? Happy new year, everyone

wildcs commented 6 months ago

Can you post TraceLot of sent request? I can confirm the issue with chancing color not working. Was this working with my 4.1.0 SnapShot or not?

Edit: Can you post Thing Properties of your device?

freddygood commented 6 months ago

Happy new year! Many thanks for checking this out! I’m waiting for 4.1.0 (I believe it’s still 2 months old and only 4.2.0 has been updated) and will test it immediately

freddygood commented 6 months ago

I'm testing version 4.2.0 - it looks working for me. Sometimes I'm getting "COMMUNICATION_ERROR" but changing colour seems OK.. I will let it working for a while and keep you posted


2024-01-03 21:33:50.588 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L530:fbd7e21644:5CA6E650CB4C' changed from OFFLINE (COMMUNICATION_ERROR): invalid http-response (9001) to OFFLINE (COMMUNICATION_ERROR): encrypting failed (9500)
2024-01-03 21:33:50.697 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'L530_Series_ColorBulb_4C_Color' received command 41,50,32
2024-01-03 21:33:50.701 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'L530_Series_ColorBulb_4C_Color' predicted to become 50,50,32
2024-01-03 21:33:50.899 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'L530_Series_ColorBulb_4C_Color' received command 38,50,32
2024-01-03 21:33:50.902 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'L530_Series_ColorBulb_4C_Color' predicted to become 50,50,32
2024-01-03 21:33:50.948 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L530:fbd7e21644:5CA6E650CB4C' changed from OFFLINE (COMMUNICATION_ERROR): encrypting failed (9500) to OFFLINE (COMMUNICATION_ERROR): decrypting failed (9501)
2024-01-03 21:33:50.990 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L530:fbd7e21644:5CA6E650CB4C' changed from OFFLINE (COMMUNICATION_ERROR): decrypting failed (9501) to OFFLINE (COMMUNICATION_ERROR): encrypting failed (9500)
2024-01-03 21:33:51.020 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L530:fbd7e21644:5CA6E650CB4C' changed from OFFLINE (COMMUNICATION_ERROR): encrypting failed (9500) to OFFLINE (COMMUNICATION_ERROR): decrypting failed (9501)```