Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONVIF: No registered handler for event tns1:Device/Trigger/DigitalInput #48606

Closed
slydiman opened this issue Apr 1, 2021 · 10 comments
Closed
Assignees

Comments

@slydiman
Copy link
Contributor

slydiman commented Apr 1, 2021

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

logger:
  default: info
  logs:
    zeep.transport: debug
    homeassistant.components.onvif: debug

Anything in the logs that might be useful for us?

2021-04-02 02:04:23 INFO (MainThread) [custom_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': 'DIGIT_INPUT_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, 4, 1, 22, 4, 23, tzinfo=<isodate.tzinfo.Utc object at 0xac355640>),
            'PropertyOperation': 'Initialized',
            '_attr_1': {
        }
        }
    }
}
@probot-home-assistant
Copy link

onvif documentation
onvif source
(message by IssueLinks)

@probot-home-assistant
Copy link

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)

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Jun 30, 2021
@slydiman
Copy link
Contributor Author

slydiman commented Jul 1, 2021

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

@github-actions github-actions bot removed the stale label Jul 1, 2021
@codecat42
Copy link

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': {
        }
        }
    }
}

@AdrienBigot
Copy link

AdrienBigot commented Sep 29, 2021

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': {
}
}
}
}

@paulius2k
Copy link

paulius2k commented Nov 25, 2021

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': {
        }
        }
    }
}

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Feb 23, 2022
@paulius2k
Copy link

I am still constantly getting this INFO entry in my logs. I am currently on core-2022.2.9

@github-actions github-actions bot removed the stale label Feb 23, 2022
@hunterjm
Copy link
Member

hunterjm commented May 1, 2022

Fixed in #70394

@hunterjm hunterjm closed this as completed May 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants