코딩정보


● HA작업) 재택/외출 중 동작 감지(카메라) 활성화/비활성화


  • 링크


  • 컨텐츠 정보


    본문

    ● HA작업) 재택/외출 중 동작 감지(카메라) 활성화/비활성화
    https://community.home-assistant.io/t/enable-disable-motion-detection-camera-when-home-away-not-working/281575
    안녕하세요,
    홈어시스턴트에서 시험해 보기 위해 Amcrest 카메라를 구입했는데 지금까지 작동시키고 스크립트를 사용하여 모션 감지를 활성화/비활성화할 수 있었습니다.
    저는 자정 오전 12시 및/또는 모두가 집에 없는 낮 시간에 카메라의 동작 감지를 자동화하고 활성화하고 싶었습니다.
    나는 그 state from: home to: not home 반대의 경우도 테스트했지만 활성화/비활성화를 위한 모션 감지를 자동화하지 않았습니다.
    누구든지 내가 어느 부분을 잘못했는지 확인하고 어떻게 고칠 수 있습니까?
    내가 기본적으로 하고 싶은 일은:
    모션 감지 켜기:
    오전 12시부터 오전 6시까지
    모두가 떨어져 있습니다.
    모션 감지 꺼짐:
    낮에는
    모두 / 누군가 집에 있어요.
    내 현재 코드는 다음과 같습니다.
    오토메이션:
    #=============================
    #Camera - Night Mode
    - alias: Camera - Night Mode
      trigger:
      - platform: time
        at: '00:00:00'
      action:
      - service: script.camera_motion_detection_on_script
    #Camera Motion Detection - Day Mode
    - alias: Camera Motion Detection - Day Mode
      trigger:
      - platform: state
        entity_id: group.family
        from: not home
        to: home
      condition: '{{ now().hour >= 6 and now().hour <= 23 }}'
      action:
      - service: script.camera_motion_detection_off_script
    #Camera Motion Detection - Away Mode
    - alias: Camera Motion Detection - Away Mode
      trigger:
      - platform: state
        entity_id: group.family
        from: home
        to: not home
      condition: '{{ now().hour >= 6 and now().hour <= 23 }}'
      action:
      - service: script.camera_motion_detection_on_script
    스크립트:
    #Camera
    #Night Mode
    camera_motion_detection_on_script:
      alias: Camera Motion Detection - On Script
      sequence:
      - service: camera.enable_motion_detection
        entity_id: camera.living_room_camera
    #Day Mode
    camera_motion_detection_off_script:
      alias: Camera Motion Detection - Off Script
      sequence:
      - service: camera.disable_motion_detection
        entity_id: camera.living_room_camera
    #==================================
    감사해요.
    It’s not_home with an underscore between home and not. You can see the correct state under Developer Tools -> States.

    =============
    모션감지 자동화
    조건: motioneye 애드온  설정 조건
    카메라 :amcrest  시놀로지 연결 사용중
    작동방법 : haos에서  camera 1 모션감지  카메라 사진찍고 텔레그램으로 사진보내고 구글 nest-hub 에 카메라 보기
    ============================
    3232235521_1693142221.7348.png

    yaml로 편집하기 복사 파일 입니다

    ======================

    alias: 1_camera_motion
    description: |-
      현관카메라 _텔레그램_이미지전송 스크림트에 작업 설정 되어야 하며 
      (잘됨)텔레그램 은 confuguation.yaml 파일에 구성 조건
      (잘안됨) 카카오는 http://ha.11q.duckdns.org/api/kakao_talk  동작중이어야 합니다
    trigger:
      - platform: device
        type: turned_on
        device_id: 3d4455f64d39c32b5508df707923eb31
        entity_id: c18142a8ca57b44cc95613277e18e0da
        domain: switch
    condition: []
    action:
      - wait_for_trigger: []
        timeout:
          hours: 0
          minutes: 0
          seconds: 2
          milliseconds: 0
      - service: media_player.play_media
        target:
          entity_id: media_player.nest_hub_seojae
        data:
          media_content_id: media-source://camera/camera.amcrest_camera_amcrest_camera
          media_content_type: application/vnd.apple.mpegurl
        metadata:
          ttl: 0
          priority: high
          title: AMCREST_Camera
          thumbnail: /api/camera_proxy/camera.amcrest_camera_amcrest_camera
          media_class: video
          children_media_class: null
          navigateIds:
            - {}
            - media_content_type: app
              media_content_id: media-source://camera
      - service: camera.snapshot
        data:
          filename: /config/www/snapshot/main_entrance.jpg
        target:
          entity_id: camera.amcrest_camera_amcrest_camera
      - service: notify.telegram
        data:
          message: snap_tele_현관에 움직임이 감지되었습니다
          title: snap_tele_현관에 움직임이 감지되었습니다
          data:
            photo:
              - url: https://ha.11q.duckdns.org/local/snapshot/main_entrance.jpg
    mode: single
    ====================

    ☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠1.png
    뷰PDF add1,add2



    관련자료

    댓글 0
    등록된 댓글이 없습니다.



    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-05-16 08:15:02

    오늘의 홈 현황


    • 현재 접속자♨ 81 명
    • 오늘 가입자※ 1 명
    • 어제 가입자※ 4 명
    • 주간 가입자※ 11 명
    • 오늘 방문자 1,186 명
    • 어제 방문자 1,597 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,325,516 명
    • 전체 게시물※ 8,570 개
    • 전체 댓글수※ 24,612 개
    • 전체 회원수 10,968 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑