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

HTTPNotificationHost being set to 0.0.0.0 #277

Open
jefft4 opened this issue Dec 17, 2024 · 2 comments
Open

HTTPNotificationHost being set to 0.0.0.0 #277

jefft4 opened this issue Dec 17, 2024 · 2 comments

Comments

@jefft4
Copy link

jefft4 commented Dec 17, 2024

I'm still not getting any events from my NVR at all. I've looked at the debug logging and the config entry JSON and I can see what the problem is, but not why it's happening.

The debug log here shows the issue. I'm not sure what I'm seeing, but the sequence here looks like the integration reads the current state (which is correct) and then issues a PUT, changing it to rubbish (0.0.0.0:80).

2024-12-17 18:15:55.799 DEBUG (MainThread) [custom_components.hikvision_next.isapi.isapi] --- [GET] http://192.168.9.222/ISAPI/Event/notification/httpHosts
2024-12-17 18:15:55.799 DEBUG (MainThread) [custom_components.hikvision_next.isapi.isapi] 
{'HttpHostNotificationList': {'@version': '1.0', '@xmlns': 'urn:psialliance-org', 'HttpHostNotification': {'@version': '1.0', '@xmlns': 'urn:psialliance-org', 'id': '1', 'url': '/api/hikvision', 'protocolType': 'HTTP', 'parameterFormatType': 'XML', 'addressingFormatType': 'ipaddress', 'ipAddress': '192.168.9.200', 'portNo': '8123', 'httpAuthenticationMethod': 'none', 'Extensions': {'@xmlns': 'http://www.hikvision.com/ver20/XMLSchema', 'intervalBetweenEvents': '0'}}}}
2024-12-17 18:15:55.805 DEBUG (MainThread) [custom_components.hikvision_next.isapi.isapi] --- [PUT] http://192.168.9.222/ISAPI/Event/notification/httpHosts
2024-12-17 18:15:55.805 DEBUG (MainThread) [custom_components.hikvision_next.isapi.isapi] >>> payload:
<?xml version="1.0" encoding="utf-8"?>
<HttpHostNotificationList version="1.0" xmlns="urn:psialliance-org"><HttpHostNotification version="1.0" xmlns="urn:psialliance-org"><id>1</id><url>/</url><protocolType>HTTP</protocolType><parameterFormatType>XML</parameterFormatType><addressingFormatType>ipaddress</addressingFormatType><ipAddress>0.0.0.0</ipAddress><portNo>80</portNo><httpAuthenticationMethod>none</httpAuthenticationMethod><Extensions xmlns="http://www.hikvision.com/ver20/XMLSchema"><intervalBetweenEvents>0</intervalBetweenEvents></Extensions></HttpHostNotification></HttpHostNotificationList>
2024-12-17 18:15:55.805 DEBUG (MainThread) [custom_components.hikvision_next.isapi.isapi] 
<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/Event/notification/httpHosts</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
<MErrCode>1</MErrCode>
</ResponseStatus>

If I do a PUT with the same parameters from postman, I get the response 'OK' and a GET httpHosts then returns the correct IP, port and URL, so the ISAPI endpoint appears to be working as expected.

This is the content of the config dialogue:
image

What's going on here?

@maciej-or
Copy link
Owner

maciej-or commented Dec 17, 2024

Hi @jefft4
everything is fine, after removing device from integration this setting returns to its default state
http://0.0.0.0:80/
Does it occur on adding device?

@jefft4
Copy link
Author

jefft4 commented Dec 18, 2024

Not sure I follow. I didn't remove anything. I did reconfigure the integration (without changing anything) though, as it showed an error - perhaps that caused the change?

I'm still trying to work out why the JSON response from the NVR looks good - lots of events defined to notify 'center' - but the sensors in HA never show any state changes. I need to try triggering an event manually via Postman and also log connections between the two devices, then hopefully I'll get some clues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants