• 1 Post
  • 37 Comments
Joined 10 months ago
cake
Cake day: August 14th, 2025

help-circle



  • This might be a little overkill, but Home Assistant can do this.

    1. Add the calendar to Home Assistant. You don’t have to manage it there, but it’ll have access.
    2. Under Settings - > Devices & services -> Helpers add a helper of the type History Stats.
    3. For the Entity, select the calendar you want to track, and the Type would be Time.
    4. Next it’ll ask you which State to track. Depending on the specifics, you’ll probably want to track if the calendar is On, meaning there’s something on the calendar. You can track multiple States, but you probably only need On.
    5. On the last page of the wizard you’ll put start and end times. If you want to track from Midnight until Now, here’s what it would look like:

    Start: {{ now().replace(hour=0, minute=0, second=0) }}
    End: {{ now() }}

    You can probably adjust the end time to 23:59 if you want to see what’s in store for the day looking ahead, but I haven’t tried it.






  • You didn’t ask me, but as someone who has fiddled with these things my favorite sensor is the BME680, specifically the board that Adafruit sells. It costs more than other sensors, but that’s because it’s the best. It also does temperature, atmospheric pressure, and measures VOC. I think you can even use it to detect when someone takes a poo, but I haven’t tried.

    I connect mine to LOLIN D1 Minies running Tasmota.



  • I don’t have an external GPU either, just the onboard Intel graphics is what I use now. Also worth mentioning to use integrated graphics your Docker Compose needs:

    devices:
          - /dev/dri/renderD128:/dev/dri/renderD128
    

    I’m not using substreams. I have 2 cameras and the motion detection doesn’t stress the CPU too much. If I add more cameras I’d consider using substreams for motion detection to reduce the load.

    Your still frames in Home Assistant are the exact problem I was having. If your cameras really do need go2rtc to reduce connections (my wifi camera doesn’t seem to care), you might try changing your Docker container to network_mode: host and see if that fixes it.

    Here’s my config. Most of the notations were put there by Frigate and I’ve de-identified everything. Notice at the bottom go2rtc is all commented out, so if I want to add it back in I can just remove the #s. Hope it helps.

    config.yaml
    mqtt:
      enabled: true
      host: <ip of Home Assistant>
      port: 1883
      topic_prefix: frigate
      client_id: frigate
      user: mqtt username
      password: mqtt password
      stats_interval: 60
      qos: 0
    
    cameras:     # No cameras defined, UI wizard should be used
      baby_cam:
        enabled: true
        friendly_name: Baby Cam
        ffmpeg:
          inputs:
            - path: 
                rtsp://user:pw@<ip-addr>:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
              roles:
                - detect
                - record
          hwaccel_args: preset-vaapi
        detect:
          enabled: true # <---- disable detection until you have a working camera feed
          width: 1920 # <---- update for your camera's resolution
          height: 1080 # <---- update for your camera's resolution
        record:
          enabled: true
          continuous:
            days: 150
          sync_recordings: true
          alerts:
            retain:
              days: 150
              mode: all
          detections:
            retain:
              days: 150
              mode: all
        snapshots:
          enabled: true
        motion:
          mask: 0.691,0.015,0.693,0.089,0.965,0.093,0.962,0.019
          threshold: 14
          contour_area: 20
          improve_contrast: true
        objects:
          track:
            - person
            - cat
            - dog
            - toothbrush
            - train
    
      front_cam:
        enabled: true
        friendly_name: Front Cam
        ffmpeg:
          inputs:
            - path: 
                rtsp://user:pw@<ip-addr>:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
              roles:
                - detect
                - record
          hwaccel_args: preset-vaapi
        detect:
          enabled: true # <---- disable detection until you have a working camera feed
          width: 2688 # <---- update for your camera's resolution
          height: 1512 # <---- update for your camera's resolution
        record:
          enabled: true
          continuous:
            days: 150
          sync_recordings: true
          alerts:
            retain:
              days: 150
              mode: all
          detections:
            retain:
              days: 150
              mode: all
        snapshots:
          enabled: true
        motion:
          mask:
            - 0.765,0.003,0.765,0.047,0.996,0.048,0.992,0.002
            - 0.627,0.998,0.619,0.853,0.649,0.763,0.713,0.69,0.767,0.676,0.819,0.707,0.839,0.766,0.869,0.825,0.889,0.87,0.89,0.956,0.882,1
            - 0.29,0,0.305,0.252,0.786,0.379,1,0.496,0.962,0.237,0.925,0.114,0.879,0
            - 0,0,0,0.33,0.295,0.259,0.289,0
          threshold: 30
          contour_area: 10
          improve_contrast: true
        objects:
          track:
            - person
            - cat
            - dog
            - car
            - bicycle
            - motorcycle
            - airplane
            - boat
            - bird
            - horse
            - sheep
            - cow
            - elephant
            - bear
            - zebra
            - giraffe
            - skis
            - sports ball
            - kite
            - baseball bat
            - skateboard
            - surfboard
            - tennis racket
          filters:
            car:
              mask:
                - 0.308,0.254,0.516,0.363,0.69,0.445,0.769,0.522,0.903,0.614,1,0.507,1,0,0.294,0.003
                - 0,0.381,0.29,0.377,0.284,0,0,0
        zones:
          Main_Zone:
            coordinates: 0,0,0,1,1,1,1,0
            loitering_time: 0
    
    detectors: # <---- add detectors
      ov:
        type: openvino
        device: GPU
    
    model:
      model_type: yolo-generic
      width: 320 # <--- should match the imgsize set during model export
      height: 320 # <--- should match the imgsize set during model export
      input_tensor: nchw
      input_dtype: float
      path: /config/model_cache/yolov9-t-320.onnx
      labelmap_path: /labelmap/coco-80.txt
    
    version: 0.17-0
    
    
    #go2rtc:
    #  streams:
    #    front_cam:
    #      - ffmpeg:rtsp://user:pw@<ip-addr>:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    #    baby_cam:
    #      - ffmpeg:rtsp://user:pw@<ip-addr>:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    





  • You seem a bit more network savvy than me. All I could figure is the Frigate integration (also HACS for me) talks to Frigate and asks it where to get the video from. If go2rtc is enabled in Frigate, the integration tries to stream from go2rtc. Without my Docker stack being in host network mode, it wouldn’t work for me.

    With no go2rtc, the Frigate integration asks Frigate where to get the stream, and it’s told to get it from the camera from what I can tell.

    All just guesses on my end. Hopefully I don’t sound too sure of myself because I’m not really sure.