FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Feature Request] C220 camera line crossing detection on-off switch · Issue #1551 · python-kasa/python-kasa · GitHub

Repository navigation

[Feature Request] C220 camera line crossing detection on-off switch #1551

Description

Hi,
I've a C220 camera on home assistant and I would be able to configure the camera about line crossing detection.

I see that following detection are missing as switches in HA:

  • pet detection
  • vehicle detection
  • line crossing detection

so is it possible to add the "line crossing detection" turn on/off ?

I mean just the ability to enable/disable the detection, while keeping the "line creation" step and schedule into Tapo app, as shown in the image

let me know if I can help you, thanks.

Activity

  1. rytilahti commented on Jun 15, 2025

    Member

    I guess it would be possible after someone figures out how the configuration works and implements it.

    Looking at one of the fixture files, I'm guessing that https://github.com/python-kasa/python-kasa/blob/master/tests%2Ffixtures%2Fsmartcam%2FC210%28EU%29_2.0_1.4.3.json#L290 are the related settings?

    Alas, all the main contributors are currently busy with other projects, so if someone wants to help, that would be awesome!

  2. gpongelli commented on Jun 15, 2025

    ContributorAuthor

    hi @rytilahti , I don't know how those fixture files are used, but I've found "linedetectioncrossing" and "getLdc" (supposing that Ldc stands for "Line detection crossing"), with something that sounds like the enable/disable switch .

    do you know how those feature files are made ? are they a dump of the camera's settings ? if so, just dumping when line detection is enabled and disabled to see if it's the right data.

    Ps
    I've seen also other missing features like "getMeowDetectionConfig", "getPetDetectionConfig", "getVehicleDetectionConfig" , "getGlassDetectionConfig" to name a few.

  3. gpongelli commented on Jun 16, 2025

    ContributorAuthor

    all the missing "...DetectionConfig" work, I'm doing some commit to add them, but the getLdc is unrelated with line detection and I've no idea where to find it because fixture file doesn't change when enabling/disabling it.

  4. rytilahti commented on Jun 16, 2025

    Member

    The fixture files are creating by executing a list of known commands on devices and storing the responses of the succeeded commands, there is a script under devtools that does that. The procedure for contributing fixtures can be found here https://python-kasa.readthedocs.io/en/stable/contribute.html#contributing-fixture-files . As you noticed, the fixture files are at times more complete than what is being exposed by the library. That is simply because @sdb9696 figured out lots of commands that were not added to the initial implementation, the fixture files serve as a resource to help adding new features in the future if the need arises :-)

    You can execute raw commands on the device using kasa raw-command, but the format for cameras is rather complex so the easiest way to find the structure is to execute some command using --debug and looking what is sent to the device.
    You could perhaps give a try if the line detection is something like getLineDetectionCrossingConfig or getLineDetectionConfig.

    If you figure out something, feel free to create a PR and I can review and help to get it in. For exposing features to homeassistant, an extra step described in the integration's README is necessary. We should probably add a note to this somewhere in our contributing docs to make it more visible, but hope that wil get you started!

    Feel free to ask if you need any support and I will see what I can do!

  5. gpongelli commented on Jun 16, 2025

    ContributorAuthor

    Hi @rytilahti , thank you, I've spot the feature looking at this page https://md.depau.eu/s/r1Ys_oWoP#Modules (link found inside the code).

    There is a missing root key "getLinecrossingDetectionConfig" to be added into SMARTCAM_REQUEST so it can be dumped by dump_devinfo .

    I'll make a PR with also HA integration and let you know, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL