home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.45k stars 30.69k forks source link

Axis P5512-E reports lot of warnings for unsupported topic/events #121990

Closed jpcornil-git closed 3 months ago

jpcornil-git commented 3 months ago

The problem

The axis core integration offers only a single camera entity for my P5512-E cameras but no motion detectors/PTZ controls/... A lot of warnings for unsupported topic/events are also reported in the system logs

What version of Home Assistant Core has the issue?

2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

axis

Link to integration documentation on our website

https://www.home-assistant.io/integrations/axis/

Diagnostics information

See core logs

Enregistreur: axis.models.event Source: runner.py:190 S'est produit pour la première fois: 15:49:41 (449 occurrences) Dernier enregistrement: 15:50:33

Unsupported operation {} Unsupported topic tns1:RuleEngine/tnsaxis:VideoMotionDetection/timer Unsupported topic tns1:RuleEngine/tnsaxis:VideoMotionDetection Unsupported topic tnsaxis:Storage/Recording Unsupported topic tnsaxis:Storage

See also extracted debug logs home-assistant_axis_2024-07-15T13-50-32.553Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

See unsupported topic/event with

tns1:RuleEngine/tnsaxis:VideoMotionDetection/motion
tnsaxis:Storage/Recording
PTZController/tnsaxis:Move/Channel_1
PTZController/tnsaxis:PTZPresets/Channel_1

Additional information

I was able to add support for motion detection for my P5512-E with the following changes

axis python library

/usr/local/lib/python3.12/site-packages/axis

models/event.py, L49: add to class EventTopic MOTION_DETECTION_2 = "tns1:RuleEngine/tnsaxis:VideoMotionDetection/motion"

models/event.py, L76: add to TOPIC_TO_GROUP EventTopic.MOTION_DETECTION_2: EventGroup.MOTION,

axis homeassistant integration

/usr/src/homeassistant/homeassistant/components/axis

binary_sensor.py, L127: add to ENTITY_DESCRIPTIONS( ..., AxisBinarySensorDescription(), ...) EventTopic.MOTION_DETECTION_2,

entity.py, L28: add to TOPIC_TO_EVENT_TYPE EventTopic.MOTION_DETECTION_2: "Motion",

home-assistant[bot] commented 3 months ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (axis) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `axis` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign axis` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


axis documentation axis source (message by IssueLinks)

Kane610 commented 3 months ago

The axis core integration offers only a single camera entity for my P5512-E cameras but no motion detectors/PTZ controls/... A lot of warnings for unsupported topic/events are also reported in the system logs

Yes unfortunately that device is very old and doesn't have many of the features currently supported by the integration.

A lot of warnings for unsupported topic/events are also reported in the system logs

Those are only visible once debug logging has been enabled, nothing to worry about, those are there to be able to see yet unsupported events.

I was able to add support for motion detection for my P5512-E with the following changes

Awesome! Put up a PR <3

There are nothing wrong reported in this issue, not more than that I currently haven't implemented more support making the device a bit slim on the feature set :)

jpcornil-git commented 3 months ago

Thanks for the quick feedback.

Wrt PR, I will have to make one PR for each repo I guess ?

Kane610 commented 3 months ago

Thanks for the quick feedback.

Wrt PR, I will have to make one PR for each repo I guess ?

  • Do you have pointers/documentation/... related to axis event topics ? (may add more than support for additional motion detection) ?
  • Coding/naming guidelines

Try to keep each PR related to one change and you can do as many PRS as you like I have t set any specific guidelines. Mimic what has already been done and then I will guide in the review

Kane610 commented 3 months ago

Closing this one as there is no issue here