Conversation
| @@ -0,0 +1,12 @@ | |||
| """Module for listen event types.""" | |||
There was a problem hiding this comment.
We probably want to keep this inside smartcam for now, as the types are very onvif-specific(?)
There was a problem hiding this comment.
I think it's better to have this at the top level so we can add other listen modules like for trigger logs and motion detection sensors.
| "device": None, | ||
| "feature": None, | ||
| "light": None, | ||
| "listen": None, |
There was a problem hiding this comment.
How about a new sub group "camera", which would contain this?
There was a problem hiding this comment.
As above I think we should keep this generic so we can add other listen modules like for trigger logs and motion detection sensors and have them all exposed with the one cli command. Users can provide the EventType options if they want to limit the events.
| instance_id: str | ||
|
|
||
| async def _invoke_callback(self, event: EventType) -> None: | ||
| self.callback(event) |
There was a problem hiding this comment.
Debug log the event here? I had to go and use wireshark to extract the full SOAP payload to see what's happening :-)
Here's one for the reference:
<?xml version="1.0"?>
<SOAP-ENV:Body>
<wsnt:Notify>
<wsnt:NotificationMessage>
<wsnt:SubscriptionReference>
<wsa5:Address>http://192.168.123.123:2020/event-1_2020</wsa5:Address>
</wsnt:SubscriptionReference>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic>
<wsnt:ProducerReference>
<wsa5:Address>http://192.168.123.123:5656/event</wsa5:Address>
</wsnt:ProducerReference>
<wsnt:Message>
<tt:Message PropertyOperation="Changed" UtcTime="2024-12-19T12:53:07Z">
<tt:Source>
<tt:SimpleItem Value="raw_vs1" Name="Source"/>
</tt:Source>
<tt:Data>
<tt:SimpleItem Value="false" Name="State"/>
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</wsnt:Notify>
</SOAP-ENV:Body>
See state = false, i.e., detection probably stopped?
There was a problem hiding this comment.
Now logging all messages although I'm worried this might be a bit too verbose. Maybe this should be a separate verbose flag to function?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1388 +/- ##
==========================================
- Coverage 92.42% 91.60% -0.83%
==========================================
Files 132 135 +3
Lines 8203 8354 +151
Branches 839 847 +8
==========================================
+ Hits 7582 7653 +71
- Misses 459 539 +80
Partials 162 162 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
How did you find those topics? There is also
I just added pet detection configuration in #1465 and I'll try to add the rest soon. Would be great if these events were also included in this PR. I'm open to helping as I have one C220 available for testing. Are you reverse engineering through packet sniffing or are those topics listed somewhere in the spec? I hope this gets merged, tested locally and motion detection works well. Thanks for the effort. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
No description provided.