Skip to content
New issue

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

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

Already on GitHub? # to your account

MagnetShockCurrentStatus error #131

Closed
Yanniiiick opened this issue Oct 10, 2024 · 4 comments
Closed

MagnetShockCurrentStatus error #131

Yanniiiick opened this issue Oct 10, 2024 · 4 comments

Comments

@Yanniiiick
Copy link

Hi,

When I restart HA after integrating my AXPro (DS-PWA96-M-WE V1.2.9 build 240621), it only detects 3 devices over the 7 connected to the AXPro.
When I open the loaded devices, they show no sensors.

The devices on the hikvision web page
Devices in hikvision

What I get in HA
AXpro

list equipments HA

entities HA

The page of the magnet that has been detected
Magnet salon
All the detected devices have no sensor on their page like the magnet

Could the naming of the devices be an issue ?

The HA logs after restart

2024-10-09 22:45:43.013 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hikvision_axpro which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-09 22:45:43.014 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-09 22:45:44.208 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hikvision_axpro' accesses hass.helpers.service. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from service directly at custom_components/hikvision_axpro/__init__.py, line 59: hass.helpers.service.async_register_admin_service(, please create a bug report at https://github.com/petrleocompel/hikaxpro_hacs/issues
2024-10-09 22:45:44.229 DEBUG (SyncWorker_1) [hikaxpro] Session_Capabilities response
2024-10-09 22:45:44.229 DEBUG (SyncWorker_1) [hikaxpro] Status: 200
2024-10-09 22:45:44.229 DEBUG (SyncWorker_1) [hikaxpro] Content: b'<SessionLoginCap version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">\n<sessionID>6528b541b15cb2466051c79b1e373ead628c4b774f0f17f8b1718920e2f87b42</sessionID>\n<challenge>cfb9fcedc18f18555b0a6a7750617e9a</challenge>\n<iterations>100</iterations>\n<isSupportRTSPWithSession>true</isSupportRTSPWithSession>\n<isIrreversible>true</isIrreversible>\n<sessionIDVersion>2.1</sessionIDVersion>\n<salt>F17B3EB457CCA28345E58ACF357613E0A919579539385850DCA7C9EF01EEC84A</salt>\n<salt2>0C74FD870FBBE360EEDDEBEC28613CDCE56006A43EC7CCE2D1ED6FE3A1A5EB9F</salt2>\n</SessionLoginCap>\n'
2024-10-09 22:45:44.230 DEBUG (SyncWorker_1) [hikaxpro] Text: <SessionLoginCap version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<sessionID>6528b541b15cb2466051c79b1e373ead628c4b774f0f17f8b1718920e2f87b42</sessionID>
<challenge>cfb9fcedc18f18555b0a6a7750617e9a</challenge>
<iterations>100</iterations>
<isSupportRTSPWithSession>true</isSupportRTSPWithSession>
<isIrreversible>true</isIrreversible>
<sessionIDVersion>2.1</sessionIDVersion>
<salt>F17B3EB457CCA28345E58ACF357613E0A919579539385850DCA7C9EF01EEC84A</salt>
<salt2>0C74FD870FBBE360EEDDEBEC28613CDCE56006A43EC7CCE2D1ED6FE3A1A5EB9F</salt2>
</SessionLoginCap>

2024-10-09 22:45:44.230 DEBUG (SyncWorker_1) [hikaxpro] Headers: {'Date': 'Wed, 09 Oct 2024 22:45:44 GMT', 'Server': 'Webs', 'X-Frame-Options': 'SAMEORIGIN', 'Cache-Control': 'no-cache', 'Content-Length': '568', 'Content-Type': 'application/xml; charset="UTF-8"', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=60, max=99'}
2024-10-09 22:45:44.230 DEBUG (SyncWorker_1) [hikaxpro] End Session_Capabilities response
2024-10-09 22:45:44.230 DEBUG (SyncWorker_1) [hikaxpro] Debug data <SessionLoginCap version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<sessionID>6528b541b15cb2466051c79b1e373ead628c4b774f0f17f8b1718920e2f87b42</sessionID>
<challenge>cfb9fcedc18f18555b0a6a7750617e9a</challenge>
<iterations>100</iterations>
<isSupportRTSPWithSession>true</isSupportRTSPWithSession>
<isIrreversible>true</isIrreversible>
<sessionIDVersion>2.1</sessionIDVersion>
<salt>F17B3EB457CCA28345E58ACF357613E0A919579539385850DCA7C9EF01EEC84A</salt>
<salt2>0C74FD870FBBE360EEDDEBEC28613CDCE56006A43EC7CCE2D1ED6FE3A1A5EB9F</salt2>
</SessionLoginCap>

2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] Connect response
2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] Status: 200
2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] Content: b'<SessionLogin version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">\n<statusValue>200</statusValue>\n<statusString>OK</statusString>\n<isRiskPassword>false</isRiskPassword>\n<isActivated>true</isActivated>\n</SessionLogin>\n'
2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] Text: <SessionLogin version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<statusValue>200</statusValue>
<statusString>OK</statusString>
<isRiskPassword>false</isRiskPassword>
<isActivated>true</isActivated>
</SessionLogin>

2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] Headers: {'Date': 'Wed, 09 Oct 2024 22:45:44 GMT', 'Server': 'Webs', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Length': '228', 'Content-Type': 'application/xml; charset="UTF-8"', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=60, max=99', 'Cache-Control': 'no-cache="set-cookie"', 'Set-Cookie': 'WebSession_03f5f867ad=fc8aa881face7f3e7199e7c48e685a652df007d560252d0195ef9ec0370e248c;path=/;HttpOnly'}
2024-10-09 22:45:44.371 DEBUG (SyncWorker_1) [hikaxpro] End connect response
2024-10-09 22:45:44.777 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up hikvision_axpro platform for sensor
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/hikvision_axpro/sensor.py", line 120, in async_setup_entry
    if zone.zone.magnet_shock_current_status.magnet_shock_current_status is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MagnetShockCurrentStatus' object has no attribute 'magnet_shock_current_status'. Did you mean: 'magnet_shock_status'?
@petrleocompel petrleocompel changed the title Only part of my devices are detected and they show no sensors MagnetShockCurrentStatus error Oct 10, 2024
@Joerivanrokeghem
Copy link

I have the same problem, before the ladt update everything was fine. On last update i have also no entyties on the devices. I reverted to v2.1.6 and everything works as normal

@petrleocompel
Copy link
Owner

Fixed - Released v2.2.1

@petrleocompel
Copy link
Owner

 @Yanniiiick thank you for report
@Joerivanrokeghem - sadly since I do not have every device and "python" is not compiled it can happen that some error will get through my testing. So you need to really report the issue.

@Joerivanrokeghem
Copy link

Thanks for fixing it, next time i will report of there is a problem.
We appreciate your work. Thanks!

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

No branches or pull requests

3 participants