I can get responses after authenticating via the web interface and then using Talend so I must be doing something wrong when authenticating. Any ideas? I’m almost there!
Ok, if you reboot HA and take a look at the log, I think you should find some errors about sensor.axhubsys during startup… What are those errors reporting?
Hello everyone,
I own the same alarm and I receive the following error in the log:
TemplateError(‘UndefinedError: None has no element 0’) while processing template ‘Template("{{ state_attr(“sensor.axhubsys”, “SubSysList”)[0][“SubSys”][“arming”] }}")’ for attribute ‘_attr_native_value’ in entity ‘sensor.axhubpanel’
Logger: homeassistant.components.template.template_entity
Source: components/template/template_entity.py:73
Integration: Template (documentation, issues)
First occurred: 11:13:41 (4 occurrences)
Last logged: 11:13:41
TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr('sensor.axhubsys', 'SubSysList')[0]['SubSys']['arming'] }}")' for attribute '_attr_native_value' in entity 'sensor.axhubpanel'
TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr('sensor.axhubsys', 'SubSysList')[0]['SubSys']['arming'] }}")' for attribute 'arming' in entity 'sensor.axhubpanel'
TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr('sensor.axhubsys', 'SubSysList')[0]['SubSys']['id'] }}")' for attribute 'id' in entity 'sensor.axhubpanel'
TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr('sensor.axhubsys', 'SubSysList')[0]['SubSys']['alarm'] }}")' for attribute 'alarm' in entity 'sensor.axhubpanel'
Where is script.ax_arm_stay and others.
Is it work if we use the switch entity on the service ?.
Please provide the script section too.
I am beginner. apology for the silly questions.
Looks like it doesn’t work the same way for AX PRO systems, too bad! But still thanks for the info. I think Emmet has some key information because he states “It works differently to the older axhub in that it needs more than just digest auth” but no more responses from him… @emmetdel care to join in again?
As other state, we tried your sensor code but when using developer tools and read the status of the sensor, we only get “friendly_name: axhubsys” and nothing more. In the logs we get:
Logger: homeassistant.components.template.template_entity
Source: components/template/template_entity.py:140
Integration: Template ([documentation](https://www.home-assistant.io/integrations/template), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+template%22))
First occurred: 08:54:15 (4 occurrences)
Last logged: 08:54:15
* TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr("sensor.axhubsys", "SubSysList")[0]["SubSys"]["arming"] }}")' for attribute '_attr_native_value' in entity 'sensor.axhubpanel'
* TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr("sensor.axhubsys", "SubSysList")[0]["SubSys"]["arming"] }}")' for attribute 'arming' in entity 'sensor.axhubpanel'
* TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr("sensor.axhubsys", "SubSysList")[0]["SubSys"]["id"] }}")' for attribute 'id' in entity 'sensor.axhubpanel'
* TemplateError('UndefinedError: None has no element 0') while processing template 'Template("{{ state_attr("sensor.axhubsys", "SubSysList")[0]["SubSys"]["alarm"] }}")' for attribute 'alarm' in entity 'sensor.axhubpanel'
EDIT:
I changed the code by removing the “value_template” attribute, this way I can see what goes wrong:
if i log in to the axpro in my webbrowser and then test the sensor in developer it works but without login in i get 401 error. so it seems lite its the auth metod digest or basic that dont work, in hikvision kameras you kan change the auth metod but not in the alarm… so i think thats the problem but i cant find out what.
btw the axpro block the ip on my HA even if its the right user and password.
It certainly has to do something with the authentication method but in the ISAPI manuals from Hikvision there is nothing about AX PRO, they aren’t updated yet, so no idea what needs to be changed to make ISAPI calls work without first authenticating in the browser.