home-assistant-tapo-p100 icon indicating copy to clipboard operation
home-assistant-tapo-p100 copied to clipboard

Add support for L920 LED Strip Light

Open acs-lux opened this issue 2 years ago • 16 comments

After installing the addon all I get is two sensors for overheat and signal level. These appear to work fine. There is no light entity.

Debug log

Output of python test script:

hassio@DESKTOP-52GDQOA:/mnt/c/users/desktop$ python3 main.py <ID> {'device_id': 'DEV-ID', 'fw_ver': '1.0.7 Build 220119 Rel.221439', 'hw_ver': '1.0', 'type': 'SMART.TAPOBULB', 'model': 'L920', 'mac': '5C-A6-E6-19-BD-C9', 'hw_id': '410A49E4E50D1DD5868EDDF2490083C4', 'fw_id': '7BECA9DC454565672FEC87D1104F9972', 'oem_id': '657AEF3473110D5D61531C4A8B32460F', 'color_temp_range': [9000, 9000], 'overheated': False, 'ip': '192.168.178.129', 'time_diff': 60, 'ssid': 'RlJJVFohIEJveCAyNA==', 'rssi': -40, 'signal_level': 3, 'latitude': <lat>, 'longitude': <long>, 'lang': 'en_US', 'avatar': 'light_strip', 'region': 'Europe/Luxembourg', 'specs': '', 'nickname': 'TG91bmdlIExpZ2h0IFN0cmlw', 'has_set_location_info': True, 'lighting_effect': {'enable': 0, 'id': 'TapoStrip_ID', 'name': 'Flicker', 'custom': 0, 'brightness': 29, 'display_colors': [[30, 81, 100], [40, 100, 100]]}, 'music_rhythm_enable': False, 'music_rhythm_mode': 'single_lamp', 'device_on': False, 'brightness': 33, 'hue': 22, 'saturation': 100, 'color_temp': 0, 'default_states': {'type': 'last_states', 'state': {'lighting_effect': {'type': 'random', 'id': 'TapoStrip_ID', 'name': 'Flicker', 'enable': 1, 'segments': [1], 'expansion_strategy': 1, 'transition': 0, 'transition_range': [375, 500], 'duration': 0, 'hue_range': [30, 40], 'saturation_range': [100, 100], 'brightness_range': [50, 100], 'brightness': 29, 'init_states': [[30, 81, 80]], 'custom': 0, 'display_colors': [[30, 81, 100], [40, 100, 100]]}}}} Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7ff153e8e520>

Addon installed via HACS is v1.2.9

acs-lux avatar Mar 18 '22 09:03 acs-lux

Formatted

{
   "device_id":"DEV-ID",
   "fw_ver":"1.0.7 Build 220119 Rel.221439",
   "hw_ver":"1.0",
   "type":"SMART.TAPOBULB",
   "model":"L920",
   "mac":"5C-A6-E6-19-BD-C9",
   "hw_id":"410A49E4E50D1DD5868EDDF2490083C4",
   "fw_id":"7BECA9DC454565672FEC87D1104F9972",
   "oem_id":"657AEF3473110D5D61531C4A8B32460F",
   "color_temp_range":[
      9000,
      9000
   ],
   "overheated":false,
   "ip":"192.168.178.129",
   "time_diff":60,
   "ssid":"RlJJVFohIEJveCAyNA==",
   "rssi":-40,
   "signal_level":3,
   "latitude":"<lat>",
   "longitude":"<long>",
   "lang":"en_US",
   "avatar":"light_strip",
   "region":"Europe/Luxembourg",
   "specs":"",
   "nickname":"TG91bmdlIExpZ2h0IFN0cmlw",
   "has_set_location_info":true,
   "lighting_effect":{
      "enable":0,
      "id":"TapoStrip_ID",
      "name":"Flicker",
      "custom":0,
      "brightness":29,
      "display_colors":[
         [
            30,
            81,
            100
         ],
         [
            40,
            100,
            100
         ]
      ]
   },
   "music_rhythm_enable":false,
   "music_rhythm_mode":"single_lamp",
   "device_on":false,
   "brightness":33,
   "hue":22,
   "saturation":100,
   "color_temp":0,
   "default_states":{
      "type":"last_states",
      "state":{
         "lighting_effect":{
            "type":"random",
            "id":"TapoStrip_ID",
            "name":"Flicker",
            "enable":1,
            "segments":[
               1
            ],
            "expansion_strategy":1,
            "transition":0,
            "transition_range":[
               375,
               500
            ],
            "duration":0,
            "hue_range":[
               30,
               40
            ],
            "saturation_range":[
               100,
               100
            ],
            "brightness_range":[
               50,
               100
            ],
            "brightness":29,
            "init_states":[
               [
                  30,
                  81,
                  80
               ]
            ],
            "custom":0,
            "display_colors":[
               [
                  30,
                  81,
                  100
               ],
               [
                  40,
                  100,
                  100
               ]
            ]
         }
      }
   }
}

petretiandrea avatar Mar 18 '22 09:03 petretiandrea

Ah sorry didn't know how to do that.

acs-lux avatar Mar 18 '22 09:03 acs-lux

@acs-lux. I've added an unstable support for L920. You can find it in 1.2.10 version. Actually, I hope, only RGB works, so you can change a single color over the entire led strip.

I will add an addressable support, for light effects asap. Probably, I will ask you to do some tests using the same script. Thanks

petretiandrea avatar Mar 19 '22 09:03 petretiandrea

Ok great, happy to test. I'll try 1.2.10 and let you know.

acs-lux avatar Mar 19 '22 09:03 acs-lux

Hi, it works.

Exactly like the RGB bulb. Neither have the effects drop down option i noticed but it works great.

Is it via cloud or direct?

acs-lux avatar Mar 20 '22 08:03 acs-lux

It works direct through LAN. Sorry for the absence, I will resume full development for L920

petretiandrea avatar Apr 14 '22 17:04 petretiandrea

Hello petretiandrea, thanks for the amazing work! I would like to ask, at this moment, what features about L920-5 led strip is supported? Are you going to offer full RGBIC support?

athanasios-gkikas avatar Jul 19 '22 09:07 athanasios-gkikas

I was asking about future support, and current features, because at this moment, my L920 strip is recognized as a light, but I cannot change any color. I can select a color through the color wheel, but it makes no change. Right now, I can only turn it on/off and change its brightness.

athanasios-gkikas avatar Jul 21 '22 19:07 athanasios-gkikas

Same here. Got a couple of L920's in my daughter's rooms. They want to know when we can use effects via HA (so they don't have to keep asking for my phone). :-)

loryanstrant avatar Aug 10 '22 11:08 loryanstrant

Same here, wondering if there is any update for the "effects" so we could chose what effect to activate

Thorvarium avatar Aug 24 '22 21:08 Thorvarium

To support effects, I need some help. First install my plugp100 library pip install plugp100==2.1.18 and copy this python script

import asyncio
from plugp100 import TapoApiClient


async def main():
    # create generic tapo api
    sw = TapoApiClient("<ip>", "<email>", "<passwd>")
    await sw.login()
    state = await sw.get_state()
    print(state.state)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close()

Now follow these steps:

  1. open tapo app and select and effect
  2. take an app screenshot
  3. execute my python script and take the output
  4. repeat these steps above 2 or 3 times
  5. report everything here, to avoid confusion please upload a zip file or something else

petretiandrea avatar Sep 15 '22 20:09 petretiandrea

To support effects, I need some help. First install my plugp100 library pip install plugp100==2.1.18 and copy this python script

import asyncio
from plugp100 import TapoApiClient


async def main():
    # create generic tapo api
    sw = TapoApiClient("<ip>", "<email>", "<passwd>")
    await sw.login()
    state = await sw.get_state()
    print(state.state)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close()

Now follow these steps:

  1. open tapo app and select and effect
  2. take an app screenshot
  3. execute my python script and take the output
  4. repeat these steps above 2 or 3 ti tapo.zip mes
  5. report everything here, to avoid confusion please upload a zip file or something else

Zip attached with 5 effects, thanks!

Thorvarium avatar Sep 15 '22 21:09 Thorvarium

@Thorvarium Thanks I will work on it

petretiandrea avatar Sep 15 '22 21:09 petretiandrea

@petretiandrea by the way if you haven't noticed this yet: When you have an effect active and try to change color to a solid color on the home assistant thru your integration the command is just ignored. Need to do something like "Leave effect mode", dunno.

Thorvarium avatar Sep 15 '22 21:09 Thorvarium

@petretiandrea by the way if you haven't noticed this yet: When you have an effect active and try to change color to a solid color on the home assistant thru your integration the command is just ignored. Need to do something like "Leave effect mode", dunno.

That's interesting, I don't think we experience that. I sometimes use my mobile app for effects, but then when the HA automation runs it sets the colour to solid. But that's possibly because my automation is sending the light turn on command which sets the colour and brightness at the same time.

loryanstrant avatar Sep 15 '22 22:09 loryanstrant

@petretiandrea by the way if you haven't noticed this yet: When you have an effect active and try to change color to a solid color on the home assistant thru your integration the command is just ignored. Need to do something like "Leave effect mode", dunno.

That's interesting, I don't think we experience that. I sometimes use my mobile app for effects, but then when the HA automation runs it sets the colour to solid. But that's possibly because my automation is sending the light turn on command which sets the colour and brightness at the same time.

Maybe yeah, I have this issue when I try to set the color by the web interface card image

Thorvarium avatar Sep 15 '22 23:09 Thorvarium

Closed cause l920 is fully supported

petretiandrea avatar Jan 31 '23 07:01 petretiandrea

Hey @petretiandrea, I see now the effects drop-down on the 930 strips, but for me it isn't showing on the 920 ones

Thorvarium avatar Jan 31 '23 12:01 Thorvarium

Hey @petretiandrea, I see now the effects drop-down on the 930 strips, but for me it isn't showing on the 920 ones

Use v1.5.1

petretiandrea avatar Jan 31 '23 12:01 petretiandrea

Hey @petretiandrea, I see now the effects drop-down on the 930 strips, but for me it isn't showing on the 920 ones

Use v1.5.1

Oh sorry, I should have checked the versions again. Thanks for the awesome work

Thorvarium avatar Jan 31 '23 12:01 Thorvarium