Axis VMD 4 and more

And it keeps working after a restart of hass?

Those logs didn’t say much unfortunately. I will review the debug prints on a component level to help investigate this kind of issues

I haven’t checked it as I reversed to the previous config, since the manual addition assigned a different name to the camera and my existing panels didn’t display it correctly (it’s my live installation and need them to work).

Ok, and it stops working again when you revert it?

That’s correct.

Can you compare the entry between import and when you create it from the frontend?

This is the import:

{
            "connection_class": "local_push",
            "data": {
                "device": {
                    "host": "192.168.20.201",
                    "password": "***",
                    "port": 80,
                    "username": "hass"
                },
                "mac": "ACCC8E584851",
                "model": "P3364-L",
                "name": "rampa"
            },
            "domain": "axis",
            "entry_id": "3b2ebf1e2b4d4361aa4399721feb6881",
            "options": {
                "camera": true,
                "events": true,
                "trigger_time": 0
            },
            "source": "import",
            "title": "P3364-L - ACCC8E584851",
            "version": 1
        },

And this is the manual addition:

{
            "connection_class": "local_push",
            "data": {
                "device": {
                    "host": "192.168.20.201",
                    "password": "***",
                    "port": 80,
                    "username": "hass"
                },
                "mac": "ACCC8E584851",
                "model": "P3364-L",
                "name": "P3364-L 0"
            },
            "domain": "axis",
            "entry_id": "3031016306e040f78e5bace1e6778c11",
            "options": {
                "camera": true,
                "events": true,
                "trigger_time": 0
            },
            "source": "user",
            "title": "P3364-L - ACCC8E584851",
            "version": 1
        }

So only the name differs. I will go through the code and all places the name is involved if Ive made any bad logic

Dear Robban, first of all - thank you for the great job and contribution! I love your work on VMD4 and appreciate the effort you put into it, you have another fan!

If I may, I have a couple of Axis cameras, all new and latest firmware, but only one displays the VMD4 option/component, any idea why the others don’t?

Thank you so much!

There seems to be some issues for some people with the rewrite of the component.

Where your devices imported from configuration.yaml or how did you set them up?

Could you share your devices config entries from .storage/core.config_entries? Don’t forget to redact your passwords.

You can also enable debug logs for hass and share logs

Thanks for your prompt reply!
yes, I left the configuration yaml as it was in the last year, then I tried to set up the cameras with this new UI thingy, but only one of them shows the VMD4 options, whereas the others don’t. I’ll look for those entries to share with you, but if you see a problem with the steps I’ve just explained - please let me know - maybe I set it up wrongly?
cheers!

Since I don’t know what the current issue is it is hard to say… Trying to collect more data from users to identify the reason

I’ve created a PR that will hopefully solve the problem where entities aren’t created.

https://github.com/home-assistant/home-assistant/pull/23119

If anyone wants to try it out, please do so!

The first beta for 0.92 is building right now. Feel free to try it out and give feedback if it solves your problems

Many thanks dear Robban, I’ve been loaded this week so didn’t have time to share logs etc, however I can happily tell that RC 0.92 resolves the problem of the missing VMD4 of other cameras!

However, another problem (which I forgot to mention before) still remains: the VMD4 functionality seems to work only for a day or so, then it stops :frowning: however the cameras keep generating them (I know this because recording on motion does work). Any idea why?

Great to hear that the issue with many devices sensors are solved!

Regarding your issue of sensors in hass stopping, I think it might could possibly be a timing issue. Would you be so kind as to try increasing timeout for RTSP. If you go into plain config of your device and select network and then under Network RTSP change Timeout to something a bit higher than 60, like 360 and try that out.

Thanks again for your prompt reply!
Thing is, I’m running HA on Docker/Synology, not on HASS. Any idea? cheers

The RTSP timeout is a configuration on the camera and not in hass. HASS and HA is the same thing :slight_smile:

@jiiins please try out Has 0.92, hopefully the issues with events are fixed :crossed_fingers:

Starting with 0.92, all my Axis cameras stopped working. Anybody has an idea what’s going on here? I already tried to remove them and configure them again, but this doesn’t change anything…

2019-04-26 18:05:48 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 115, in handle
result = await result
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py", line 154, in post
return await super().post(request, flow_id)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py", line 46, in wrapper
result = await method(view, request, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py", line 86, in post
result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 80, in async_configure
flow, step_id, user_input)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 98, in _async_handle_step
result = await getattr(flow, method)(user_input)  # type: Dict
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/axis/config_flow.py", line 79, in async_step_user
device = await get_device(self.hass, self.device_config)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/axis/device.py", line 194, in get_device
device.vapix.params.update_properties)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/axis/param_cgi.py", line 61, in update_properties
self.update(path=URL_GET_GROUP.format(group=PROPERTIES))
  File "/usr/local/lib/python3.7/site-packages/axis/api.py", line 22, in update
self.process_raw(raw)
  File "/usr/local/lib/python3.7/site-packages/axis/param_cgi.py", line 119, in process_raw
raw_params = dict(group.split('=', 1) for group in raw.splitlines())
ValueError: dictionary update sequence element #34 has length 1; 2 is required

There is a property that doesn’t seem to have an end value. Can you enable debug and print the parameters?