20 comments

  • rlue 1 day ago
    Like all the other commenters here, I also devised my own solution—but AFAICT, it's the only other solution that's automated!

    Requirements:

      * macOS
      * Zoom
      * Home Assistant
      * A signal light/sign on a smart switch (like [0])
    
    The Procedure:

    First, create a script that checks whether you're currently on a Zoom call, and then turns your signal light on or off accordingly. Remember to chmod +x!

      #!/bin/sh
    
      if [ $(lsof -i 4UDP | grep zoom 2>/dev/null | wc -l) -gt 1 ]; then
        curl \
          -H "Authorization: Bearer ${HOME_ASSISTANT_ACCESS_TOKEN}" \
          -H "Content-Type: application/json" \
          -d '{"entity_id": "${ENTITY_ID}"}' \
          https://${HOME_ASSISTANT_DOMAIN}/api/services/switch/turn_on
      else
        curl \
          -H "Authorization: Bearer ${HOME_ASSISTANT_ACCESS_TOKEN}" \
          -H "Content-Type: application/json" \
          -d '{"entity_id": "${ENTITY_ID}"}' \
          https://${HOME_ASSISTANT_DOMAIN}/api/services/switch/turn_off
      fi
    
    Then, create a LaunchAgent that monitors your Zoom Application Support directory for filesystem changes at ~/Library/LaunchAgents/local.${USER}.on-air.plist:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
          <key>Label</key>
          <string>local.${USER}.on-air</string>
          <key>ProgramArguments</key>
          <array>
              <string>${PATH_TO_SCRIPT}</string>
          </array>
          <key>WatchPaths</key>
          <array>
              <string>/Users/${USER}/Library/Application Support/zoom.us/data</string>
          </array>
      </dict>
      </plist>
    
    Finally, load 'er up:

      $ launchctl load ../Library/LaunchAgents/local.${USER}.on-air.plist
    
    [0]: https://www.amazon.com/dp/B09NJ8ZCHF
    • stevenhubertron 4 hours ago
      You can make this quite a bit easier you could just connect your Apple calendar or Google calendar to Home Assistant directly and just set up an automation there no script needed
    • OhSoHumble 21 hours ago
      I have something similar that I built a long while ago. It's a large Do Not Disturb sign. There is a raspberry pi mini that controls power going to it. There is a corresponding daemon running on a PC that checks Discord call status. In call? Power to sign. Not in call? No power to sign. The client/server daemons are in Golang and communicate over RPC.
  • teach 1 day ago
    > My router assigns dynamic IP addresses, meaning my server location kept changing.

    I've had a similar problem in the past. It turns out that most routers have a way to assign an IP address statically based on the MAC address of the requesting device without affecting the other DHCP devices on the network.

    I do this for my pi-hole, my NAS and my gaming PC.

    • lostlogin 1 day ago
      > Dynamic IPs

      I thought that step one of geekdom was assigning a few static IPs.

      Ruining the home network while ‘optimising’ has happened a few too many times.

    • hunter2_ 1 day ago
      The wording can vary quite a bit: I've seen names like static, fixed, DHCP reservation, etc. -- I tend to like DHCP reservation, because from the client's perspective, "static" means not using DHCP, but this does use DHCP (just not the pool).
    • tzs 21 hours ago
      Most home routers also have some addresses that are outside the range managed by DHCP, or if DHCP is set to manage the entire range of LAN address have a setting where you can reduce that range. This gives you a third way to manage static assignments.

      Let's assume the LAN is 10.0.0/24, so addresses of devices on the LAN are 10.0.0.1-10.0.0.254. In the following I'll omit the 10.0.0. part of an address, so will just refer to addresses 1-254.

      Find the range DHCP manages, which should be somewhere in the router settings. If it is 1-254 reduce it. Let's say it is 1-200 (either by default or after you have reduced it).

      Then you can simply go the settings on your server or other device that you want to have a static address and configure it to use a hard coded address outside that range, such as 201.

      A possible downside of that is that on some devices if you want to give it a hard coded address you also have to hard code the gateway address and the name servers.

      Some devices though have an option to use a hard coded address but still get the gateway and name servers from DHCP.

      In summary, there are three ways to manage address for a given device on most home routers.

      1. DHCP assigns the address. It can choose any address in its pool. Each time the device needs an IP address, such as after a boot or when its lease expires, it could get a different IP address.

      2. DHCP assigns the address, but you can tell it to give a specific address from the pool to a given device identified by the device's MAC address.

      3. Tell the device to use an address outside the router's DHCP pool. It's up to you to decide how to assign these address and how to make sure no conflicts arise.

      For #2 if you want some device to have a fixed IP address but you don't actually care what that address is, many routers have an easy way to do that. Connect the device under #1, so DHCP picks the address.

      Then go find the table in the router's web interface that shows all currently connected devices and find your device. Many routers will have a toggle in there to tell it to switch to #2 for that device. From then on the device's current address will be reserved for it.

      That's a little easier than going through their "assign an IP" dialog, because that usually makes you enter the MAC address. If you go through the connection table details it doesn't have to ask you for the MAC address.

    • bartvk 1 day ago
      What's bizarre is that my previous TP-Link routers alawys had this ability, but when I upgraded two years ago, it was gone.
      • galleywest200 1 day ago
        My current TP-Link router hides this behind the "Advanced" settings toggle.
        • bartvk 11 hours ago
          I've got a TP-Link Archer C7, hardware version 5. No such toggle unfortunately, but thanks nevertheless. Perhaps I should try and flash it with OpenWRT.
  • cuu508 22 hours ago
    Here's my low tech do-not-disturb device ;-)

    https://i.imgur.com/rnwEGIZ.jpeg

    • 3eb7988a1663 17 hours ago
      I like to imagine you spent more effort right-sizing the wood vs installing a door knob with a lock.
      • cuu508 12 hours ago
        I happened to have a piece of scrap wood of the right length already. Making the hole with a hand drill took maybe 2 minutes. Don't think sourcing and installing a lock mechanism would be quicker :-)
    • unangst 16 hours ago
      1. Turn handle down, realizing door is locked. 2. Turn handle up to unlock door. 3. Profit.
  • pavel_lishin 1 day ago
    I have an old, broken crosswalk sign that I keep meaning to set up as a "meeting indicator" - red hand meaning that I'm in a meeting, and the seconds countdown as an indicator of how many minutes are left until I'm out of meetings.

    But as it turns out, since my spouse & I both work from home, separated by an entire floor of a house, there ain't that much need for it, so it sits on my shelf.

  • brandon272 5 hours ago
    Anytime I see something like this my mind immediately thinks of the 'Full House' episode where Uncle Jesse keeps getting interrupted in his basement recording studio so he installs a red light at the top of the stairs. Red light = DND.
  • dripton 1 day ago
    I needed something like this for my basement home office. But I was lazy, so rather than actually building anything, I just bought some color-changing light bulbs ($7 on Amazon including remote) and installed them on the basement stairs. If I have a do-not-disturb meeting, I make the light red.
  • apparent 1 day ago
    > One does not simply get the camera status on a MacBook.

    What you need is a sensor right near the green dot that detects whether it's turned on or not. Could use a full-blown camera, but probably a simpler sensor would work too.

    Only half-kidding.

    • NitpickLawyer 1 day ago
      > One does not simply get the camera status on a MacBook.

      ? OverSight [1] seems to work just fine. It pops up whenever something uses the mic or camera (the usage for this tool is to "monitor" for unwanted access from rogue apps). Since it's open source it should be possible to check how they get the status?

      - https://github.com/objective-see/OverSight

      • shermantanktop 23 hours ago
        That's what I use. Oversight runs scripts on events, which is great. However! now you have the problem of rapid events with overlapping scripts ending up with inconsistent state. I solved that with a lock file, but still get stuck states sometimes.
      • dhosek 1 day ago
        Skimming the code, I think it also monitors log events.
  • rnoorda 1 day ago
    I made a simple ON AIR sign with LEDs inside that I change to reflect what I was doing. Red means I am in a meeting or totally focused, blue means I'm working, but someone can interrupt me if needed. Green means I'm not working, come on in!

    The only issue with my setup- I work from home. My wife does not. No one is there to care if they can come in or not. It was building something fun to solve a problem I never had.

    Would do again.

  • lam0x86 1 day ago
    Nice. I built something similar using a Rust-based daemon running on my Mac. It listens to the microphone state (not the camera) via a Core Audio property listener (AudioObjectPropertyListenerProc), rather than log monitoring or polling, so it works even when the camera is turned off. When the mic status changes, the daemon toggles a light by sending a simple message via zigbee2mqtt. I also installed a fire alarm plate above my door, powered by a cheap Zigbee socket, similar to this one: https://ampac.net/wp-content/uploads/2017/05/4210-0131-Warni...
  • JoeBOFH 1 day ago
    We historically have used Blynclights for this exact thing. Used them in office then we all migrated to working from home a lot of us brought them with and use them. I have a wireless one that sits on a table just outside my office.
  • Terretta 4 days ago
    The way most of these devices get status seems check the conferencing apps directly:

    https://www.amazon.com/stores/Kuando/page/1128C3FD-9BE9-4AA2...

    There are some nice neon sign options here as well:

    https://www.amazon.com/s?k=busy+light

  • jcynix 1 day ago
    A simple, almost analog, solution is some nightlight which can be manually turned on or off, e.g. https://www.amazon.com/dp/B0FSL3Q7PW
  • worldsavior 6 hours ago
    Sock on the handle fixes everything
  • patatino 23 hours ago
    My solution is simple: noise canceling headphones, which I only have on for meetings. If the wife sees them, she knows
  • telesilla 1 day ago
    Next trick - hook up a Recording sign when your DAW is in playback or you are live on the air.
  • CPLX 1 day ago
    I had a similar thought, so I bought this:

    https://onairwarning.com/pages/products

    It completely sucks and doesn't really work. So don't make my mistake.

    • Liftyee 1 day ago
      I don't know why they decided to put the "warning!" text box on the actual thing - it would look much cleaner if it just said "ON AIR" . Inane copyright/trademark reasons?
  • poolnoodle 21 hours ago
    Door locks exist
  • kjkjadksj 1 day ago
    Would love a way to disable the Do Not Disturb button on my macbook without flipping the f keys. Any ideas? Tap it accidentally and you miss all calls and texts for the day on your iphone…
    • dhosek 1 day ago
      There is (was?) a utility that would flip individual F keys on the Mac, although it’s been years since I used it and who knows if it still works post Apple Silicon transition.

      TBH, I kind of miss the touch bar. Once they restored the esc key, it was often kind of useful while I tend not to use any of the keys in the F row (even those mapped by IntelliJ since the whole fn+F key thing is a kind of a pain and I seldom have call for the media buttons—actually I just realized I do occcasionally use the mute/unmute feature but that’s about it).

      Of course my preferences are normative and anyone who does otherwise is clearly abnormal ;-)

      • manarth 11 hours ago

            > "There is (was?) a utility that would flip individual F keys on the Mac"
        
        Function Flip: https://kevingessner.com/software/functionflip/
      • Terretta 23 hours ago
        The Touch Bar was so useless* it's now selling like hotcakes as an accessory:

        “Trigger actions, launch apps, and control your entire setup—all from a hyper-customizable deck of vibrant LCD keys.”

        https://www.elgato.com/us/en/p/stream-deck

        * Narrator: Not actually useless. Mine is setup for multi-screen chat/video/notes windows placement and app window sharing for video conferencing.

    • Terretta 23 hours ago
      Wait — what button is this?

      Oh: [moon|F6]

      “If you are smugly thinking to yourself, “I knew that!”, Then, my question to you is, why didn’t you tell ME???”https://www.podfeet.com/blog/2023/09/do-not-disturb-key/

      It goes on to answer the next question:

      “But that got me to wondering how long the F6 has had a dedicated Do Not Disturb function. I did some research and it looks like it was introduced when Apple came out with the first Apple Silicon MacBook Air in 2020. The previous keyboard shortcuts had F4 key dedicated to Launchpad, and if you had a backlit keyboard, F5 and F6 were dedicated to up/down keyboard brightness keys.”

  • Uptrenda 23 hours ago
    why does the site keep upvoting trivial projects especially derivative projects of what people seem to reinvent every few months. No offence to OP. I don't really get the site. Like, you have posts where someone runs doom or an OS in a PDF file that get 1000 upvotes which I think is valid. Then we get something like "I made an echo server" which is like someone copypasted code from an asyncio documentation page and put it on Github and that will make it to the front page. Again, just feels like it doesn't belong on the front page. It's not news worthy or interesting in any way.
  • nimbius 1 day ago
    "a lot of times my mother asks me if she can come in the room for reasons I won't get into"

    You've appeared to engineer your way around an interpersonal relationship that you lack the emotional, social intelligence and maturity to deal with.

    Welcome to the front page of HN i guess. you're well on the way to becoming a founder.

    • mhurron 1 day ago
      The only one showing any lack of social intelligence is you. The author is choosing not to go into unnecessary personal details while giving a short back story as to why they did a thing.

      I've thought of doing basically something similar so my wife knows I'm in a position not to be disturbed. I can, and do, tell her when I have a scheduled call, but unscheduled calls do just happen. Something like this would let her know I can't be disturbed without her coming in, asking and then going 'oh shit, sorry.'

      In no way is it engineering a way out of dealing with my wife.

      • venturecruelty 15 hours ago
        The nice thing about boundaries is you are not required to explain yourself. "Hey, please don't interrupt me between 9:00 AM and 5:00 PM, unless it is an emergency. I need to get work done, and interruptions break my concentration. Thank you for understanding." You also don't need to build complicated devices.
    • pwg 1 day ago
      Spoken like someone who does not have a "second person" around while they are working from home.

      Unless the "other people" (spouses/partners/parents/etc.) also work a from home job, they simply do not internalize that the work from home individual is "at work" in the same manner as if that individual were away in an office. And for some of them, no amount of explanation ever sinks in to fully internalize the fact that "when I'm working from home, I am not available to also solve all the problems you create for yourself throughout the day".

      Most all of them, however, do actually pay attention to and understand the meaning of a "do not disturb" sign on the door.

    • deathanatos 1 day ago
      … or there's just a lot of awkwardness for both parties in trying to communicate "are you on camera?" without the person who is potentially on camera revealing that communication to the stream.

      The person entering has to make sure they're not on camera — if the room's architecture even allows for that — the person answering has to somehow communicate to that person without people looking at their video feed noticing. I've gestured things to my fiancée while on air, and while they were pretty clearly intended for "someone off camera", still managed to confuse the meeting participants.

      Radio booths and other broadcasts have done this for ages with the "On Air" sign, which basically what TFA has made.

    • venturecruelty 15 hours ago
      It's hard to deal with a parent who doesn't respect your boundaries. I agree, I don't think more transistors can adequately solve what is actually a communication issue. I hope OP looks into codependency/enmeshment, because some parent-child relationships, especially mother-son ones, become enmeshed, and this results in things like the mother not having appropriate boundaries with the son. This might look like, for example, frequently interrupting you in a private space.
      • nasmorn 8 hours ago
        Maybe the reasons he doesn’t get into is that the only working toilet is only accessible through this room and his mom cannot avoid going in several times a day. Maybe it also stores her Polly Pocket collection and she has a strong need to check a specific doll multiple times a day. Knowing moms I consider the later more likely