this post was submitted on 05 Jul 2025
46 points (96.0% liked)

Ask Lemmy

33112 readers
1353 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

Original question by @GrumpyDuckling@sh.itjust.works

all 26 comments
sorted by: hot top controversial new old
[–] IAmNorRealTakeYourMeds@lemmy.world 21 points 1 day ago (1 children)

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.

[–] pineapplelover@lemmy.dbzer0.com 2 points 13 hours ago (1 children)

That second one sounds neat. Could also be a great website

[–] Justas@sh.itjust.works 13 points 13 hours ago (1 children)

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 3 points 3 hours ago* (last edited 3 hours ago) (1 children)

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 3 points 2 hours ago (1 children)

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.

[–] cheese_greater@lemmy.world 2 points 2 hours ago (1 children)

Ya but like how might I try to replicate that for a different transit service?

[–] grue@lemmy.world 3 points 1 hour ago* (last edited 1 hour ago) (1 children)

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.

[–] cheese_greater@lemmy.world 2 points 1 hour ago

Aha sorry hehe

[–] stoy@lemmy.zip 12 points 1 day ago (1 children)

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 3 points 21 hours ago (1 children)

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 7 points 20 hours ago (1 children)

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.

[–] CmdrShepard49@sh.itjust.works 4 points 20 hours ago (2 children)
[–] stoy@lemmy.zip 5 points 14 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 3 points 13 hours ago (1 children)

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 1 points 1 hour ago (1 children)

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 1 points 1 hour 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 8 points 1 day ago (1 children)

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 2 points 1 day ago* (last edited 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.
[–] meekah@lemmy.world 6 points 8 hours ago* (last edited 8 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.

[–] halloween_spookster@lemmy.world 5 points 19 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.

[–] Zoldyck@lemmy.world 3 points 1 day ago
[–] JoeKrogan@lemmy.world 2 points 23 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

[–] LovableSidekick@lemmy.world 1 points 1 hour ago* (last edited 1 hour 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.

[–] fittedsyllabi@lemmy.world 0 points 18 hours ago

Seriously, I haven’t automated anything. And life is just fine.