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

403 error on PIR sensor #220

Closed
marcfon opened this issue Oct 15, 2024 · 5 comments
Closed

403 error on PIR sensor #220

marcfon opened this issue Oct 15, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@marcfon
Copy link

marcfon commented Oct 15, 2024

I'm getting the following 403 error in my logs:
2024-10-15 19:52:17.064 WARNING (MainThread) [custom_components.hikvision_next.isapi] Unexpected exception | Cannot fetch state for pir | Client error '403 Forbidden' for url 'http://192.168.0.30/ISAPI/WLAlarm/PIR'

I've tried disabling the switch and binary_sensor entities related to pir but that didn't solve the issue.

Attached is the device diagnostics.
config_entry-hikvision_next-01JA2VCR7QVSV9N52FK3MEFJBX.json

@maciej-or
Copy link
Owner

Please check permissions for the integration user
https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#hikvision-device-setup-checklist
If they are OK, try admin user
Your device is not the latest, might use different endpoint than /ISAPI/WLAlarm/PIR, can you check that somehow in browser network tab?

@marcfon
Copy link
Author

marcfon commented Oct 15, 2024

I'm already using the admin user just to make sure that that's not causing any issues.

Could it be that this device doesn't support PIR at all? The diagnostics log shows "isSupportPIR": "false",

@maciej-or
Copy link
Owner

It could, however the integration checks event triggers and your device announces

                  "id": "PIR",
                  "eventType": "PIR",
                  "eventDescription": "PIR Event trigger Information",

Flag isSupportPIR seems to be better check.

@maciej-or maciej-or added the bug Something isn't working label Oct 15, 2024
@marcfon
Copy link
Author

marcfon commented Oct 16, 2024

Yeah, it's weird that the device announced that trigger. From all the specs I can find online about this camera there's no mention of a PIR sensor whatsoever.

maciej-or added a commit that referenced this issue Oct 17, 2024
maciej-or added a commit that referenced this issue Oct 26, 2024
* improved pir support detection #220 (#222)

* support for renaming entity id (#224)

* added reboot service (#225)

* Feature/isapi request service (#227)

* blueprint for sensor state on video

* Fix/doorbell initialization (#228)

* changed isapi auth checking request

* version bump v1.0.19
@maciej-or
Copy link
Owner

https://github.com/maciej-or/hikvision_next/releases/tag/v1.0.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants