Netatmo Presence Human, pushover with url

Hi again,
trying to figure this out but not much seems to be right.

When a human is detected by the camera, I want it to send me a pushover alarm with an image of the event. Anyone got the time to help me?

Thanks in advance.

- id: baksidetest
  alias: Folk på baksidan
  trigger:
  - platform: event
    event_type: netatmo_event
    event_data: human
  condition: []
  action:
  - service: notify.pushover
    data_template: 
     title: 'OBS'
     message: 'Person på baksidan upptäckt'
     data:
       file:
        url: '{{ trigger.event.data.vignette_url }}'
       priority: 2
       retry: 30
       expire: 3600
  mode: single
´´´

Tried some more but still no luck. What am I failing?

  - id: baksidetest
  alias: Folk på baksidan
  trigger:
  - event_type: netatmo_event
    platform: event
    event_data:
      type: human
  condition:
  - condition: template
    value_template: '{{ trigger.event.data[''data''][''type''] == ''vignette_url''
      }}'
  action:
  - data_template:
      message: '{{ trigger.event.data["data"]["vignette_url"] }} at {{ trigger.event.data["data"]["home_name"]
        }}'
      title: Netatmo event
  - data_template:
      data:
        file:
          url: '{{ trigger.event.data.vignette_url }}'
        priority: 2
        retry: 30
        expire: 3600
        sound: bike
      message: Folk på baksidan
      title: Övervakning baksida
    service: notify.pushover
  mode: single

What exactly isn’t working? Does the event get triggered at all? Have you tried listening for them using the developer tools?

Hi cgtobi. Yes the camera works fine and when i listen I get everything in from the camera to home assistant. It’s the automaion i cant get working. The part with pushover works, I tested it separetly in developer tools with a test message so I know that function is working. Its the function to get the vignette url in the message I cant get working.
What I am trying to do is when a person is detected outside (and I want to add some more conditions too but thats a later problem, like when im not home and certain times) I want an alarm notificationto pushover with an url to the picture of the event. That should be possible right?

Hi Mikki,

Can this help:

- id: persoon_op_oprit
  alias: "Person detected at home"
  description:  'Belgeluid en URL bij persoon op oprit'
  trigger:
    - event_type: netatmo_event
      platform: event
      event_data:
        type: human # other possible types: animal, vehicle
  action:
    - data:
        data:
          priority: 0
          sound: echo
        message: >
          {{ trigger.event.data["data"]["message"] }}
          te {{ trigger.event.data["data"]["home_name"] }} 
          url {{ trigger.event.data["data"]["snapshot_url"] }}
          om {{now().strftime("%X op %d %m %Y")}}
        title: Netatmo event
      service: notify.notify_pushover

Result: a puschoveralarm (sound and url ) on my iPhone when someone is detected by the camera.

1 Like

Thanks! Will try right away when i get my cameras working again,
aftert an update they suddenly wouldnt load and i get this:

Logger: homeassistant.components.camera
Source: components/netatmo/data_handler.py:129
Integration: Camera (documentation, issues)
First occurred: April 13, 2021, 8:02:24 PM (1 occurrences)
Last logged: April 13, 2021, 8:02:24 PM

Error while setting up netatmo platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/camera.py", line 53, in async_setup_entry
    await data_handler.register_data_class(
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 166, in register_data_class
    await self.async_fetch_data(
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 129, in async_fetch_data
    self.data[data_class_entry] = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/pyatmo/camera.py", line 91, in __init__
    self.update_camera_urls(camera_id)
  File "/usr/local/lib/python3.8/site-packages/pyatmo/camera.py", line 164, in update_camera_urls
    temp_local_url = check_url(vpn_url)
  File "/usr/local/lib/python3.8/site-packages/pyatmo/camera.py", line 154, in check_url
    resp = self.auth.post_request(url=f"{url}/command/ping")
  File "/usr/local/lib/python3.8/site-packages/pyatmo/auth.py", line 172, in post_request
    f"{resp.status_code} - "
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thank you so much! This fixed it :slight_smile: Just changed the priority to 2. This is perfect!

Hi Mikki can you please share your end result. I am trying to set up the same thing, hust without template sensors.