Debug without republishing of App

Hi team,
Is there any option to enable Debug option without F5 (republishing the app)?
If I use F5 then all data of my app is deleted and I cannot debug (cos I need to input all data once again).

Unfortunately for now it is not possible to avoid data deletion when starting the debugger. We are working on a feature that will let you preserve the data on subsequent republishes if schema changes are compatible. See #62

How is the recommended approach to provide these data needed for the development / debugging process?
Is there an event that could be subscripted in a codeunit to create the data e.g. in a test codeunit?

Please check and support this feature soon. It is very very important for testing the extension. Currently, I'm testing my extension, but it is very difficult to track issues without debug tool.

Personally I solved it (for now) by creating an automated "demo install" codeunit (subtype install), which publishes my test data. Takes time to do, but most of that is saved when it comes to build automated step.
Wouldn't it be able to do almost the same with a .NAVDATA file? Thus we could save just save the current data, to reload them each time.

Just ran this test in NAV2018, and it is failing. That means that all production data disappears when a debug is done, or a hotfix or update is loaded. Are there any workarounds for this, or at least a timeline for a fix?
At this point, we cannot use this functionality on any project without risking data loss.

We are currently working on addressing this issue. We will target backporting the fix to NAV 2018.

preserve the data on subsequent republishes if schema changes are compatible.

Will that consider the updgrade logic?


How can I move to snapPoint programmatically ?

Hello,
I need to be able to move an Intractable.View to a snapPoint by providing the index. I've tried with setVelocity, but the problem is that the view is moved relatively to it's current position. I have a lot of items on my screen that need to be swapped when you drag one on another.
How can I achieve that ?

I'm not really sure I understand the use-case, can you explain it with more detail please?

Very simple example of my use case :
I have 3 Intractable.View and each of them have 3 snapPoints corresponding to the other views placement.
Something like that :
1.
snapPoints={[     {x: 0},     {x: 100},     {x: 200} ]}

snapPoints={[     {x: -100},     {x: 0},     {x: 100} ]}

snapPoints={[     {x: -200},     {x: -100},     {x: 0} ]}
I also have an array telling me which view is at which index : [1, 2, 3]
Now I want to drag my first view on to for example the third snapPoint (x: 200) and my third view should automatically snap to it's first snapPoint (x: -200) because the sender had index 1 in my array.
Now my array looks like that : [3, 2, 1].
I could achieve that with setVelocity but I would have to do a lot of if statements based on the sender id and it's current index. But I want to know if there's an easier way for example telling to a view : "Now snap yourself to the snapPoint at index 1"

I added to master an imperative command called snapTo which does what you want. iOS only for now. @ButtersHub can you add Android support?

sure, ill do it.

@talkol Thank you very much ! Saves me a lot of time ! Very great work here :)

Android implemented as well.

I love the short response time here guys! Keep up the good work <3

Please reopen if anything still needs to be improved

guys! a silly question, sorry how can we do a snapTo with animation?

@leshaivanovsky I think that it's animated by default...


Adds the ability to automatically assign user groups on product purchase, also adds order event hooks

I’ve just put the user group selector in the same spot as the fileselector - it might be better off in its own tab.
I've used a single field to store the user groups, instead of a separate table here. As we are only store a list of group ids, with the order being irrelevant, and there being no other needed data I think this is an appropriate case to serialise data like this instead of having another database table - but I won't be offended if this isn't agreeable.
With the event hooks, I haven’t actually tested using them yet, but there’s very little to go wrong.

So I merged this, but ended up reverting it. I think we do need a separate table to be a little more future proof. I can see potentially extending that to be a little more advanced where we also have an expiration date for how long you'll be a part of that group.

No worries, I'll re-work this to have a proper table, I agree that it would be better for future proofing. I'll also split the event hooks into a different pull.
With the expirations specifically, I think that still would be a case of using the expiration settings already available against user groups in the dashboard, otherwise it would get very messy, but it's one of those cases I guess where it's better to have the table and not use it than have not have table and then need one.


Discriminator field does not change upon selecting different models in request sample

I'm running into a bug with the discriminator field in Request Samples. When I click on the various models the value in the discriminator field does not change.
Here is a portion of my spec that shows the discriminator setup:
pageelementscommon:
    type: object
    discriminator: type
    properties:
      id:
        type: integer
        description: Question ID
        readOnly: true
      type:
        type: string
        description: Element type used to determine schema to post/returned
        enum:
        - cascadingdropdown
        - checkboxes
        - contactform
        - contsum
        - customgroup
        - customtable
        - date
        - dropdown
        - email
        - essay
        - fileupload
        - gridcheckboxes
        - griddropdown
        - gridradiobutton
        - gridstars
        - gridtextbox
        - imagemulti
        - imagesingle
        - instructions
        - likert
        - listdropdown
        - listtextbox
        - nps
        - number
        - percent
        - radiobuttons
        - rankdragdrop
        - rankgrid
        - signature
        - slider
        - slidermulti
        - textbox
        - customscriptaction
        - hiddenvalueaction
        - javascriptaction
        - loginaction
        - pagetimeraction
        - percentbranchaction
        - quizscoreaction
        - recaptchaaction
        - resultschartaction
        - reviewaction
        - sectionnavaction
        - emailaction
        - socialmediaaction
        - urlredirectaction
        - webhookaction
        - video
        - audio

Here's a demo of the issue:

This is problematic because, as you can see, the subsequent fields are often the same for the various models so the end user might think that the examples are not changing even though they are.
Thanks for such a great tool!

A related question/suggestion: I am using the CLI do deploy the docs and note that it is converting the spec to v3.0. Is there support for v3 polymorphism in Redoc? Meaning, will it apply the dropdowns to various models as they are specified in v3?

I tested the above an confirmed that polymorphism of as specified in OAS 3.0 displays quite nicely! Kudos! The original issue remains though:

@RomanGotsiy Should this be closed? @debri174 said, "The original issue remains."
Also, @debri174, how did you get it to display your samples like that? I've attempted a number of configurations, and I've come up empty.

@trip-somers I think yes yes. The issue was closed after @debri174 comment in 5dae267.


Allow including YAML files

When using multiple scenarios with many platforms, we either need to duplicate the entries in every scenario or provide a base config. The latter does not really provide fine-grained granularity. Being able to include YAML files allows to share only some specific sections between scenarios.
PR Type

Feature Pull Request

@decentral1se Thank you for your review. I'm not sure to understand what you mean by "re-implementation of a feature that YAML supports". AFAIK, including other files is not supported by YAML.
I tried to address your comments and added some doc.

@decentral1se Thank you for your review. I'm not sure to understand what you mean by "re-implementation of a feature that YAML supports". AFAIK, including other files is not supported by YAML.
I tried to address your comments and added some doc.

AFAIK, including other files is not supported by YAML.

Ahhhh, OK, I thought it did that.
Good then, looking good, thanks for thrashing out the comments.
Let's see what the rest say.

AFAIK, including other files is not supported by YAML.

Ahhhh, OK, I thought it did that.
Good then, looking good, thanks for thrashing out the comments.
Let's see what the rest say.

With all due respect, I am inclined to refuse this feature as it would introduce a serious amount of complexity and prevent us from doing other changes to molecule scenarios. At least now they are contained YAML files. Adding include opens a pandora box.
I would rather wait a little bit more and see if there are other ways to improve the user experience without this complexity.

With all due respect, I am inclined to refuse this feature as it would introduce a serious amount of complexity and prevent us from doing other changes to molecule scenarios. At least now they are contained YAML files. Adding include opens a pandora box.
I would rather wait a little bit more and see if there are other ways to improve the user experience without this complexity.

prevent us from doing other changes to molecule scenarios

Which changes?

Adding include opens a pandora box

Having a limited form of this feature which is experiimental (weve done this before, remember parallel builds?) and not publicly documented seems to me a fine way to test this out! Some limited form of inclusion can be worth it, I think.

prevent us from doing other changes to molecule scenarios

Which changes?

Adding include opens a pandora box

Having a limited form of this feature which is experiimental (weve done this before, remember parallel builds?) and not publicly documented seems to me a fine way to test this out! Some limited form of inclusion can be worth it, I think.

@ssbarnea I think that adding YAML files at the parsing phase is somehow less complex that loading YAML files using variable interpolation (like for playbooks for instance). Allowing to specify external files (https://molecule.readthedocs.io/en/latest/examples.html#sharing-across-scenarios) requires adding specific code for every section.

@ssbarnea Should I close the PR ?


chore(readme): update stack info

:tada: This PR is included in version 1.0.5 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Compatibility with xUnit.net v2

xUnit.net v2 has deprecated xunit.extensions and this appears to make AutoFixture incompatible with this new version.  Are there plans to upgrade Autofixture to work with v2?

My current thinking on this is that we should release an AutoFixture.Xunit2 package once xUnit.net v2 is stable. There's actually already a pull request for that by @TeaDrivenDev.
Is xUnit.net v2 stable?
I honestly don't know. AFAICT, it's been in development for more than two years, and I haven't been able to find any statement about the stability of neither alpha nor beta version.
Since xUnit.net v2 looks to be so incredibly slow-moving, I haven't wanted to invest resources in integrating with something that may still be far away - particularly when I can't see whether or not it's a moving target.

xUnit 2 is not stable yet. There was a new beta released a few weeks back, and from what I understood, they intend that to be the last one, so it will quite probably be another few months until a "gold" release. It also doesn't appear to be really stable API wise; there have been many comments about significant changes between beta versions.
It is not possible support xUnit 1 and 2 from the same library, so the proposed AutoFixture.Xunit2 would be the way to go (as immediately deprecating xUnit 1 support is obviously out of the question).
The aforementioned pull request is a port of the existing AutoFixture.Xunit with the minimum necessary changes to target xUnit 2; the purpose was mostly to have the bulk of the work done in time for the final xUnit 2 release, and to be able to discuss any arising question as early as possible. I last updated it for beta 4 released around July or August; I haven't taken the time yet to move it to the most recent beta.

@TeaDrivenDev, thank you for that detailed explanation, which also seems to correspond with my own perception of the issue so far.
@expertchoice, does this answer your question?

Mark,
Yes it does.  Much appreciated.  Thanks
On Wed Jan 14 2015 at 3:34:08 AM Mark Seemann<EMAIL_ADDRESS>wrote:

@TeaDrivenDev https://github.com/TeaDrivenDev, thank you for that
detailed explanation, which also seems to correspond with my own perception
of the issue so far.
@expertchoice https://github.com/expertchoice, does this answer your
question?
—
Reply to this email directly or view it on GitHub
https://github.com/AutoFixture/AutoFixture/issues/335#issuecomment-69884365
.

Hi,
XUnit v2 is out now :)
https://www.nuget.org/packages/xunit/
Do you plan to update AutoFixture ?
Thank you
Thomas P.

You may track the progress here.

Thank you :)


Feature Request: The !exit command

Summary
Please describe what the problem is.
This is in ref: !exit
Not really a problem But is would be nice if the response wouldn't be cleared at the end of the round
Additional context
Add any other context or screenshots about the feature request here.

what shall this command do?
When you say "in ref:", do you mean the referee mode?

no, what I mean is when you use !exit it shows the last player to exit the server BUT when the round is over the user is reset?it would be cool if the player didn't get resetso on the next map if you use !exit again it would still show that player
On Monday, July 13, 2020, 11:00:41 AM EDT, Alexander Kress<EMAIL_ADDRESS>wrote:
what shall this command do?
When you say "in ref:", do you mean the referee mode?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

and what shall be the reason for that?

the idea of !exit is that you can punish people who leave during an active map. if the next map starts, a new match starts, so there is no need to know who left previously. Maybe 5 people leave at the end of a round, the command would just show randomly the last, who did nothing wrong.
So I dont see any benefit in this feature request.

@joerich: what is the purpose of your feature request?

I have some admins who change the maps when I'm not there
this would allow the HeadAdmin to see who the last person left the server
would be a chance to see which admin didn't change the map back to the standard map

well, this would not work, since maybe the last disconnected player is a normal user.
What you want is an additional command like !lastadmin, which is only displaying the last disconnected admin.
This command will then not include normal users, guests or moderators.

Could you keep a list of the most recent 10 bot commands and who did them ?
Then you could have a !history to list them
--G
On Thu, Jul 23, 2020 at 3:57 AM Alexander Kress<EMAIL_ADDRESS>wrote:

well, this would not work, since maybe the last disconnected player is a
normal user.
What you want is an additional command like !lastadmin, which is only
displaying the last disconnected admin.
This command will then not include normal users, guests or moderators.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SpunkyBot/spunkybot/issues/85#issuecomment-662598858,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJV5CEVF4UGT7YUDUB6XA2TR44SAXANCNFSM4OYQHZGA
.

Well, a !history command would be possible. But to implement this correct, it will be a lot of effort. The history should only display valid and accepted commands (exclude e.g. a guest typing !ban blabal) and also all help and display command shall be ignored so that only a specific set of commands is listed.
The simple implementation would be: accept everything starting with "!" from an admin, independent if is admin level will support this command, and also any !help or !xlrstats will be listed.

This would be the simple implementation:

but it will ignore currently all aliases, e.g. !h will be ignored


Fix switch fallthrough in std.regex

Uncovered by https://github.com/dlang/dmd/pull/13972

Buildkite failure looks unrelated but is required


EGA voting bug

title
EGA voting worked well in the morning, crashed for 15 minutes, works well again. Just want to make sure everything is fine and the votes are added
environment
Chrome/Safari
expected result
Casting a vote
actual result
Unable to load / Error 502
steps to reproduce
Load participant's page / press "vote with LinkedIn" button
ie. https://ecommercegermanyawards.com/vote/134168
proof

Severity/Priority
Critical
number of users already affected (reporting this issue) of total users
2 (chatlio)
team members who tested
MT, DK - now after the test whole team confirms that the voting is back online

server overload ....noticed and resolved

cause: faulty data update function - temporary solution - b25e2ffaf6b7fec30dd3d4515504546d1bd7b93a


Possible DLL Hijacking [Security Vulnerability]

NLog v5 (and older) has dependencies on system DLLs, which are loaded when NLog-assembly is loaded.
By default the application-DLL-loader scans the application-folder first when loading DLLs, before looking in the system-folder. The application can change the configuration of the application-DLL-loader so it will prioritize the system-folder before the application-folder. See also: SetDefaultDllDirectories
An evil user with admin-rights can inject malicious DLL-files into the application-install-folder. This can cause the application to load the malicious DLL file from the application-install-folder. But there is no need to jump through the hoop of planting malicious DLL-files, when already having admin-rights.
But thank you for highlighting the dependency NLog has on loading system DLLs. I will focus on trying to remove these dependencies with NLog v6, as NLog should avoid triggering load of system DLLs.

Closing due to inactivity. Please reopen if incorrectly understood.


chore(main): release 1.3.0

:robot: I have created a release beep boop
1.3.0 (2023-06-02)
Features

add GetApplication trait to MiniProgram and Payment applicationsThis commit adds the GetApplication trait to the MiniProgram and Payment applications, allowing access to the EasyWeChat application instance (c73d8fd)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/deloz/wechat-bridge/releases/tag/v1.3.0 :sunflower:


Could not detect instrument with MODEL 2400

After following the instructions in readme file, when the code is executed followed by instrument selection, an error "Could not detect instrument with MODEL 2400" is received in the "IV Sweep Dynamics Investigator" dialog (even though Keithley 2400 is connected). What would be the potential issue?
Thanks,
Adharsh

Hi Adharsh, I can think of a few questions I have to help me troubleshoot this:
Is your operating system windows?
What's your hardware interface to the 2400 like? (usb<-->GPIB adapter or similar?)

Yes, I am using Windows 10. Hardware interface is USB --> GPIB

Do you have all the National Instruments software installed and working?
Can you use the NI MAX browser to confirm that comms to the instrument is working? see pic

Yes, I do have all the NI software installed and working. I can detect Keithley 2400 in NI MAX. Infact I am able to use my other labview codes to control the equipment and do J-V measurements. Here is the picture of NI MAX

I am not sure how to send an "IDN?" string!

When I execute the code, I observe the following:

You can send "IDN?" in the tab: Communicate with Instrument there in the screenshot you show.
I've never tried my stuff in Windows 10. That could possibly be the issue. I'll try to get my hands on a windows 10 machine to test, but in the mean time, I have a few more questions:
How are you running my code? I did you downloaded my released exe.win32-2.7.zip and then are running the executable in there? Or did you clone the repo and run it natively with python?

The response for IDN string is as follows:

Meanwhile, I followed the exact procedure as given in readme file. I downloaded the files and then used the executable. The following is the screenshots of command prompt of when I execute the commands:

Thanks for these details. Let me see what I can do to try to repeat this and come up with a good solution on my end of things.

Okay. I found a spare computer, put windows 10 on it and tried to recreate your issue.
Good news: I found the bug that was causing your error and I was able to solve it!
I see that in your command window you pasted there the pip install command has failed. That failure has nothing to do with my stuff and makes no sense to me at all. Try to re-download WinPython to solve that. The strangest thing is that this failure didn't impact the commands below it. You must have successfully run the pip install command previously somehow.
I updated the install instructions in the README.md to reflect the change I made to the source code (I rolled back the version of pyvisa I was using from 1.5 to 1.4). I also added a bunch of usage instructions, I hope they'll help you.
It's probably best if you just delete your whole WinPython folder and start over, following the new instructions.
If you want to try and short-cut all that, I've attempted to package the tool into an .exe that you can hopefully just double click, even without python present, so you don't have to deal with any of the winpython/pip stuff. I put it in the exe .zip file that you can download from the release page here: https://github.com/greysAcademicCode/i-v-vs-time-taker/releases/latest
Give this stuff a shot and please let me know if any of this works for you!

Thanks for the update. A quick question: When I send *IDN, I receive "KEITHLEY INSTRUMENTS INC.,MODEL 2400,1197267,C33   Mar 31 2015 09:32:39/A02  /K/J" which is slightly different from what you have mentioned in the help file. How can I fix this?

My mistake. There are unique numbers in that string. It doesn't have to match exactly. I only actually check for model (2400) and firmware version (C33). So you're fine.

When I try .exe file from the zip package, I get the following when I select the Keithley:

I will reinstall python and try to check if the original method works now. Thanks!

Yes. I wrote that dialog box. You should follow the instructions given
there.
On Feb 4, 2016 1:49 AM, "adharsh27r"<EMAIL_ADDRESS>wrote:

When I try .exe file from the zip package, I get the following when I
select the Keithley:
[image: scpi]
https://cloud.githubusercontent.com/assets/16808104/12803332/4f1f625c-ca9e-11e5-8f79-88783fa95d3e.PNG
I will reinstall python and try to check if the original method works now.
Thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/greysAcademicCode/i-v-vs-time-taker/issues/1#issuecomment-179569505
.

When you say press MENU, is it somewhere in NI MAX or within python?

Physical buttons on the instrument.

@adharsh27r can you give me an update on this? Is the issue solved for you?

Hi, I ended up using the .exe file and did not try the full procedure. Finally, I was able to do a measurement with one of my device (couple of hours back) and it works as expected.  I will definitely keep you updated if I observe any concerns in the future. Thanks for your effort in going through the problems and all your help.

Awesome! I'm very glad the pre-compiled package is working for you now.
You might be interested in using this to analyze the data files you get: https://github.com/greysAcademicCode/hystAnalysis

Yes, I will try it and let you know!


[My space] The profile form is moved to the center after editing on max length  the 'Name' and 'City' text fields

Environment: Windows 10 Pro, Google Chrome (116.0.5845.96)
Reproducible: always
Build found: 23.08.2023
Steps to reproduce

Go to https://www.greencity.social/#/profile
Sing in as user
Open 'My space' page
Click on the 'Edit profile' icon
Enter value 'НаталіяНаталіяНаталіяНаталія' into the 'Name' text field
Enter value 'ОлександріяОлександріяОлександріяОлександріяОлександріяОлександріяОлександріяОлександ' into the 'City' text field
Click on the 'Save' button
Pay attention to the "Profile" form.

Actual result
The 'My space' page doesn't match the mockup: the "Profile" form is moved to the center and overlapped on the 'My habits' form

Expected result
The 'My space' page is shown as on the mockup: the "Profile" form is placed left side and doesn't overlap the 'My habits' form

User story and test case links
User story #1102 #1005
Epic: My habits #938

The bug continues to reproduce

Done


Remove subsections

Remove subsections
Use logger in tests

Coverage decreased (-0.009%) to 84.92% when pulling ccb81ac820b2c20ccb85edf3a0474f1dea8858ee on remove_subsections into 56f8bb4da797fe1d6c65c9cd6e8e1935c4c7ef2b on refactoring.


[Production mode] Tachyons media queries are not working

- Do you want to request a feature or report a bug?
a bug
- What is the current behavior?
Tachyons media queries are not working in production mode
- If the current behavior is a bug, please provide the steps to reproduce.
Display the site on a desktop screen and observe that it is a "small screen" layout.
- What is the expected behavior?
Take media queries into account.
- Please mention your node.js, NPM, Hugo and operating system version.
Node v17.7.2
Npm 8.5.2,
Hugo-bin 0.89
MacOS Catalina

I am having a similar issue with the media queries. It works fine when running on local host though. Could you fix it?

in localhost, using mode: development.
This bug happened sass-loader in only mode: 'production'
So, I rewrite it below and it works.
webpack.common.js
        test: /\.(sa|sc|c)ss$/,
        exclude: /node_modules/,
        use: [
          "style-loader",
          {
            loader: MiniCssExtractPlugin.loader,
            options: {
              esModule: false
            }
          },
          "css-loader",
          "postcss-loader",
           {
            loader: "sass-loader",
            options: {
              sassOptions: {
                outputStyle: "expanded",
              },
            },
          }
        ]


Incorrect date for Valentines Day in docs and example

you sneaky person you you snuck your birthday into my example anyways.


show message in history if pickup was missed

showed up as PICKUP_DONE before.
Goes along with https://github.com/yunity/foodsaving-backend/pull/312

Codecov Report

Merging #540 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #540   +/-   ##
======================================
  Coverage    98.4%   98.4%
======================================
  Files         231     231
  Lines        3443    3443
======================================
  Hits         3388    3388
  Misses         55      55

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29e0395...5204a31. Read the comment docs.


update badges

from graphql-flask to flask-graphql

Coverage remained the same at 95.364% when pulling 3a065072ce9c9fd93e99f880f20400a58742ccbe on brennv:update-badges into 1988ac840354e2fc7503ed80f4024cb18a1f3743 on graphql-python:master.

Looks good! Thanks :)


Uncaught TypeError: Cannot read property 'getParent' of null

[Enter steps to reproduce below:]

Open two tabs in Atom (CMD+N)
Switch tabs, by mouse or keyboard.


TSC Meeting Notes 5th March

Signed-off-by: Nick Avramoussis<EMAIL_ADDRESS>

@jmlait this needs approval from you r.e. the date


support youtube clip embedding

Description
Closes https://github.com/stackernews/stacker.news/issues/879
This PR uses the field fetchMeta and a supporting api to fetch additional metadata needed to embed the video bypassing the lack of cors headers.

Is there something wrong with cachedFetcher from lib/fetch?
I thought we discussed that we want to use the same caching implementation like we do for price, blockheight, fees etc.
Or wasn't this changed yet so this isn't actually ready for review yet?

cacheFetcher uses in-memory cache, it is good for price, blockheight and fees because they all are a single values that comes from a single source, but using it to store clips metadata can potentially make the cache grow too large. Using the database and its memory management capabilities makes more sense in this case, also because this cache can last for a very long time (even for ever if we want to), since these values should never change unless youtube updates its internals.

I like that you created a table for embed meta!
Rather than doing a "lazy load" of embed meta, I think it might be better to do it as job in the worker like we do with images/video, so that the client doesn't need to be aware of the embed meta. That method has worked well for us.
We can also add a trigger to denormalize the embed meta into its "Item" so that we don't have to join (or do an additional query) when items are queried.
(I'd prefer images/videos be normalized like your embed code and denormalize in a trigger like this, but that's another issue.)
Thoughts?

I've moved the logic into a worker.
The system is extensible by registering a function of type MetaFetcher to a provider key in lib/embedFetcher/MetaFetchers.


CI pin pytest to <8 for flaky

Flaky seems to fail with pytest 8, trying to pin then.

@BenjaminBossan I think we can merge this, do a release, and slowly remove deprecated HF API stuff, so that we can also slowly get rid of flaky then


Events suddenly stopped

Hi. Running Windows 7 Pro.
I installed (upgraded) to v1.4.1 today (from 1.2) and noticed that suddenly many events are no longer being fired off.  There is now sporadic behavior for add, change, delete.  I am (have been) tracking folders on a network.  I initialize my watcher and use POSTMAN to view its contents.  I am also running debug mode of Node within Chrome.
I'll explicitly add a new file and will get proper add event; if I then delete file I do not get delete event.  Subsequently, when I check for stats my watcher is holding onto a file that no longer exists.  If I add the file back in I again DO NOT receive event, then when I examine the watcher instance the update time is that of the first time it was added.  Sometimes file changes occur (e.g. edit file in notepad) -- sometimes the change does not get fired.  It's driving me kind of batty.
My original thought was that I started using the getWatched() method instead of my previous implementation using private _watched (btw, this caused some grief since I was reading _items which was no longer needed).  I have since backed out the use of getWatched() to see if that was issue.  It was no help as the sporadic behavior.
So, my question is, has anyone been witnessing dropped events?  Any thoughts for further debugging other than putting breakpoints inside the watcher .on() statements?
I may back out 1.4.1 and revert to 1.2 to see if problem persists and will report back.  But if anyone can assist please advise.
Thanks.

A follow-up to my previous post.  While reading some other posts about network access I changed my watcher init to usePolling:true.  This has so far helped.  The only issue is that now CPU spikes to 10% for node.exe.  Is this a recommended approach for network files? Has anybody solved without polling?  Thank you!

usePolling is the only mode in chokidar that works for watching across a network. I have to assume that the upgrade was a coincidence that had nothing to do with the issue you experienced. Yes, it comes with a CPU penalty, which you can influence by changing the pollInterval and ensuring you don't watch any more than really necessary (by using targeted glob patterns and/or ignore).


INFO: Not setting value for variable float u_light_ambient_w; uniform is not active.

Hi,
I run the lmo dataset by tools to create the xyz map, but the log says "INFO: Not setting value for variable float u_light_ambient_w; uniform is not active.", and then the code stops.  BTW, I download the train and test file in BOP for lmo, and run the tools.

It seems OpenGL makes problems when you run the code in a virtual environment / a docker container / a remote server with ssh.
My suggestions are:

Add DISPLAY command to attach the code to the first display (if it exists),

DISPLAY=:0 python3

or,
2) install and use xvfb to run the code in a virtual display.
apt-get install xvfb
xvfb-run -s "-screen 0 1400x900x24" python3

In my case, one of the tricks above solved GL related issues.
Especially, if you are using a docker container,
I would recommend passing these arguments when you run the docker container, which connects the host display to the container.
xhost +local:root;nvidia-docker run -e DISPLAY -e QT_X11_NO_MITSHM=1

I hope this solves your problem.

I found that the npy file is created inlcudes the image and xyz, though the warning is still there. Is that ok?

I think it is okay if it creates npy files for each object.
I will close the issue then.


Feature Request: Add multiple events detections

Is your feature request related to a problem? Please describe.
I want to be able to detect multiple event types.
I'm not interested in actually highlighting/retrieving the rectangle where this was detected on the camera, just the detection event.
Describe the solution you'd like
I want to be able to detect and distinguish between:

Motion
AI: Person, Pet, Vehicle, Baby Crying, Glass Break, Dog Barks, Cat Meows
Line-Crossing
Camera Tampering

These notifications are sent to the native app.
Describe alternatives you've considered

Create a different sensor for each event type. This has the benefit of also tracking (either now, or maybe in future updates of the camera) the duration that the event was on.
Add attributes to the motion detection sensor binary_sensor that indicate the type of the event

A clear and concise description of any alternative solutions or features you've considered.
Additional context
These features are available on 3MP+ cameras for free, and on 1080p cameras using the paid subscription
Here is the response from GetEventProperties of the ONVIF endpoint on Tapo C225 camera:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema">
    <SOAP-ENV:Header>
        <wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/GetEventPropertiesResponse</wsa5:Action>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tev:GetEventPropertiesResponse>
            <tev:TopicNamespaceLocation>http://www.onvif.org/onvif/ver10/topics/topicns.xml</tev:TopicNamespaceLocation>
            <wsnt:FixedTopicSet>true</wsnt:FixedTopicSet>
            <wstop:TopicSet>
                <tns1:RuleEngine>
                    <CellMotionDetector>
                        <Motion wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsMotion"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </Motion>
                    </CellMotionDetector>
                    <TamperDetector>
                        <Tamper wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsTamper"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </Tamper>
                    </TamperDetector>
                    <LineCrossDetector>
                        <LineCross wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsLineCross"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </LineCross>
                    </LineCrossDetector>
                    <PeopleDetector>
                        <People wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsPeople"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </People>
                    </PeopleDetector>
                    <TPSmartEventDetector>
                        <TPSmartEvent wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsTPSmartEvent"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </TPSmartEvent>
                    </TPSmartEventDetector>
                </tns1:RuleEngine>
            </wstop:TopicSet>
            <wsnt:TopicExpressionDialect>http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet</wsnt:TopicExpressionDialect>
            <wsnt:TopicExpressionDialect>http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete</wsnt:TopicExpressionDialect>
            <tev:MessageContentFilterDialect>http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter</tev:MessageContentFilterDialect>
            <tev:MessageContentSchemaLocation>http://www.onvif.org/onvif/ver10/schema/onvif.xsd</tev:MessageContentSchemaLocation>
        </tev:GetEventPropertiesResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Currently, motion detection doesn't work on Tapo C225 #303, but this feature would be nice to have once it is working.

This integration reuses onvif from Home Assistant. Adding detectors for these would require to expand on it or handlers to be added into https://github.com/home-assistant/core/blob/dev/homeassistant/components/onvif/parsers.py .

Install https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif
You should see a lot more warning messages now on onvif events trigger
Unsupported entities should come up as "No registered handler for event from" or "Unable to parse event from"
Please report them here.

Download https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/archive/refs/heads/expand_onvif.zip
Follow https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif#installation

I downloaded the zip
I updated the Tapo custom component to 5.0
Then I replaced all the files custom_components\tapo_control by the ones from the zip using samba share
I didn't see any new entities so I installed the onvif integration and connected it to one of my C225 camera
I didn't see any new entities either (besides the onvif related entities that I was expecting)
In the logs there doesn't seem to be a message like "No registered handler for event from" or "Unable to parse event from"
I am not sure what I should do?

The code in the branch above doesnt have any new entities. However, it will catch any previously uncought events with an error message. If you are not seeing any other events than it looks like the camera is not issueing those events. I will do some more testing later with the subscription.

I do have many errors and warnings from the Tapo integrations. Three of them occur very often (several occurence each minute)
I don't know if they are related to unsupported events but the warnings don't provide much info.
They occur even when person and movement detection are turned off but there may be other unsupported events, if these are what you are looking for I don't know how to filter them for the specific events that interest us or to make the warning messages more usefull?
Warning 1
This error originated from a custom integration.
Logger: custom_components.tapo_control
Source: custom_components/tapo_control/utils.py:561
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: 31 March 2023 at 22:06:48 (22736 occurrences)
Last logged: 13:37:12
Setting up events...
Warning 2
This error originated from a custom integration.
Logger: custom_components.tapo_control
Source: custom_components/tapo_control/utils.py:559
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: 31 March 2023 at 22:06:48 (22736 occurrences)
Last logged: 13:37:12
setupEvents - entry
Error 1
This error originated from a custom integration.
Logger: custom_components.tapo_control
Source: components/onvif/event.py:82
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: 31 March 2023 at 22:06:38 (22741 occurrences)
Last logged: 13:37:11
Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeHTTP/1.1 500 Internal Server Error')
Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeHTTP/1.1 500 Internal Server Error')
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 188, in _receive_event
event = self._h11_state.next_event()
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 487, in next_event
exc._reraise_as_remote_protocol_error()
File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
raise self
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 469, in next_event
event = self._extract_next_receive_event()
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 411, in _extract_next_receive_event
event = self._reader(self._receive_buffer)
File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 104, in maybe_read_from_SEND_RESPONSE_server
matches = validate(status_line_re, lines[0], "illegal status line: {!r}", lines[0])
File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
raise LocalProtocolError(msg)
h11._util.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 112, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 187, in _receive_event
with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, in _async_update_data
return await self.update_method()
File "/config/custom_components/tapo_control/init.py", line 234, in async_update_data
await setupOnvif(hass, entry)
File "/config/custom_components/tapo_control/utils.py", line 553, in setupOnvif
hass.data[DOMAIN][entry.entry_id]["eventsSetup"] = await setupEvents(
File "/config/custom_components/tapo_control/utils.py", line 563, in setupEvents
if await events.async_start():
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 82, in async_start
if await self.device.create_pullpoint_subscription():
File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 350, in create_pullpoint_subscription
pullpoint = await events.CreatePullPointSubscription()
File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in call
return await self._proxy._binding.send_async(
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
response = await client.transport.post_xml(
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
response = await self.post(address, message, headers)
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
response = await self.client.post(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

@NEVdataDyne It looks like you are having the issue  #303 . Is your motion sensor (clasic one) working/triggered in Homeassistant?
@JurajNyiri I'm not seeing any of the errors you mentioned. Could it be that the integration needs to subscribe explicitly for certain events? Something like "on event PERSON_DETECTED post to WEBHOOK"

@AndreiArdelean1 No motion sensor doesn't seem to work. It doesn't seem to work even with my C110 camera so I am not really sure if I am doing somethng wrong. (I have C225, C320WS and one C110 camera)

I've gotten the integration to work by modifying tapo_control to use a local version of onvif-zeep-async and only motion events are triggered. I've also verified this using Postman and observing the sent events.
Also, the ONVIF integration declares CellMotionDetector, TamperDetector, LineCrossDetector, PeopleDetector, TPSmartEventDetector. All of this should be just boolean values. But, I've only been able to trigger only CellMotionDetector. Since the camera supports other types of detection events/notifications (like pet detection, glass break, vehicle, etc., within the official app) + boundary boxes of the detection inside the video feed, (apparently) are not exposed through ONVIF, I'm guessing the camera uses some Tapo specific API for this. The TamperDetector, LineCrossDetector, and PeopleDetector are most likely discontinued from the ONVIF API or something else is going on.
I'll investigate this further and post updates if I find something else.

Updated the code in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif

Download https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/archive/refs/heads/expand_onvif.zip
Follow https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif#installation

You should now see:

Warn message for "async_parse_messages" every time any event is detected
Warn Message Found Event when it found an event it recognizes
Error message "No registered handler for event from" or "Unable to parse event from" when event is found which is not recognized

2023-04-03 08:49:23.920 WARNING (MainThread) [custom_components.tapo_control] async_parse_messages

2023-04-03 08:49:23.921 WARNING (MainThread) [custom_components.tapo_control] Found event ba835a1edb0d0cdf5bcbafab8b732021_tapo_events: {

    'SubscriptionReference': None,

    'Topic': {

        '_value_1': 'tns1:RuleEngine/CellMotionDetector/Motion',

        'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',

        '_attr_1': {

    }

    },

    'ProducerReference': None,

    'Message': {

        '_value_1': {

            'Source': {

                'SimpleItem': [

                    {

                        'Name': 'VideoSourceConfigurationToken',

                        'Value': 'vsconf'

                    },

                    {

                        'Name': 'VideoAnalyticsConfigurationToken',

                        'Value': 'VideoAnalyticsToken'

                    },

                    {

                        'Name': 'Rule',

                        'Value': 'MyMotionDetectorRule'

                    }

                ],

                'ElementItem': [],

                'Extension': None,

                '_attr_1': None

            },

            'Key': None,

            'Data': {

                'SimpleItem': [

                    {

                        'Name': 'IsMotion',

                        'Value': 'true'

                    }

                ],

                'ElementItem': [],

                'Extension': None,

                '_attr_1': None

            },

            'Extension': None,

            'UtcTime': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=<isodate.tzinfo.Utc object at 0x7f663048c580>),

            'PropertyOperation': 'Changed',

            '_attr_1': {

        }

        }

    }

}

I've already done something similar, but the only thing that changed was the Data.SimpleItem.Value (+ UtcTime). No new event was received by tapo_control, even though the notification was sent to the app. Probably the camera doesn't sent any of the new events using ONVIF.

I have added to main branch (not yet deployed):

get/set VehicleDetection
get/set Cruise
get/set MeowDetection
get/set BarkDetection
get/set PetDetection
get/set BabyCryDetection
get/set TamperDetection
get/set GlassBreakDetection

I was not able to test:
setBarkDetection
setPetDetection
setGlassBreakDetection
setMeowDetection
setVehicleDetection
getBarkDetection
getPetDetection
getGlassBreakDetection
getMeowDetection
getVehicleDetection
getCruise
@AndreiArdelean1 could you please test above?

They all work except for getCruise. getCruise  always is {'patrol': {'patrol': {'action': 'idle'}}} regardless if it is idle or doing the cruise. The HA integrations also works. 🎉

I've been investigating this issue and here is what I've found so far:
ONVIF:

the ONVIF endpoint declares IsMotion, IsTamper, IsLineCross, IsPeople, IsTPSmartEvent
for IsTamper, IsLineCross I'm not sure if they are triggered (I don't remember if I tested this), but IsPeople is not triggered
Pet, Vehicle, Baby Crying, Glass Break, Dog Barks, Cat Meows, are not even declared in the ONVIF endpoint

UDP:

There aren't any multicast packets sent when an event is triggered
The app has the option to highlight people, pets, etc. in the live stream. The only place where this could take place (from the network packets received by the app) is inside the video/mp2t in the live stream from port 8800 (https://md.depau.eu/s/r1Ys_oWoP#Live-streaming, https://drmnsamoliu.github.io/video.html). There are no additional application/json received besides the initial ones (informing of the privacy mode overlay).  I've not been able to decode the sent JSON packets, only the received ones, as they are encrypted. Most likely the highlighted zones are already included in the video.

API:

the App has a feature to view recordings where it also indicates the type of event triggered.
when the app enters that screen, here are the calls made:

{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230431","start_date":"20230401"}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"getSdCardStatus","params":{"harddisk_manage":{"table":["hd_info"]}}},{"method":"getCircularRecordingConfig","params":{"harddisk_manage":{"name":"harddisk"}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"getClockStatus","params":{"system":{"name":"clock_status"}}},{"method":"getDstRule","params":{"system":{"name":"dst"}}},{"method":"getTimezone","params":{"system":{"name":["basic"]}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230331","start_date":"20230301"}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchVideoWithUTC","params":{"playback":{"search_video_with_utc":{"id":1,"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDetectionList","params":{"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230231","start_date":"20230201"}}}}]}}

What can be used, for event detection is the call:
{"method":"searchDetectionList","params":{"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}

and returning:
{'playback': {'snapshot_enable': True, 'search_detection_list': [{'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 6}, {'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 6}, {'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 6}, {'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 6}], 'total_num': 4}}

A few things to note here:

the end time extends if multiple events are triggered in quick succession
the alarm type also updates. People, pet detection is preferred over motion events.
the start_time and end_time define a range and the camera returns the events that have at least 1s within that range (event.start_time can be before request.start_time, and the same for end_time)

I've written this python script to get the events from the last 10 min to test it:
secondsFrom1970 = tapo.executeFunction(
            "getClockStatus", {"system":{"name":"clock_status"}}
          )["system"]["clock_status"]["seconds_from_1970"]
print(secondsFrom1970)
searchStart = secondsFrom1970 - (10 * 60) # 10 min
searchEnd = secondsFrom1970 + 10
print(tapo.executeFunction(
  "searchDetectionList", {"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":searchStart,"end_time":searchEnd,"end_index":99}}}
))

Maybe this method of detection motion could be used to detect motion on https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/273.
This could be done by:

making the above call every 0.5-1s and getting the last event (named here lastEvent) from the list and later storing it to savedLastEvent.
if the start_time of lastEvent and savedLastEvent are not the same, a new event was triggered
if the alarm_type of lastEvent and savedLastEvent are not the same, a new event was triggered
if savedLastEvent has completed, a new event was triggered
if secondsFrom1970 is within 30s (this is the default/minimum duration of an event) or 10s from the end_time, the event could still be active, otherwise the lastEvent can be marked as completed

Instead of making a call periodically, the ONVIF motion event could be used to trigger the call to searchDetectionList. BUT, the motion event is not triggered if only an AI event is detected. If the motion sensitivity is set high enough, the 2 events would be triggered in close succession and this would probably work.
Probably the best solution would be a combination of making a call periodically and watching for ONVIF motion events.
Other possible methods not yet discovered/implemented on the camera:

adding the missing events to ONVIF
the camera to emit a multicast broadcast (preferably encrypted) whenever something changes or just on events triggered
a way to register a webhook from the camera API for this
a way to register a webhook from the Tapo server to HA. Something similar to https://ifttt.com/tplink_tapo/details, but from what I could find, the API is only available to select developers.
opening a socket connection to the camera for events (not likely to be done in the future, or to already exist)
intercept the calls made by the camera to Tapo servers for notification (if possible, too complicated for the average user for the purpose of this integration)

Maybe in "Other possible methods not yet discovered/implemented" you can add "intercept the calls made by the camera to Alexa servers for notification" (for people detection). For some reason Alex seems to be the only service other than Tapo to get notified when a person is detected (and this is the only event Alexa can get).

I've written this script (attached) to pull events from the camera. It works really well. I'd implement a proof of concept for Tapo-Control, but I'm not very familiar with HomeAssistant integrations. Maybe this method could be used alogside the existing ONVIF events for detecting motion.
Notes: The 2 files need to be under the same directory.
Archive.zip

Thank you @AndreiArdelean1 . I played with the script, it had a bug where it was calculating incorrect start time for cameras in different timezone to UTC-0. I adjusted a couple of things and released new function getEvents to pytapo 3.1.11.
I am testing with following script:
from pytapo import Tapo
import time
from datetime import datetime
import os

# Camera
user = os.environ.get("user")  # admin user
password = os.environ.get("password")  # cloud password
host = os.environ.get("ip")  # ip of the camera, example: <IP_ADDRESS>

tapo = Tapo(host, user, password, password)

epoch_time = int(time.time())
secondsFrom1970 = epoch_time

minSearchStart = secondsFrom1970 - (60 * 60)

searchStart = minSearchStart
searchEnd = secondsFrom1970 + 60  # maybe add a few seconds?

while True:
    events = tapo.getEvents()
    if events:
        lastEvent = events[-1]

        newLastEventDictionary = {
            'startTime': lastEvent["start_time"],
            'endTime': lastEvent["end_time"],
            'alarmType': lastEvent["alarm_type"],
        }
        print(datetime.now())
        print(lastEvent)
        print(datetime.fromtimestamp(newLastEventDictionary['startTime']))
        print(datetime.fromtimestamp(newLastEventDictionary['endTime']))
        print("")
    else:
        print("none")
    time.sleep(1)

I tested on 2 C200s. One HW V1.0 and another one 3.0. The 3.0 also has tapo cloud subscription.
I found that:

Events are not reported reliably, even if they are visible in the timeline of recordings.
Events are reported with start time in the future

Could you try it and let me know if it works with your cameras?

I get something like:
2023-04-13 15:57:14.501225
{'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 2, 'startRelative': 4.0, 'endRelative': -26.0}
2023-04-13 15:57:09
2023-04-13 15:57:39

start time is always in the past (startRelative > 0)
for me, the events are received reliably. An event being a change in either start_time, end_time, or alarm_type of the last event

Off-topic, but I'm not sure where I should post this:
All the possible values for alarm_type from searchDetectionList:
allKnownAlarmTypes = {
    1: "Timing",
    2: "Motion",
    3: "TAMPER",
    4: "Line Crossing",
    5: "Area Intrusion",
    6: "Person",
    7: "Baby Cry",
    8: "Vehicle",
    9: "Pet",
    10: "Ring Alarm",
    11: "Dog Bark",
    12: "Cat Meow",
    13: "Alarm Glass",
    14: "Alarm Smoke",
    15: "Deliver Package",
    16: "Pickup Package",
    17: "Dollbell Ring Missed",
    18: "Dollbell Ring Answered",
    19: "Anti Theft",
}

I'm not sure which work, which don't, or what they mean. I've extracted them from the Android app.
The raw values:

1: TIMING
2: MOTION
3: TAMPER
4: LINECROSS
5: AREAINTRUSION
6: HUMAN
7: BABYCRY
8: VEHICLE
9: PET
10: RINGALARM
11: ALARMBARK
12: ALARMMEOW
13: ALARMGLASS
14: ALARMSMOKE
15: DELIVERPACKAGE
16: PICKUPPACKAGE
17: DOLLBELLRINGMISSED
18: DOLLBELLRINGANSWERED
19: ANTITHEFT

@AndreiArdelean1 could you please test this script with the pytapo 3.1.13 to verify it still works? I think I managed to fix the timezone issue and it seems to be working fairly well now for me.

It works!

When I try to run the script above on the latest python docker image I get the following error:
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1002)
Do you have a tip? Maybe it has something todo with the IP not being a hostname?  Is there a way to set the request to insecure?

@AndreiArdelean1 Just to clarify, you were able to extract the AI detected events (person, pet, vehicle, baby crying, etc.)?

Hey, yes, it is working. It did work for motion, person, and pet, but it wasn't working for tamper detection (Or I didn't manage to get it in my testing as that type of detection was a bit hard to trigger). Sounds detection (meow, bark, baby, glass break) I couldn't trigger the actual event during testing so I can't say if it is working. But, if an event is shown with the correct icon in the playback list in the official app, then you should also be able to detect it with this function.
You could:

every x seconds request the most recent events. The downside is that it introduces a load on the camera, and since the camera has limited resources (CPU, memory, etc.) the official app may become unresponsive, and it may cause other unknown issues
when an event is detected, with 1s (or a smaller amount of time to make sure the event registers) and request the latest event from the camera to get the actual event type.

Thank you for letting me know! I'm mainly interested in the sounds detection, so might try to get this to work.
(In case you're interested, I have had success in triggering the events resulting in notifications through the Tapo app by simply using youtube videos of baby crying, dog barking, etc.)
@JurajNyiri Any plans to implement something like this in the Home Assistant integration? I will probably try to do something ad-hoc, but would be really cool to have this in the integration 😊

I’ve read this conversation with much interest, but didn’t understand what is actually possible now within the context of the integration.  I own a Tapo C310 and am interested  in the person detection. How should I proceed to integrate it?

@cruckfi it is not currently available inside the integration at all. What you could do today, is write a custom script hitting the camera and sending the information to HA, for example through REST API.

I will eventually add this to the integration but I do not have any estimate as of today.

To me it is THE one functionality I need in HA.
Right now I use Alexa to detect a person and notify HA. That means the Tapo cameras must be able to communicate with the Internet. As soon as the person detection is available in HA it means that the Tapo cameras can be put offline which is a lot better for privacy.

I’ve read this conversation with much interest, but didn’t understand what is actually possible now within the context of the integration. I own a Tapo C310 and am interested in the person detection. How should I proceed to integrate it?

You can also create a webhook with https://ifttt.com/tplink_tapo that notifies HA when a person is detected.

I was looking into this again in hope to implement it and tested it on C200 HW 1.0 1.3.6 Build 230424 Rel.77225n(4555) and C200 HW 3.0 1.3.6 Build 230424 Rel.77225n(4555) with this script and I am only getting the event once it stops - not when it starts. Is this different for you @AndreiArdelean1 ?

For me (C225) it detects events as soon as they are detected and sets the end date to a date in the future
I'd recommend not implementing this script directly into HA as it strains the cameras already limited processing power and the whole camera may freeze or even crash. This script also doesn't always work if you try to perform the call to get the events from the official app. This is probably because the call takes some time to be processed on the camera, and if another request is received by the camera during that time, the second request would fail.

My C310 answer:
2023-08-21 14:21:02.550051
{'start_time':<PHONE_NUMBER>, 'end_time':<PHONE_NUMBER>, 'alarm_type': 2, 'startRelative': 40, 'endRelative': 0}
2023-08-21 14:20:22
2023-08-21 14:21:02

I'm doing some research to try to figure out how (if) can we change this behavior...

Also very interested in this feature - I have C210 cameras and always happy to help test

For those looking to use the built-in Tapo person detection with Home Assistant, until we can do so through this integration, I am using a workaround:
I have a Tapo TC65 and a Tapo smart socket P100. In the Tapo app, I can set the smart socket to switch on based on AI person detection.
In Home Assistant, I then use the state of the smart socket as a proxy for person detection. It switches itself back off, so that the next person detection event can switch it on again.
Obviously not an ideal workaround, but it works well enough for me for now!

That's interesting, I am currently using the person detection routine in Alexa to turn a Phillips hue light on that gets detected by HA. The most cumbersome way of detecting a person i suppose but didn't find a better way. Your method would allow me a least to ditch Alexa who tries to sell me batteries for my hue remotes when they run out...

@Myrddraal can you check if your solution works without internet? I know the camera's person detection is done off line but I wonder if the internet is necessary for your tapo automation to work

@NEVdataDyne I haven't tried, but I'm fairly sure that it does rely on an internet connection. As I understand it, you can view the camera feed on the same network, without internet, but controlling other devices requires an internet connection.

Does it seem unlikely that we will ever be able to get Person Detection events?  This is the main issue preventing me from going all local.

The best would be to ask tplink to add it to the onvif standard. Then it will work across all the 3rd party solutions and applications.

Support said they passed on the request to R&D but you know how that goes...

Just a small side note based on my observations:
I have a Tapo C220 cam. The cam supports two types of notification subscriptions:

pull point subscriptions where ONVIF client polls the cam-provided URL for events;
base notification subscriptions where the ONVIF cam connects to the client-provided URL and posts events to the client.

I noticed, in accordance with all the above observations, that the cam does not publish events on any topic apart from Motion when pull point event polling is used.
However, when the second method is used, the cam sends additional events. I can get notifications when AI detects a person in motion (EVENT: 2024-02-11T13:07:05.000Z RuleEngine/CellMotionDetector/People PROP:Changed SRC:VideoSourceConfigurationToken, VideoAnalyticsConfigurationToken, Rule=vsconf, VideoAnalyticsToken, MyPeopleDetectorRule DATA:IsPeople=true). :+1:
I haven't tested for other event types yet (pets, cars, noise) as this is a bit harder to do, but I will update this comment if I observe any other event types on the listener.

I just got this custom integration set up for a C120 and am I trying to digest the current state of this issue.
First question, I think the C120 is fairly new hardware introduced in 2023 based on reviews. Is there any testing I should be doing against it?

Any update on this? I do see this message in my home assistant log:
Driveway: No registered handler for event from tapo_controltapo.driveway.c325wb.lan: { 'SubscriptionReference': { 'Address': { '_value_1': 'http://<IP_ADDRESS>:2020/event-0_2020', '_attr_1': None }, 'ReferenceParameters': None, 'Metadata': None, '_value_1': None, '_attr_1': None }, 'Topic': { '_value_1': 'tns1:RuleEngine/TPSmartEventDetector/TPSmartEvent', 'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet', '_attr_1': { } }, 'ProducerReference': { 'Address': { '_value_1': 'http://<IP_ADDRESS>:5656/event', '_attr_1': None }, 'ReferenceParameters': None, 'Metadata': None, '_value_1': None, '_attr_1': None }, 'Message': { '_value_1': { 'Source': { 'SimpleItem': [ { 'Name': 'VideoSourceConfigurationToken', 'Value': 'vsconf' }, { 'Name': 'VideoAnalyticsConfigurationToken', 'Value': 'VideoAnalyticsToken' }, { 'Name': 'Rule', 'Value': 'MyTPSmartEventDetectorRule' } ], 'ElementItem': [], 'Extension': None, '_attr_1': None }, 'Key': None, 'Data': { 'SimpleItem': [ { 'Name': 'IsVehicle', 'Value': 'true' } ], 'ElementItem': [], 'Extension': None, '_attr_1': None }, 'Extension': None, 'UtcTime': datetime.datetime(2024, 11, 2, 0, 33, 11, tzinfo=datetime.timezone.utc), 'PropertyOperation': 'Changed', '_attr_1': { } } } }

Formatted to make it easier to read:
{'Message': {'_value_1': {'Data': {'ElementItem': [],
                                   'Extension': None,
                                   'SimpleItem': [{'Name': 'IsVehicle',
                                                   'Value': 'true'}],
                                   '_attr_1': None},
                          'Extension': None,
                          'Key': None,
                          'PropertyOperation': 'Changed',
                          'Source': {'ElementItem': [],
                                     'Extension': None,
                                     'SimpleItem': [{'Name': 'VideoSourceConfigurationToken',
                                                     'Value': 'vsconf'},
                                                    {'Name': 'VideoAnalyticsConfigurationToken',
                                                     'Value': 'VideoAnalyticsToken'},
                                                    {'Name': 'Rule',
                                                     'Value': 'MyTPSmartEventDetectorRule'}],
                                     '_attr_1': None},
                          'UtcTime': datetime.datetime(2024, 11, 2, 0, 33, 11, tzinfo=datetime.timezone.utc),
                          '_attr_1': {}}},
 'ProducerReference': {'Address': {'_attr_1': None,
                                   '_value_1': 'http://<IP_ADDRESS>:5656/event'},
                       'Metadata': None,
                       'ReferenceParameters': None,
                       '_attr_1': None,
                       '_value_1': None},
 'SubscriptionReference': {'Address': {'_attr_1': None,
                                       '_value_1': 'http://<IP_ADDRESS>:2020/event-0_2020'},
                           'Metadata': None,
                           'ReferenceParameters': None,
                           '_attr_1': None,
                           '_value_1': None},
 'Topic': {'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
           '_attr_1': {},
           '_value_1': 'tns1:RuleEngine/TPSmartEventDetector/TPSmartEvent'}}

Here's one for a person detection:
{'Message': {'_value_1': {'Data': {'ElementItem': [],
                                   'Extension': None,
                                   'SimpleItem': [{'Name': 'IsPeople',
                                                   'Value': 'true'}],
                                   '_attr_1': None},
                          'Extension': None,
                          'Key': None,
                          'PropertyOperation': 'Changed',
                          'Source': {'ElementItem': [],
                                     'Extension': None,
                                     'SimpleItem': [{'Name': 'VideoSourceConfigurationToken',
                                                     'Value': 'vsconf'},
                                                    {'Name': 'VideoAnalyticsConfigurationToken',
                                                     'Value': 'VideoAnalyticsToken'},
                                                    {'Name': 'Rule',
                                                     'Value': 'MyPeopleDetectorRule'}],
                                     '_attr_1': None},
                          'UtcTime': datetime.datetime(2024, 11, 3, 18, 40, 43, tzinfo=datetime.timezone.utc),
                          '_attr_1': {}}},
 'ProducerReference': {'Address': {'_attr_1': None,
                                   '_value_1': 'http://<IP_ADDRESS>:5656/event'},
                       'Metadata': None,
                       'ReferenceParameters': None,
                       '_attr_1': None,
                       '_value_1': None},
 'SubscriptionReference': {'Address': {'_attr_1': None,
                                       '_value_1': 'http://<IP_ADDRESS>:2020/event-0_2020'},
                           'Metadata': None,
                           'ReferenceParameters': None,
                           '_attr_1': None,
                           '_value_1': None},
 'Topic': {'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
           '_attr_1': {},
           '_value_1': 'tns1:RuleEngine/PeopleDetector/People'}}

So is adding this as simple as adding another parser at https://github.com/home-assistant/core/blob/dev/homeassistant/components/onvif/parsers.py?

just checking any updates on this? ive seen a few duplicate posts

I'm working on a patch upstream to ha core, but it's taking longer than expected because there are currently no tests for the parsers.py module. I'm working on adding tests first.

Finally won my battle with zeep and the embedded xsd:any in the onvif schema so I got unit tests working.
I'm going to add support for vehicle and person detection because it's the only two examples I have in this thread. If folks have examples of other types, please post it here. It needs to be the format output from the "No registered handler for event from ..." log message. The only other one I've tried is pet detection, but I get no log message for a pet event for some reason.

Line crossing detection events would be useful to me as it limits a lot of false positives. Is there any possibility of getting those notifications?
I don't see any 'No registered handler' messages in my logs, What logging level do I need to be at?   (Debug is super verbose so really can't leave that running for too long.

For me, I see them at warning level:
Log details (WARNING)
Logger: homeassistant.components.onvif
Source: components/onvif/event.py:168
integration: ONVIF (documentation, issues)
First occurred: November 12, 2024 at 12:08:00 PM (2 occurrences)
Last logged: November 12, 2024 at 12:29:27 PM

Driveway: No registered handler for event from tapo_controltapo.driveway.c325wb.lan: {....

I'm not sure why some show up and some don't. I did see some mentions online that maybe some cameras are not sending onvif events properly for some of these events, so it could be a combination of camera model and firmware.

Interesting. I have 3 x C120s. I don't see those errors and if they are logged at warn I should see them.

I have (2) C720 cameras on 1.2.3 Build 240823 Rel.40327n that also don't seem to send out these onvif messages. My C325WB on 1.2.2 Build 240723 Rel.54710n does. Not sure what is going on, might have to do some further debugging to see why some cameras don't seem to send onvif messages.

Same here. I really want to participate so we can detect baby cries. I use my C110 as a baby monitor, but right now it’s just set up to trigger on any noise, which results in too many false positives. I also have nothing in my logs 😔.

I have 4xC210 HW2.0 and I have lost binary sensors on some. All on FW 1.4.3 build 241010. Happy to contribute.

Sent out the pull request for person and vehicle detection, which will work for my C325WB. My C720 cameras don't even get motion. I turned on debug logging for onvif component and I see this message:
2024-11-16 13:36:17.061 DEBUG (MainThread) [homeassistant.components.onvif] Side Porch: Device does not support notification service or too many subscriptions: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
which looks to be coming from here:
https://github.com/home-assistant/core/blob/9711816542b581d7c40a3d69668c3711d5af7c23/homeassistant/components/onvif/event.py#L300
I'm not sure why the camera would be returning a 500 error when trying to set up onvif pull subscription.
I turned on "Diagnostics" on the camera that supposedly outputs a log file to the sd card. Going to pull it and see if there's anything helpful on it.

Nothing interesting in the camera's diagnostic log, so not sure what else to try for debugging why some cameras just return 500s when trying to pull notifications. For anyone else not getting events, it would be nice to confirm people see the same issue with other cameras, since I only have my C720s that are showing this symptom. If you enable debug logging like this in your configuration.yaml file:
logger:
  logs:
    homeassistant.components.onvif: debug

You should see a log message like mine.

I have a TC55 - which is identical to the C720 as far as I can tell - and it also doesn't seem to send any ONVIF notifications. There is a Cell motion detection sensor, but it is almost always unavailable; when it does come online, it is on for hours before going back to unavailable. It seems to have no correlation to actual motion events recognized by the camera.
I enabled debug logging for the onvif component and I received the same error:
DEBUG (MainThread) [homeassistant.components.onvif] Tapo Floodlight: Device does not support notification service or too many subscriptions: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.x.xxx:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeeHTTP/1.1 500 Internal Server Error')

I wonder if the C720/TC55 firmware doesn't have proper support for ONVIF events? That would be a big bummer.

For my C720s, I turned off webhook in the device configuration and restarted home assistant. Switching to pullpoint seemed to make motion events start coming in, but they seem unreliable. And only motion gets picked up, no other events. The C325WB is working great with webhook and that's where I see the other event types. I wonder if pullpoint somehow doesn't work with other event types and for some reason webhooks are broken on C720/TC55. I'll play around some more with seeing if I can get webhooks working with my C720 cameras.

Some exciting progress. I installed this onvif client software to test an independent implementation:
https://www.happytimesoft.com/products/onvif-client/index.html
And after subscribing to events on my C720, I am able to see both motion and people events coming in:

So that tells me that the C720 at least is capable of producing these events. Next I'm going to try to capture the xml payloads with wireshark to hopefully figure out the difference between what this happytime client is doing vs. home assistant's python onvif/zeep client.

I figured out what causes the 500 internal server error. The cameras do not like the ns0/ns1 namespace prefixes zeep is generating. Technically, it's correct due to the xmlns, but most serializers will put the xmlns definitions in the envelope at the start of the xml document.
This fails:
<ns0:Subscribe xmlns:ns0="http://docs.oasis-open.org/wsn/b-2">
  <ns0:ConsumerReference>
    <ns1:Address xmlns:ns1="http://www.w3.org/2005/08/addressing">http://<IP_ADDRESS>:9988/</ns1:Address>
  </ns0:ConsumerReference>
  <ns0:InitialTerminationTime>PT60S</ns0:InitialTerminationTime>
</ns0:Subscribe>

While this works:
<wsnt:Subscribe>
  <wsnt:ConsumerReference>
    <ns0:Address xmlns:ns0="http://www.w3.org/2005/08/addressing">http://<IP_ADDRESS>:9988/</ns0:Address>
  </wsnt:ConsumerReference>
  <wsnt:InitialTerminationTime>PT60S</wsnt:InitialTerminationTime>
</wsnt:Subscribe>

To get that to be output, I added:
self.zeep_client.set_ns_prefix('wsnt', 'http://docs.oasis-open.org/wsn/b-2')
self.zeep_client.set_ns_prefix('wsa', 'http://www.w3.org/2005/08/addressing')

to onvif\client.py. I'm kind of surprised that zeep doesn't put namespaces at the top by default, since it reduces serialization byte size quite a bit. As a workaround, I can send a PR upstream to python-onvif-zeep-async to do this for all of the common onvif namespaces. I'll see if he'll take that PR. That should hopefully fix everyone's 500s and make additional event types start flowing.

Status:

https://github.com/hunterjm/python-onvif-zeep-async/pull/54 is out to fix the 500 errors. This will need to be built into a new release so home assistant can pick up the dependency change.
https://github.com/home-assistant/core/pull/130769 is still pending with no response.

Nothing else I can do until those are accepted.

Good news, everything has been merged. Unfortunately, it looks like I just barely missed the 2024.12.0 release for the person and vehicle event change. However, the bump to onvif-zeep-async to 3.1.13 did make it into 2024.12.0, so some cameras should start getting motion events using push that were broken with pull. We'll have to wait for the next release to pick up the person and vehicle event.

Hey guys, think I may have misunderstood? I don't see any new entities for my camera. I have cw320. I'm on 2024.12.2.

Do you have "Enable webhooks" enabled in the device configuration?

@simon-bd I see the same as you, but I also have this additional message
PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
I'm guessing it's because I've disabled internet access to my camera from my router. I'm waiting to see what tomorrow's Tapo-app update will do to the camera. I don't want to send my feed to the Internet, but I also would like to receive firmware updates to my camera. So, if I enable Internet access temporarily, I don't want my camera to stop working with this integration.
I hope that the new ONVIF code allows us to get all the sensors' data, I was relaying on IFTTT to get those specific notifications. I didn't like having my data sent to the Internet, and with the firmware stopping us from using this integration, it was better to disable Internet access.

Settings -> Devices & services -> Tapo: Cameras Control -> Configure button the device:

Select "Configure device" -> Submit
Check the "Enable webhooks" box:

You probably need to restart home assistant for it to take effect.
I could be wrong, but I don't think the cameras need internet access for local onvif to work.

Thanks a bunch!
I already had the ‘Enable webhooks’ option turned on in my Tapo integration settings in Home Assistant. I just set up a second camera of the same model, and I’ll keep an eye on the logs. Before, the second camera was only connected to Scrypted, not to Home Assistant.
I’ll keep the internet access blocked for these cameras, even though it’s blocked. I don’t want to send any data to the internet.
Thanks again for the helpful instructions and suggestions. I really appreciate you taking the time to walk me through this.

I have a TC55 (same as C720) and have noticed that if there is more than one ONVIF client connected to it (this integration + Scrypted, for example) event notifications behave erratically - often times motion is "detected" for hours at a time without a break, and sometimes there's no detection at all. I've reported it to TP Link support and they are trying to reproduce it.

@simon-bd I have two C120, one if v1 and the other v1.6, they're not connected to anything else just this integration and the Tapo app on my phone, and webhook is also enabled. Not sure what the PullPoint error is from

Actually, when I enable  it looks like I'm still seeing my cameras fall back to pullpoint due to webhook still seeing 500s:
2024-12-12 13:26:11.510 DEBUG (MainThread) [homeassistant.components.onvif] Side Porch: Device does not support notification service or too many subscriptions: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 <IP_ADDRESS>:2
020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

Those errors should have gone away with the bump of onvif-zeep-async library. Now I realize the bump did not make it into 2024.12 at all. Looking at my installation, I still see 3.1.12, not 3.1.13:
# grep onvif-zeep /usr/src/homeassistant/homeassistant/components/onvif/manifest.json
  "requirements": ["onvif-zeep-async==3.1.12", "WSDiscovery==2.0.0"]

And browsing the 2024.12.2 tag, I also don't see it:
https://github.com/home-assistant/core/blob/2024.12.2/homeassistant/components/onvif/manifest.json
Sorry I was mistaken about that: we're going to have to wait for 2025.1 to get any of the changes.

@jterrace, I would think, that is just an oversight. As it is a version bump and other issue has been resolved and merged to dev as well. Let's try to ping @bdraco and see if https://github.com/home-assistant/core/pull/132229 can be merged.

@GSzabados there's not much value to the version bump without also getting the person/vehicle detection change, which is clearly a new feature. I don't think merging new features is allowed in point releases. We will just have to be patient and wait for 2025.1

@jterrace beta is out with the new updates 🎉🎉

Would it also possible to support baby crying detection?

Yes, we can support any of the events. Once 2025.1 lands, it should fix push notifications, which many cameras only support additional notifications with. For any event types not supported, you will see an error in your log like "No registered handler for event from" (see example above) and it contains a dump of the format of the notification.
That event dump can be piped directly into unit tests to add support for more event types. I only added people and vehicle detection, because that's what I have access to (no crying babies in my house 😆 ). Once everyone upgrades to 2025.1 and starts getting the events logged, I was planning to collect samples from everyone to cover all the different types and send another PR to HA to support them all.


Add option to specifiy number of threads use for crawling

Simply setting EventMachine.threadpool_size seems to do the trick. Fun fact: If you set it to 0, it never does anything.
Crawl pages witin a domain, reporting any page that returns a bad response code
Usage: crawl [options] domain
    -s, --start /home,/about         Starting path(s), defaults to /
    -u, --username username          Basic auth username
    -p, --password password          Basic auth password
    -c, --connections count          Max mumber of parallel connections to use. The default is 20.
    -v, --verbose                    Give details when crawling
    -h, --help                       Show this message
        --version                    Print version

@jjbohn review?

Is there a default? It says 20, but I don't see any proof of it. Is that an event machine default? Also, should it be something more like 4 for normal processors?

20 seems like it would cause a lot of blocking issues and actually be slower on most machines.

:+1:

:+1:


Update simple bank account app

Description
This sample application had multiple issues: it was using old versions of ScalarDL Client SDK, Spring Boot, and Gradle. Additionally, despite having a gradlew file, the gradle-wrapper.jar was missing. These issues made it difficult for users to use the application easily. Therefore, I tried to resolve these problems and made accompanying changes to the directory structure, code modifications, and documentation updates.
Related issues and/or PRs
N/A
Changes made
The main changes are followings.

Upgrading the ScalarDL Java Client SDK version
Upgrading the Spring Boot version
Separating contract code from application code

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have updated the documentation to reflect the changes.
[x] Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
[x] Tests (unit, integration, etc.) have been added for the changes.
[x] My changes generate no new warnings.
[x] Any dependent changes in other PRs have been merged and published.

Additional notes (optional)
N/A
Release notes
N/A

Regarding the separation of contract code and application code: The Spring Boot version upgrade required Java version 17 or higher. However, the contracts needs to be Java 8-compatible binaries. I considered that users might want to use newer versions of Java rather than Java 8. To address this issue, I decided to separate the contract code (Java 8-compatible) from the application code (Java 21-compatible). (I have previously confirmed this design decision with @jnmt  and @kota2and3kan.)
Furthermore, I prepared separate client.properties files for both directories (contract/ and app/), allowing the administrator registering the contracts and the application executing the contracts to use different client.properties files.


Allow setting to uid and gid in dchmod

Currently dchmod only appears to accept user and group names instead of numeric IDs. In the case where resolving a name is difficult (e.g. a LC CZ user that doesn't exist on RZ), it would be beneficial to be able to supply a UID or GID instead of a name.

Good point!  That should be easy to add, too, so very good point :-)

This PR adds support for giving numeric uid/gid in --owner/--group options:  https://github.com/hpc/mpifileutils/pull/280

This feature was added with v0.10


is this a trojan or is it fake?

https://i.imgur.com/r9aWsVC.jpg

You could use search before creating an issue :-)
https://github.com/elgatito/plugin.video.elementum/issues?q=is%3Aissue+trojan

@zoreu Duplicate. Source is opened. There is no trojan.