• Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 hours ago

    I’m really into IoT automation - wiring up Arduino & ESP devices and programming them - but tbh it’s hard to think of much to automate IRL. So I haven’t automated anything yet. I want a few ourdoor lights to sense motion more elaborately than just having a motion sensor built in - to light up when approached from opposite directions. Also to add switches indoors where I didn’t think to put them when I wired the house. So like, have several ESP32 wall switches tell a room light to turn on or off without running new AC lines through the walls. That would be super useful. Another one is subtle night lighting on stairways for safety, so my eventual cause of death isn’t falling downstairs after tripping on a cat.

  • silly goose meekah@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    9 hours ago

    I’m processing orders for an online shop so a lot of what I do is printing different things on different printers (different labels with different sizes etc) so I wrote a few little JS scripts to inject into the Webshop to automate downloading the different labels, and an accompanying AHK script to automatically print the labels to the correct printers. Instead of 10-20 inputs I just press one button now.

  • Justas🇱🇹@sh.itjust.works
    link
    fedilink
    arrow-up
    15
    ·
    14 hours ago

    I used to work at a place outside the city that only had one bus after work and it was kinda spotty and unreliable. However, there was an online API provided by the bus company that told me where the bus is.

    So I wrote a Python script and a Linux alert that would give me a notification when the bus was within range, with enough time to get to the stop on time.

    • cheese_greater@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      4 hours ago

      Can this be done for basically… any transit? How do you search for api url or stream feed? Its not anything like RSS is it?

      • Justas🇱🇹@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        4 hours ago

        I found a webpage that uses it and found out that it requires no authentication. So I just copied the url and sent a request every 5 seconds just like the webpage did. It gave a csv of busses, their routes and gps locations.

          • grue@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            2 hours ago

            It depends on the transit service, and how much their IT people suck. I’m pretty sure there have been multiple attempts to make standardized APIs for this sort of thing, but you shouldn’t necessarily expect them to be widely used except maybe in Europe.

            Do a web search for “[transit service name] API” and start from there.

            Edit: My local transit service apparently publishes a GTFS feed, which may be more widespread than I assumed, but I’m honestly kinda surprised they didn’t try to roll their own or something stupid like that.

  • halloween_spookster@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    20 hours ago

    I’ve been playing Factorio with a friend. Our factory was getting large enough that him downloading the map and catching up was getting really slow (even though the factory itself wasn’t that big). We ended up setting up a VPN which somehow made that process SIGNIFICANTLY faster. However, I really only wanted the VPN on while we were playing the game. So I ended up writing some automation to detect if I was no longer playing and the VPN was still active and then shut it off automatically. It’s a small thing but I’m both proud of it and happy with the results.

  • IAmNorRealTakeYourMeds@lemmy.world
    link
    fedilink
    arrow-up
    21
    ·
    1 day ago

    some discord bots on a private server, notify me whenever a paper in my scientific field is published.

    have another one about whenever senator or a representative trades stock.

    useful.

  • stoy@lemmy.zip
    link
    fedilink
    arrow-up
    12
    ·
    1 day ago

    A few years back me and my dad set up a raspberry pi with a temperature probe to monitor the water temp in a local swimming hole, it reports the temperature every half hour and submits it to a private webpage.

    Works really well

    • CmdrShepard49@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      22 hours ago

      That’s a rad idea. How are you powering and communicating with it? When I hear “watering hole” I picture a secret swimming spot out in the woods somewhere.

      • stoy@lemmy.zip
        link
        fedilink
        arrow-up
        7
        ·
        21 hours ago

        It run off of a 12v motorcycle battery, the whole thing is on a timer, every halfhour, the timer gives the pi power for two minutes, during those two minutes the pi boots up, and runs a bash script to collect and send the data, wait for one min and shutdown the pi.

        The pi communicates over wifi with a friendly neighbouring house.

          • stoy@lemmy.zip
            link
            fedilink
            arrow-up
            5
            ·
            15 hours ago

            Some more details, the temperature probe is a DS18B20, it connects to the GPIO pins, and communicates over the 1-w protocol which is built into the pi, you get the data digitally in celsius, if it is a negative temperature it is a hassle to deal with so I just made it report 0 as default when it is too close.

            The probe can error out, it then reports the temp as 85, since the water never actually gets that high in reality, I solved it by checking if the value returned from the probe is 85 before submitting it, if it is, it will take another measurement, check that for 85, if that is still 85, it will check one final time and then just submit the result, so far this has solved the issue.

            Once the data is formated and ready, the pi makes an HTTP request, posting the data using curl, to a simple PHP/MySQL site I hacked together, where a page displays the current temp, a timestamp of when the temp was taken and a small graph showing changes to the temp over the last 24h


            Planned improvements:

            Use the status field that the pi reports to include wifi signal strength, as trees grows around the device it will reduce the signal strength meaning that measurements are lost, with the signal strength data we can check how bad it is and clear leaves ahead of the problem.


            Considered improvements:

            Security, as it stands right now, there is zero security to submit data to the database, anyone can just access the submit.php page and it will add an empty entry to the database, or if they figure out the syntax they can just post whatever data they want into the database. I would like to add a simple validation of a static random string that the pi sends along with the rest of the data. I am no real webdev, just an IT guy who hacked this together.

            Power monitoring, it would be good to have an idea of of how well charged the battery is, it would require a separate module which would also require power, reducing the battery life as it is. Currently the battery lasts a few months and we have a manual schedule to replace it, it is not a huge problem, but it would be nice to have the data.

          • stoy@lemmy.zip
            link
            fedilink
            arrow-up
            3
            ·
            15 hours ago

            I forgot about three more technical aspects of the device…

            The bash script it set up to run as a service in systemd, this is to make it run on startup and have some control over it, this is important for the next part.

            The one min delay after submitting the data and shutting down the pi, this gives me time to find the command to stop the script before the script shuts down the pi, this is important so you can access the system and service it.

            Why shut it down at all, the power will be cut shortly after?

            This is to preserve the filesystem and reduce the risk of corruption, consider that the pi will turn on and off 24 times every day, any error caused by improper shutdowns will quickly amplify.

            • DontNoodles@discuss.tchncs.de
              link
              fedilink
              arrow-up
              1
              ·
              2 hours ago

              I think a Pi is an overkill for this. If I were to attempt this, i would try getting it done with an ESP8266 module which uses far less power, making the battery last much longer. Bootup and shutdown times would be much less so using coin cells or supercapacitors charged using small solar panels could also be used. If your home is not too far (few km), using LoRa could eliminate dependency on the WiFi. Cool use case, nonetheless!

              • stoy@lemmy.zip
                link
                fedilink
                arrow-up
                1
                ·
                2 hours ago

                A Pi is obviously overkill, even a Pi Z w which we ended up using, but they are efficient enough for us, and more importantly, I know the system, and I could relatively quickly get it working using just bash on the Pi.

                I was not really interested in learning how to program on a different system just for this.

                We did some power analytics on the Pi and disabled a few things, sorry I don’t remember it right now.

                The unit is placed in a semi public place where teenagers sometimes congregate and we don’t want to draw any attention to the device, so solar power is out.

                A LoRa unit though could be interesting to implement, sadly my parents house is up a steap hill and there is no line of sight.

                I have been thinking of experimenting with Meshtastic and LoRa for off grid coms due to the geopolitical situation here in Europe, might be worth it getting a few units to test out.

  • jubilationtcornpone@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    Scheduling bill payments through my banks online bill pay. I will pay bills with a credit card when I absolutely have to. I don’t use ACH autodraft at all if I can avoid it. Online bill pay is usually free, it helps centralize all my bill payments, and if there’s a problem I just call the bank instead of having to mess with the vendor.

    It also helps make sure I don’t forget to pay a bill, which my ADHD brain would do all the time otherwise.

    • AA5B@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 day ago

      Automating bill payments had been such a huge change for my life - I was only sporadically able to maintain good habits but now everything just works. Minimal effort, maximum gainz!

      But I’d also include

      • tap-to-pay means I never have to carry cash, never have to pay exhorbitant atm fees, don’t even need to carry my wallet
      • online payments - even people you’d normally expect to require cash, will now take Zelle or Venmo or PayPal. No cash needed. This winter I had neighborhood kids shovel driveways that took Venmo!
      • Square. Yes, now we can even go to festivals or farmers markets without paying ridiculous fees for cash or the risk of carrying cash. My kids scout troop was an early adopter and for several years made huge donation money as one of the few booths to take credit card.
  • JoeKrogan@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    24 hours ago

    Monthly backups of containers and volumes, notifications of disruptions, rules for salary to send it to the right places. Arr stack saves a ton of time too