Axis camera component

My preference is hassbian.

Yes. But if you upgrade to latest hass on top of hassbian you’d get rid of the dependency issues that the original Axis component had

Hi Robban

Can you tell me if im doing this right for an automation to switch a light on via VMD3? I can see in history the VMD as switched but nothing happens…

I want the light to turn on for 10min on detection, and stay on then turn off

alias: Yard Light Auto On Motion
trigger:
  - platform: state
    entity_id: binary_sensor.yardcam_vmd3_0
    to: 'on'
action:
  - service: switch.turn_on
    entity_id: switch.yard

alias: Turn off Yard Light 10min
trigger:
  - platform: state
    entity_id: binary_sensor.yardcam_vmd3_0
    to: 'off'
    for:
      minutes: 10
action:
  - service: switch.turn_off
    entity_id: switch.yard

Thanks

What part isn’t working? The on or off or both?

It was some time since I spent any work on doing automations at all, and yamls longer than that ;).

Cheers for reply.

I can see the vmd is getting triggered from off to on in the entities page. however nothing happens with my switch.yard (relay on ESP) - so i think none of it is the answer to the question :slight_smile:

Not sure whats going on as not done many automations myself, ive only jsut got round to migrarting from 0.38 to latest over the weekend

cheers

Hi Robban

Think i may have sorted it, although working on system away from home, so need to wait for motion.

Im on a clean hassbian install of latest 0.61.1 and i see these in the log continually, any thoughts? Two axis devices.

Both on latest firmwares
Axis M7001 Encoder ver 5.5something
Axis P3364 Static Dome - ver 6.something

Failed to parse headers (url=http://192.168.5.211:80/axis-cgi/mjpg/video.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
15:43 /srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py (WARNING)
Failed to parse headers (url=http://192.168.5.211:80/axis-cgi/mjpg/video.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
15:43 /srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py (WARNING)
Failed to parse headers (url=http://192.168.5.199:80/axis-cgi/mjpg/video.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
15:43 /srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py (WARNING)
Failed to parse headers (url=http://192.168.5.211:80/axis-cgi/mjpg/video.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
15:43 /srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py (WARNING)

Thanks

No that’s just a minor issue in the mjpeg client. It has nothing to do with the sensors

Hi @frank451 Did you fix the issue?

Hi

Yes. All sorted, however it hasn’t triggered all night tonight for some reason. Maybe need to check vmd 3 hasn’t crashed in the camera. As my yard light works of the switch and the automation is still active.

1 Like

I have successfully connected my axis camera which resides on the same domain as HA. However, if I include a host (holiday home) different from the HA domin address, I get NIL response. Is this a restriction or am I doing something wrong.

No such limitation by design. Would you mind enabling debug to get some more details about the communication to se what happens?

Apologies! Started reconfiguring again and it now seems to work perfectly well. Must have been a late night oversight. Again, apologies.

No worries, glad to hear the component being used :slight_smile:

I have three out of four Axis camera’s working using the axis component. I must confess those three are running firmware > 5.0. The fourth one is running firmware 4.49 and fails to be recognized. All units listen perfectly well to the mjpeg live stream command: http://host:port/axis-cgi/mjpg/video.cgi
Is the firmware version the bottleneck?

The component does a Vapix command to get the Mac address and there is a difference in the api between 4xx and 5xx.

I looked a bit into getting this to work but I had some troubles with debugging so I paused that work.

Right now I’m preparing the component to be a configuration entry and support more types of events

Hi @Robban,

I’m using Home Assistant 0.74.2.

How we can define in configuration.yaml more than one camera of the same model?
If I set axis 2:, to define second camera, I only get image from the first defined (axis:)

Thanks!

It needs to be without spaces I think

I’ve got a M1034-W running the latest firmware ( 5.51.5.1). I can’t get the camera to stream video through the Home Assistant dashboard. It works initially after a reboot, but then after a few frames, it will stop streaming. I’ll see the following error in the log:

2018-09-06 05:09:43 WARNING (Thread-5) [urllib3.connectionpool] Failed to parse headers (url=http://192.168.100.10:80/axis-cgi/mjpg/video.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ''
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 396, in _make_request
    assert_header_parsing(httplib_response.msg)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/response.py", line 66, in assert_header_parsing
    raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ''

I know that this is an issue in the MJPEG library in home assistant, but after that i don’t get any further images from the camera via the home assistant dashboard. Eventually it will say “(Image not avaliable)” above where the images were at before. The video.cgi works fine if I use a browser.

My config looks like:

axis:
  m1034w:
    host: 192.168.100.10
    username: !secrets axis_camera_user
    password: !secrets axis_camera_pass
    include:
      - camera
    trigger_time: 0
    location: Living Room

Any ideas why I keep losing video? Thanks!

If it works initially, it should keep on working. That warning is common and can safely be ignored.

logger:
  default: warn
  logs:
    urllib3.connectionpool: fatal

For your issue with video disappearing I have no idea. Have you looked at the cameras system log?

You can try using the mjpeg camera component directly and see if there is any difference for you.

So I think I figured out the issue. I kept noticed that the discovery would pop up from time to time on the Home Assistant dashboard with a 169.x.x.x address. This had me puzzled as the camera has a static IP (It always pulls the same IP from the router via DHCP). So I went digging around on the camera looking for this IP address.

Eventually I found an option under System Options -> Advanced -> Plain Config. Change the drop-down box to “network” and click “Select Group”. I found in the “Network Interface I0 ZeroConf” that it had the 169.x.x.x IP address that Home Assistant was detecting. I unchecked the box next to “Enabled” for this section and clicked “Save”.

Now I keep getting still images about every 15-25 seconds from the Axis Camera. Is this update interval normal?

Thanks!

1 Like