Hello! Some info about me is up on my website: https://wreckedcarzz.com/

  • 0 Posts
  • 1K Comments
Joined 3 years ago
cake
Cake day: August 23rd, 2023

help-circle

  • This was taught by a family member police officer that did accident reconstruction, and it was reinforced when I was taking drivers ed in high school. The general population doesn’t know and doesn’t get tested on following distance, at least not when I was tested. But here (big big capital city) 2 is typical, and anything over 4 makes people cut your off a lot. Our rush hour starts around 2 and ends around 8, the population vs the road infrastructure is just way too much, has been for like 20 years.

    I was responding to a collision that happened in front of me, as a first responder (cpr + first aid certified, at the time). A Rav4 slammed into an older (90s) Corolla at highway+ speeds (traffic was moving about 70-75 mph immediately before). The corolla braked for traffic, and the rav4 did not. I’m directing people to call 911, trying to get the driver out of the corolla (it was a hard hit, the backseat was partially crushed, the trunk was non-existent, driver door jammed because frame buckling), the driver of the rav4 wasn’t wearing a seatbelt and slammed into the windshield, so blood all over it, the car, his head. While I’m trying to offer medical aid, people are slowly down to look - this was about 11 at night, still fairly busy highway - and again someone not watching, braked, swerved, tried to split between two cars in the center-most lanes (high occupancy vehicle lane, and ‘high speed’ lane). The sound of metal from all 3 was so loud, and I got to watch it, less than 30 feet from me. None of the cars involved in that collision stopped. But the car that tried to split must have been going at a difference of ~30mph above the cars slowing down. About 45 seconds later, police arrived, limited the lanes and slowed traffic properly (I only had my warning triangle with me, vs 3 lanes were effectively blocked with cars and debris. But during the busy times, you can see multiple crashes one right after the other because traffic density just multiplies the risk.

    Just a mix of inattentiveness + speed/not enough time to react has been several crashes I was witness/first responder to.














  • Midnight Wolf@lemmy.worldtoMildly Infuriating@lemmy.world•I need a new alarm app.
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    22 days ago

    This is likely way overkill for your needs, but I have Home Assistant control my phone’s alarms, based on my various calendars that I sync using CalDav through DAVx5. HA will adjust the wake-up buffer based on what calendar the event is - so if yesterday I had an in-person appointment at 10am, and the buffer was 2.5h, but tomorrow’s event is remote, I don’t need to wake up as early, and so it adjusts the buffer because of it. This is set in the automation.

    Main automation
    alias: wreckedcarzz - Auto-Set Phone Alarm from CalDAV
    description: ''
    triggers:
      - trigger: calendar
        event: start
        offset: '-8:0:0'
        entity_id: calendar.appointments
        id: in_person
      - trigger: calendar
        event: start
        offset: '-8:0:0'
        entity_id: calendar.appointments_remote
        id: remote
      - trigger: calendar
        event: start
        offset: '-8:0:0'
        entity_id: calendar.trips_and_vacations
        id: trips
        enabled: false
      - trigger: calendar
        event: start
        offset: '-8:0:0'
        entity_id: calendar.work_schedule
        id: work
    conditions:
      - condition: template
        value_template: '{{ trigger.calendar_event.all_day == false }}'
        alias: Make sure the event is not for the whole day
      - alias: Last triggered at least 12 hours ago
        condition: template
        value_template: >-
          {{ this.attributes.last_triggered == None or (now() -
          this.attributes.last_triggered) > timedelta(hours=12) }}
    actions:
      - variables:
          new_buffer: >-
            {% set current = states('input_number.alarm_wake_up_time_buffer') |
            float(0) %}
    
            {% if trigger.id == 'in_person' %}
              {{ current if 2.5 <= current <= 3.5 else 3 }}
            {% elif trigger.id == 'remote' %}
              {{ current if 0.5 <= current <= 2.0 else 1 }}
            {% elif trigger.id == 'work' %}
              {{ current if 1.5 <= current <= 2.5 else 2 }}
            {% elif trigger.id == 'trips' %}
              {{ current if 1.0 <= current <= 2.0 else 1.5 }}
            {% else %}
              {{ current if 1.5 <= current <= 3.5 else 2.5 }}
            {% endif %}
          alarm_hour: >-
            {{ ((as_datetime(trigger.calendar_event.start) | as_local) -
            timedelta(hours=new_buffer | float)).hour }}
          alarm_min: >-
            {{ ((as_datetime(trigger.calendar_event.start) | as_local) -
            timedelta(hours=new_buffer | float)).minute }}
          event_title: >-
            {{ trigger.calendar_event.summary | replace(',', '') | replace(':', '')
            }}
      - alias: Update the dashboard slider
        action: input_number.set_value
        target:
          entity_id: input_number.alarm_wake_up_time_buffer
        data:
          value: '{{ new_buffer | float }}'
      - alias: Send the alarm command
        action: notify.mobile_app_wreckedcarzz_phone
        data:
          message: command_activity
          data:
            ttl: 0
            priority: high
            intent_action: android.intent.action.SET_ALARM
            intent_extras: >-
              android.intent.extra.alarm.HOUR:{{ alarm_hour
              }},android.intent.extra.alarm.MINUTES:{{ alarm_min
              }},android.intent.extra.alarm.MESSAGE:{{ event_title
              }},android.intent.extra.alarm.SKIP_UI:true
    

    Then I created the necessary helper (input_number.alarm_wake_up_time_buffer) for how early to set the alarm at runtime. Integrate CalDav of course, syncing your calendars to HA, and adjust the automation script as needed. Make sure HA can run in the background/is not limited by battery optimization. And this all requires the HA companion app, obviously.

    Boom, with all that in-place, I just set my events into my calendar, they sync, HA triggers a couple hours before I need to wake up, it sets the alarm, and I get woken up at the planned time.

    I use the Google clock, so no promises for any other system, but I’ve been using this for 6+ months and it’s been great. It does add a point of failure (server/HA freezes; internet outage when the automation triggers) but it hasn’t happened yet, just hypotheticals.