Closed slydiman closed 2 years ago
onvif documentation onvif source (message by IssueLinks)
Hey there @hunterjm, mind taking a look at this issue as its been labeled with an integration (onvif
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This issue is still actual. It applies to all XM (Xiongmai) cameras at least. Someone must add the following code to onvif/parsers.py
@PARSERS.register("tns1:Device/Trigger/DigitalInput")
# pylint: disable=protected-access
async def async_parse_digital_input(uid: str, msg) -> Event:
"""Handle parsing event message.
Topic: tns1:Device/Trigger/DigitalInput
"""
try:
source = msg.Message._value_1.Source.SimpleItem[0].Value
return Event(
f"{uid}_{msg.Topic._value_1}_{source}",
"Digital Input",
"binary_sensor",
"problem",
None,
msg.Message._value_1.Data.SimpleItem[0].Value == "true",
)
except (AttributeError, KeyError):
return None
I get a very similar message with an Amcrest IP2M-841W
(only the value for the input token differs but should be compatible with the proposed fix):
2021-09-12 18:50:39 INFO (MainThread) [homeassistant.components.onvif] No registered handler for event from xx:xx:xx:xx:xx:xx: {
'SubscriptionReference': None,
'Topic': {
'_value_1': 'tns1:Device/Trigger/DigitalInput',
'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
'_attr_1': {
}
},
'ProducerReference': None,
'Message': {
'_value_1': {
'Source': {
'SimpleItem': [
{
'Name': 'InputToken',
'Value': '000'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Key': None,
'Data': {
'SimpleItem': [
{
'Name': 'LogicalState',
'Value': 'true'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Extension': None,
'UtcTime': datetime.datetime(2021, 9, 12, 16, 50, 39, tzinfo=<isodate.tzinfo.Utc object at 0xaea2a400>),
'PropertyOperation': 'Changed',
'_attr_1': {
}
}
}
}
Hello,
Same problem here with a Dahua video intercom
Dahua VTO2202F-P Firmware: 4.500.0000002.0.R, Build Date 2021-08-12
HomeAssistant core-2021.9.7
2021-09-29 16:33:56 INFO (MainThread) [homeassistant.components.onvif] No registered handler for event from 24:52:6a:XX:XX:XX: {
'SubscriptionReference': None,
'Topic': {
'_value_1': 'tns1:Device/Trigger/DigitalInput',
'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
'_attr_1': {
}
},
'ProducerReference': None,
'Message': {
'_value_1': {
'Source': {
'SimpleItem': [
{
'Name': 'InputToken',
'Value': '00000'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Key': None,
'Data': {
'SimpleItem': [
{
'Name': 'LogicalState',
'Value': 'false'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Extension': None,
'UtcTime': datetime.datetime(2021, 9, 29, 14, 33, 56, tzinfo=<isodate.tzinfo.Utc object at 0x7f60da7fba90>),
'PropertyOperation': 'Initialized',
'_attr_1': {
}
}
}
}
Hi,
I have the same issue with Hikvision DS-2CD2141G1-IDW1.
Home Assistant version core-2021.11.5
2021-11-25 22:12:04 INFO (MainThread) [homeassistant.components.onvif] No registered handler for event from xx:xx:xx:xx:xx:xx: {
'SubscriptionReference': None,
'Topic': {
'_value_1': 'tns1:RuleEngine/CountAggregation/Counter',
'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
'_attr_1': {
}
},
'ProducerReference': None,
'Message': {
'_value_1': {
'Source': {
'SimpleItem': [
{
'Name': 'VideoSourceConfigurationToken',
'Value': 'VideoSourceToken'
},
{
'Name': 'VideoAnalyticsConfigurationToken',
'Value': 'VideoAnalyticsToken'
},
{
'Name': 'Rule',
'Value': 'MyCountAggregation1'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Key': {
'SimpleItem': [
{
'Name': 'ObjectId',
'Value': '1'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Data': {
'SimpleItem': [
{
'Name': 'Count',
'Value': '0'
}
],
'ElementItem': [],
'Extension': None,
'_attr_1': None
},
'Extension': None,
'UtcTime': datetime.datetime(2021, 11, 25, 20, 12, 2, tzinfo=<isodate.tzinfo.Utc object at 0x7f95ed3af0>),
'PropertyOperation': 'Changed',
'_attr_1': {
}
}
}
}
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I am still constantly getting this INFO entry in my logs. I am currently on core-2022.2.9
Fixed in #70394
The problem
No registered handler for event tns1:Device/Trigger/DigitalInput
What is version of Home Assistant Core has the issue?
2021.3.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
ONVIF
Link to integration documentation on our website
https://www.home-assistant.io/integrations/onvif/
Example YAML snippet
Anything in the logs that might be useful for us?