core: Axis integration broken
The problem
I’ve been using the Axis integration for two months. After a reboot a few days ago the integration no longer connects to the camera. I get a “failed to connect” error on the flow setup page. I’ve tried deleting the integration and rebuilding. I’m not sure if this a bug, or just an error on my system. I have included a copy of the debug log for the axis integration.
The camera is Axis M3027 running firmware 6.50.5.3. I’m running the official HassOS on a NUC.
The only other integrations/addons that I’m running are:
- Life360
- Mobile App
- Meteoroligisk
- Z-Wave JS (just the integration, not the add-on)
- Z-Wave JS to MQTT
- FTP
- SSH & Web Terminal
- chrony
- File editor
- Samba share
What is version of Home Assistant Core has the issue?
core-2021.2.3
What was the last working version of Home Assistant Core?
core-2021.1.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Axis
Link to integration documentation on our website
https://www.home-assistant.io/integrations/axis/
Example YAML snippet
# Put your YAML below this line
Anything in the logs that might be useful for us?
# Put your logs below this line
2021-02-20 07:29:40 DEBUG (MainThread) [axis.api] {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://192.168.0.21:80/axis-cgi/apidiscovery.cgi
For more information check: https://httpstatuses.com/404
2021-02-20 07:29:40 DEBUG (MainThread) [axis.api] ''
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.PTZ {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2021-02-20 07:29:40 DEBUG (MainThread) [axis.vapix] http://192.168.0.21:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2021-02-20 07:29:43 DEBUG (MainThread) [axis.vapix] Response: root.StreamProfile.MaxGroups=26
root.StreamProfile.S0.Description=
root.StreamProfile.S0.Name=1
root.StreamProfile.S0.Parameters=resolution=2592x1944&compression=30&mirror=0&textsize=medium&textcolor=white&textbackgroundcolor=black&textposition=top&text=0&clock=1&date=1&fps=0&maxframesize=0&videocodec=jpeg
from 192.168.0.21
2021-02-20 07:29:44 DEBUG (MainThread) [axis.vapix] Response: root.Brand.Brand=AXIS
root.Brand.ProdFullName=AXIS M3027 Network Camera
root.Brand.ProdNbr=M3027
root.Brand.ProdShortName=AXIS M3027
root.Brand.ProdType=Network Camera
root.Brand.ProdVariant=
root.Brand.WebURL=http://www.axis.com/
from 192.168.0.21
2021-02-20 07:29:45 DEBUG (MainThread) [axis.vapix] Response: root.Output.NbrOfOutputs=1
from 192.168.0.21
2021-02-20 07:29:45 DEBUG (MainThread) [axis.vapix] Response: root.Input.NbrOfInputs=1
from 192.168.0.21
2021-02-20 07:29:45 DEBUG (MainThread) [axis.vapix] Response: root.IOPort.I0.Configurable=no
root.IOPort.I0.Direction=input
root.IOPort.I0.Input.Name=Input 1
root.IOPort.I0.Input.Trig=closed
root.IOPort.I1.Configurable=no
root.IOPort.I1.Direction=output
root.IOPort.I1.Output.Active=closed
root.IOPort.I1.Output.Button=none
root.IOPort.I1.Output.DelayTime=0
root.IOPort.I1.Output.Mode=bistable
root.IOPort.I1.Output.Name=Output 1
root.IOPort.I1.Output.PulseTime=0
from 192.168.0.21
2021-02-20 07:29:46 DEBUG (MainThread) [axis.vapix]
2021-02-20 07:29:46 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 192.168.0.21
2021-02-20 07:29:46 DEBUG (MainThread) [axis.vapix]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 54 (20 by maintainers)
Glad you guys are able to duplicate the issue. I don’t think it’s a problem with my PC. I’m running an I3-6100. CPU load is 6%. Memory load is 9%. Plenty of hard drive space.
Indeed that actually did trigger it, great! Now I can delve into it 😃
After it failed I removed the Video motion detection v3 app and I could add it
PR is up, thank you for your excellent support ❤️
Please verify the beta
So I’m progressing, there is a lower level time out hitting which seems to be the cause. It is only 5 seconds so I will increase that to 15 seconds
I turned off VMD and HASS immediately connected.
Did a test on 2021.1.0 and 2021.1.5, I was able to add the AXIS M3027 camera with the integration. It works! This is the log:
I don’t have time this evening to test all versions from this to the actual, but I can do it in the next days. If you have some that may be cooler to test first, please advise, to optimize the test 😃
@Kane610 on my network, only older devices with firmware 6.50 are not working… All the others are doing great.
I cannot speak for 2021.1 because I don’t have it anywhere, but for sure in 0.114.4 all cameras are still working correctly.
I could try to downgrade my 2021.3 to 2021.1 and see if something changes, if it’s useful!
That API discovery is not available is an expected situation and 404 errors are handled appropriately https://github.com/Kane610/axis/blob/f8d17078b9b2ac6f49f2a5713586c84657557775/axis/vapix.py#L127
Is it only older devices running firmwares ~6.50 and older that are misbehaving?
There was a major refactoring of the Axis library introduced with 2021.2, I did test a lot but of course something could have been missed. So if you don’t see any issues in 2021.1 but do in 2021.2, we have something to go on
That there are empty lines after [axis.vapix] indicates something is indeed wrong.
Could you try using the library directly to see if you get any additional information would be helpful, I will try some more out this evening at home.
python3 -m axis 192.168.0.90 root pass --params -D