core: AXIS integration broken from last HA update
The problem
AXIS integration seems to be broken after updating to 2024.3.0. I have 4 cameras and they all stopped working
What version of Home Assistant Core has the issue?
core-2024.3.0
What was the last working version of Home Assistant Core?
core-2024.2
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
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.config_entries
Source: config_entries.py:504
First occurred: 6:43:21 PM (5 occurrences)
Last logged: 6:44:26 PM
Error setting up entry M1054 - 00408CB208XX for axis
Error setting up entry M1054 - 00408CB20XXX for axis
Error setting up entry M1034-W - ACCC8E201XXX for axis
Error setting up entry M1054 - 00408CB2XXXX for axis
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/axis/__init__.py", line 21, in async_setup_entry
api = await get_axis_device(hass, config_entry.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/axis/device.py", line 261, in get_axis_device
await device.vapix.initialize()
File "/usr/local/lib/python3.12/site-packages/axis/vapix/vapix.py", line 145, in initialize
await self.initialize_param_cgi(preload_data=False)
File "/usr/local/lib/python3.12/site-packages/axis/vapix/vapix.py", line 201, in initialize_param_cgi
await self.params.ptz_handler.update()
File "/usr/local/lib/python3.12/site-packages/axis/vapix/interfaces/api_handler.py", line 126, in update
obj_ids = await self._update()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/interfaces/parameters/param_handler.py", line 39, in _update
return await self.vapix.params.request_group(self.parameter_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/interfaces/parameters/param_cgi.py", line 52, in request_group
self.signal_subscribers(obj_id)
File "/usr/local/lib/python3.12/site-packages/axis/vapix/interfaces/api_handler.py", line 42, in signal_subscribers
callback(obj_id)
File "/usr/local/lib/python3.12/site-packages/axis/vapix/interfaces/parameters/param_handler.py", line 44, in _update_params_callback
self._items.update(self.parameter_item.decode_to_dict([data]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/models/parameters/param_cgi.py", line 92, in decode_to_dict
return {"0": cls.decode(data[0])}
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/models/parameters/ptz.py", line 396, in decode
limits=PtzLimit.from_dict(data["Limit"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/models/parameters/ptz.py", line 211, in from_dict
return {k[1:]: cls.decode(v) for k, v in data.items()}
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/axis/vapix/models/parameters/ptz.py", line 192, in decode
max_field_angle=data["MaxFieldAngle"],
~~~~^^^^^^^^^^^^^^^^^
KeyError: 'MaxFieldAngle'
Additional information
Logger: homeassistant.components.axis Source: components/axis/device.py:272 Integration: Axis (documentation, issues) First occurred: 6:43:28 PM (1 occurrences) Last logged: 6:43:28 PM
Error connecting to the Axis device at 192.168.1.34
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 3
- Comments: 32 (14 by maintainers)
Thanks! Fixed the issue
I am on the road. Will provide them this evening (CET).
and your work is appreciated!
@Kane610 great thank you. Cant wait! thanks again !
Cant wait! Will it be updated via HAs core ? Or will we need to manually install hotfix ? Really need this 4 cams to work properly, the onvif access to them seems to be very slow compared to the API, the snapshot takes about 10-15 seconds to take, which is way past what Im using this for.
Great to hear that some devices also works 😃
Thanks @DevTodd , fixed in library and updated PR on HASS
Thanks!
Yes, I get that response. However, I share that part from the logs.
@Kane610 Sorry, just noticed that!
2024-03-07 16:53:57.174 DEBUG (MainThread) [axis.vapix.vapix] Response (from <MY-IP>/axis-cgi/lightcontrol.cgi): b'{"apiVersion": "1.1", "context": "Axis library", "method": "getLightInformation", "data": {"items": [{"lightID": "led0", "lightType": "IR", "enabled": true, "synchronizeDayNightMode": true, "lightState": true, "automaticIntensityMode": false, "automaticAngleOfIlluminationMode": false, "nrOfLEDs": 2, "error": false, "errorInfo": ""}]}}\r\n' 2024-03-07 16:53:57.180 DEBUG (MainThread) [axis.vapix.vapix] Response (from <MY-IP> /axis-cgi/io/portmanagement.cgi): b'{\n "apiVersion": "1.0",\n "context": "Axis library",\n "method": "getPorts",\n "data": {\n "numberOfPorts": 0\n }\n}' 2024-03-07 16:53:57.181 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Garage for axissame issues, ended up restoring a backup.
@DirkMu perfect
@yozh i will put it up and get it integrated with the next core release
Hi again,
After you fixed https://github.com/home-assistant/core/issues/112421 on Monday, I also still cannot get the integration set up. Now the missing key that’s reported is
KeyError: 'NbrOfCameras'.Here’s the debug log: