[TapoControl] - Control Tapo Smart WiFi-Devices with Openhab

@holyibis
OK i integrated it for testing. You can try it downloading the .jar from here
Please give response here for creating a PR

L630 support:
Ok, first I thought the ThingHandlerFactory would not be found, but that was just my mistake by not correctly replacing the addon.

The first smoke test passed, but I found some issues that I want to further investigate over the weekend with some more testing:

  • Setting the color does not work most of the time, but sporadically also works (receiving color that is set via the Tapo App directly works reliably).
  • There are quite some DEBUG logs that read “command not sent becauso of min_gap: 1669406152705 ← 1669406152243”
  • The DeviceOnTime is stuck at 0 s

Thanks for the quick implementation!

Hi, need a trace log if color change is not working. OnTime seems not to be supported by this device.

Finally Got my L530 lights working except for colour selection. Is this a known issue or did I do something wrong?

1 Like

No my L530 is working fine. Need trace log to investigate it.

Here is the TRACE of a requested, but unsuccesfull color change via colorpicker in sitemap. Unsuccesful here means that the observable state of the light does not change, and Color item is set to 10,100,6 regardless of input.

2022-11-26 22:06:05.951 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) encrypting payload '{"method":"set_device_info","params":{"saturation":100.0,"brightness":75.69832402234637,"device_on":true,"hue":10.000000074505806},"requestTimeMils":1669496765951}'
2022-11-26 22:06:05.956 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) sendAsncRequest to 'http://192.168.XXX.XXX/app?token=F96DA2C0D97F22DCCBEF2EDC5BE62EDA' with cookie 'TP_SESSIONID=6BEC1AF8585613C0624F9BC47BD29FC0'
2022-11-26 22:06:05.957 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) command/payload: 'set_device_info''{"method":"securePassthrough","params":{"request":"nh8aGxbVJezCA+CgwppOXaEnK1kpT1o+EukWtC1MSHQ71kv4+TpN8piiN7Jz6tHr9wAi29HhEwHShAmLi3o2+cOAO3BVJ+XdYLfbK27CKLbcDgv/xO6+2t57P/GyJLYNImlYuoLvdkVVoW7+NxKodx+8Migvp3zX2JX4Hk0WI/lkIj8e2S2MHYyDv40ngE+7GaZ0YuxhHhVyUBxj4tZstzLmTVx9cVjUOZHk0AnwmXI\u003d"},"requestTimeMils":1669496765956}'
2022-11-26 22:06:05.958 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) DeviceConnetor_queryInfo from 'http://192.168.XXX.XXX/app?token=F96DA2C0D97F22DCCBEF2EDC5BE62EDA'
2022-11-26 22:06:05.959 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) encrypting payload '{"method":"get_device_info","requestTimeMils":1669496765959}'
2022-11-26 22:06:05.960 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) sendAsncRequest to 'http://192.168.XXX.XXX/app?token=F96DA2C0D97F22DCCBEF2EDC5BE62EDA' with cookie 'TP_SESSIONID=6BEC1AF8585613C0624F9BC47BD29FC0'
2022-11-26 22:06:05.961 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) command/payload: 'get_device_info''{"method":"securePassthrough","params":{"request":"SMVGCt7/JRGXJUsEexXyZXIjVTz/+ZEmH4bkmCmj+2yiKM+DK/xET2jYqAPQ1Sfo161EF11Ijpe8q64yr5cnjQ\u003d\u003d"},"requestTimeMils":1669496765960}'
2022-11-26 22:06:06.071 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) receivedRespose '{"error_code":0,"result":{"response":"UV9WUWD0qhC7nJ2x4/wnBtq5CKssp3+mxuUDpR45hcc="}}'
2022-11-26 22:06:06.073 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) decryptedResponse '{"error_code":-1008}'
2022-11-26 22:06:06.074 [DEBUG] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) device answers with errorcode -1008 - received invalid parameter
2022-11-26 22:06:06.076 [DEBUG] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) set deviceInfo not succesfull: {"error_code":-1008}
2022-11-26 22:06:06.088 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) receivedRespose '{"error_code":0,"result":{"response":"XXXXXXXXXXXXXXXXXXXX"}}'
2022-11-26 22:06:06.089 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) decryptedResponse '{"result":{"device_id":"XXXXXXXXXXXXXXXXXXXX","fw_ver":"1.0.3 Build 220703 Rel.125450","hw_ver":"1.0","type":"SMART.TAPOBULB","model":"L630","mac":"34-60-F9-B2-9C-5E","hw_id":"0161987C98B25AD5BC3CD002C7EEE7D0","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"9E6C0F34C742F1F710041E8DED16B223","color_temp_range":[2200,6500],"overheated":false,"ip":"192.168.XXX.XXX","time_diff":60,"ssid":"XXXXXX","rssi":-72,"signal_level":1,"latitude":XXXXXX,"longitude":XXXXXX,"lang":"en_US","avatar":"bulb","region":"Europe/Berlin","specs":"","nickname":"XXXXXX","has_set_location_info":true,"device_on":true,"brightness":6,"hue":10,"saturation":100,"color_temp":2700,"dynamic_light_effect_enable":false,"default_states":{"type":"last_states","state":{"brightness":6,"hue":10,"saturation":100,"color_temp":2700}}},"error_code":0}'
2022-11-26 22:06:06.090 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) received result: {"result":{"device_id":"XXXXXXXXXXXXXXXXXXXX","fw_ver":"1.0.3 Build 220703 Rel.125450","hw_ver":"1.0","type":"SMART.TAPOBULB","model":"L630","mac":"34-60-F9-B2-9C-5E","hw_id":"0161987C98B25AD5BC3CD002C7EEE7D0","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"9E6C0F34C742F1F710041E8DED16B223","color_temp_range":[2200,6500],"overheated":false,"ip":"192.168.XXX.XXX","time_diff":60,"ssid":"XXXXXX","rssi":-72,"signal_level":1,"latitude":XXXXXX,"longitude":XXXXXX,"lang":"en_US","avatar":"bulb","region":"Europe/Berlin","specs":"","nickname":"XXXXXX","has_set_location_info":true,"device_on":true,"brightness":6,"hue":10,"saturation":100,"color_temp":2700,"dynamic_light_effect_enable":false,"default_states":{"type":"last_states","state":{"brightness":6,"hue":10,"saturation":100,"color_temp":2700}}},"error_code":0}
2022-11-26 22:06:06.283 [DEBUG] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) command not sent becauso of min_gap: 1669496766283 <- 1669496765951
2022-11-26 22:06:06.285 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) DeviceConnetor_queryInfo from 'http://192.168.XXX.XXX/app?token=F96DA2C0D97F22DCCBEF2EDC5BE62EDA'
2022-11-26 22:06:06.287 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) encrypting payload '{"method":"get_device_info","requestTimeMils":1669496766287}'
2022-11-26 22:06:06.288 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) sendAsncRequest to 'http://192.168.XXX.XXX/app?token=F96DA2C0D97F22DCCBEF2EDC5BE62EDA' with cookie 'TP_SESSIONID=6BEC1AF8585613C0624F9BC47BD29FC0'
2022-11-26 22:06:06.289 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) command/payload: 'get_device_info''{"method":"securePassthrough","params":{"request":"SMVGCt7/JRGXJUsEexXyZXIjVTz/+ZEmH4bkmCmj+2yiKM+DK/xET2jYqAPQ1SfoJ5mWvYn4+Acy6N7KYgB5Gw\u003d\u003d"},"requestTimeMils":1669496766288}'
2022-11-26 22:06:06.391 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) receivedRespose '{"error_code":0,"result":{"response":"XXXXXXXXXXXXXXXXXXXX"}}'
2022-11-26 22:06:06.392 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L630:tapoBridge:spot1) decryptedResponse '{"result":{"device_id":"XXXXXXXXXXXXXXXXXXXX","fw_ver":"1.0.3 Build 220703 Rel.125450","hw_ver":"1.0","type":"SMART.TAPOBULB","model":"L630","mac":"34-60-F9-B2-9C-5E","hw_id":"0161987C98B25AD5BC3CD002C7EEE7D0","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"9E6C0F34C742F1F710041E8DED16B223","color_temp_range":[2200,6500],"overheated":false,"ip":"192.168.XXX.XXX","time_diff":60,"ssid":"XXXXXX","rssi":-72,"signal_level":1,"latitude":XXXXXX,"longitude":XXXXXX,"lang":"en_US","avatar":"bulb","region":"Europe/Berlin","specs":"","nickname":"XXXXXX","has_set_location_info":true,"device_on":true,"brightness":6,"hue":10,"saturation":100,"color_temp":2700,"dynamic_light_effect_enable":false,"default_states":{"type":"last_states","state":{"brightness":6,"hue":10,"saturation":100,"color_temp":2700}}},"error_code":0}'
2022-11-26 22:06:06.394 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L630:tapoBridge:spot1) received result: {"result":{"device_id":"XXXXXXXXXXXXXXXXXXXX","fw_ver":"1.0.3 Build 220703 Rel.125450","hw_ver":"1.0","type":"SMART.TAPOBULB","model":"L630","mac":"34-60-F9-B2-9C-5E","hw_id":"0161987C98B25AD5BC3CD002C7EEE7D0","fw_id":"7BECA9DC454565672FEC87D1104F9972","oem_id":"9E6C0F34C742F1F710041E8DED16B223","color_temp_range":[2200,6500],"overheated":false,"ip":"192.168.XXX.XXX","time_diff":60,"ssid":"XXXXXX","rssi":-72,"signal_level":1,"latitude":XXXXXX,"longitude":XXXXXX,"lang":"en_US","avatar":"bulb","region":"Europe/Berlin","specs":"","nickname":"XXXXXX","has_set_location_info":true,"device_on":true,"brightness":6,"hue":10,"saturation":100,"color_temp":2700,"dynamic_light_effect_enable":false,"default_states":{"type":"last_states","state":{"brightness":6,"hue":10,"saturation":100,"color_temp":2700}}},"error_code":0}

There is an error code -1008 and a “command not sent becauso of min_gap” in it, so hopefully that helps in debugging. Please let me know if you require a specific test scenario.

Overall status:

  • Output - works as expected
  • Brightness - works as expected
  • Color - see above
  • Color temperature - can be read but not set (is this the intended behaviour?)
  • WIFi Signal - 1, seems plausible, but I don’t have a reference
  • OnTime - not working or not supported, constantly 0
  • Overheated - OFF, seems plausible, but I don’t know how to test this other than to manipulate the (REST?) response. I don’t want to actually overheat my device.
1 Like

@holyibis

device answers with errorcode -1008 - received invalid parameter

This is the real error. I belive the number sent to the device are too long.
Uploaded a new fix for that. Please test it.

Overheated is ReadOnly. ColorTemp should be able to set for white bulbs only

@344clinton
same for you. please test new .jar and write result down here

The error is fixed, Color temperature is working fine now.
I did have to use the parameter “sendFrequency” in the Colorpicker of the sitemap, otherwise it would still drop the signals quite often. But with sendFrequency=1000, it is working like a charm now.

I can not test L610 as I do not own it, and since On-Time seems to be not supported, that signal should be removed from the Thing L630.
Other than that I am confident that (just from device test results point of view) the changes can be implemented to the binding.

Thank you so much for the quick on-demand support!

I’ll give it a try tonight if I have time. I know you all don’t hear it enough so thank you for all your hard work

Craig

hello @Bigdesaster, i’m looking for a contact sensor, and i’ve seen the Tapo one.
to make it work, i need the tapo hub H100.
i would like to buy the HUB (needed) and the contact sensor, but actually are not supported by binding.
do you think could be possible to add the support for this device on your binding?
as last time for L530, i can send you the log you need :slight_smile:
let me know, and if you would like to manage another challange on this product i will be pleasured to be a cavy :wink:

I afraid that communication protocoll for sensors and hub is not like the direct wifi devices. So it may be not so easy as the normal one.
To investigate that communication i need a hub and some sensors.
But the windows-sensors are too expensive. There are much cheaper Zigbee sensors available.

I understand technocal issues…
Hub + 1 sensor are about 50€ in total on amazon. I dunno if i can post link here,but if you look for hub you can see the bundle with sensor.
About 25€ for each piece.
That’s why male smart home with tapp could be a nice idea and at the same time cheap :wink:

Sorry for a late reply. Unfortunately, I decided to return the bulbs for some brighter ones, so I can’t test your latest.

Still experiencing issues with tapo L 530E Vers. 2.0. Can’t control color.

try to manage color first time from tapo app, and then try to use openhab…i’ve seen that first time needs to be changed from app and then openhab works…

Ah okay got it. Works for me now fine. The bulbs were setted in tapo control app to predefined mode with daylight. That blocks color control via tapocontrol binding.

Ok that is a usefull information to fix this. Thank you.
Not testet yet but it should be reproducible if you set it agay to “daylight” with app und try to change with oh3 again.

Jup is reproduceable.

Hi, Is anyone else having issues with the latest firmware on the l530 bulbs? I get a login error when I attempt to connect the bulbs, however they are able to be discovered through the web portal.

Hi,
for my L530 Firmware 1.2.2 is the newest and everything is working fine.
Maybe will tracelog help.