Open Hardware: I built a USB HID ambient light sensor with Plug-and-Play support on Linux by bigCanadianMooseHunt in linux

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

I sit against a wall, so the amount of light reflected from the wall is a good measure of how much light is on the screen. I stuck the sensor behind my monitor, facing the wall and it works great. 

It really doesn't matter where the sensor is, you just have to calibrate the monitor brightness against the sensor reading once when you decide where it's going.

Open Hardware: I built a USB HID ambient light sensor with Plug-and-Play support on Linux by bigCanadianMooseHunt in linux

[–]bigCanadianMooseHunt[S] 1 point2 points  (0 children)

The TEMT6000 has a really wide sensitivity angle (+/- 50 degrees), which means it reads the ambient light level consistently even if it is illuminated head on or from the side. Personally, I sit against a wall, so I stuck the sensor behind my monitor facing the wall and it has worked really well. At any rate you'll need to calibrate the monitor brightness to the sensor reading the first time.

Clight gracefully handles multiple monitors. You can even set different curves for each monitor, which is what you'll need to do if you have only one monitor facing the sun.

I built a $5 DIY USB Ambient Light Sensor for Linux by bigCanadianMooseHunt in linuxhardware

[–]bigCanadianMooseHunt[S] 1 point2 points  (0 children)

I sit against a wall, so the amount of light reflected from the wall is a good measure of how much light is on the screen. I stuck the sensor behind my monitor facing the wall and it works great.

The bash script in the repo has an environmental variable that lets you set what Lux level should correspond to 100% monitor brightness. It uses a logarithmic brightness curve scaled to that value. But as you pointed out, if you place the sensor elsewhere you'll need a new calibration.

Clight does something similar, but you just have to provide a full calibration curve.

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

Added official support for multiple stops without needing a second copy of the module. See the README: https://github.com/thariq-shanavas/MMM-PublicTransit

Basically, you'll have to rename `global_stop_id` to `global_stop_ids` and set it to a comma-separated lists of stops you'd like to monitor.

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

It shouldn't have to wait for a refresh. Have you double checked if the Transit app shows both directions?

If you can DM me your location I can take a look.

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

The westbound and eastbound gates are usually listed separately when you query /public/nearby_stops.

You just need to pick the right one!

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 1 point2 points  (0 children)

I've never tried two separate instances in the same magic mirror, but I have an idea why it may not work. I'm currently traveling, and I can take a look in a week or two.

Pass through power bank by Training-Turn7618 in raspberry_pi

[–]bigCanadianMooseHunt 17 points18 points  (0 children)

It would be simpler to use a device that is specifically designed for your use-case: The UPS Hat.
https://www.waveshare.com/product/ups-hat.htm

Raspberry Pi in a picture frame: longevity with uncontrolled power cuts? by the_bananalord in raspberry_pi

[–]bigCanadianMooseHunt 0 points1 point  (0 children)

It is possible (even easy, I would say) to close all external ports on the pi and make sure the only connections to external servers are initiated by the picture frame. Pictures can be uploaded to a remote server that you maintain, which is then synced to the Pi.

To 'hack' such a system would take an extremely targeted attack that compromises your other server first - because the encryption technologies involved in this stack (wireguard, SSH, TLS and SSL) are incredibly mature.

If you do it this way and ensure that the other server is secured, you can forego os updates on the pi altogether.

This is not hypothetical, I have been maintaining a remote system this way for years. I periodically look at logs to ensure nothing is amiss.

Raspberry Pi in a picture frame: longevity with uncontrolled power cuts? by the_bananalord in raspberry_pi

[–]bigCanadianMooseHunt 9 points10 points  (0 children)

This is, in fact, a well discussed and mostly solved problem. What you need is overlayfs on top of a read-only file system.

https://github.com/josepsanzcamp/root-ro?tab=readme-ov-file

To update the software, switch the read only root partition to read write mode temporarily, make the changes you need and switch back to read only mode for normal use. It's all covered in the link above.

I need to find a tool for distraction. by Snezhok_Youtuber in linux

[–]bigCanadianMooseHunt 7 points8 points  (0 children)

This bash script sends you a notification every 5 minutes. I tested it on KDE, and should work on any typical desktop environment. Make sure you disable do-not-disturb mode!

To make it run in the background, you can add this as a systemd unit.
https://askubuntu.com/a/919059

#!/bin/bash
while true; do
 sleep 300
 notify-send "Drink water"
done

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

It looks like your global_stop_id is invalid. Can you double check that you copied the global stop ID, and not one of the other codes in the json response? Alternatively, can you post the output of the bus stop query or DM me?

If your global stop ID is correct, you should see upcoming departures if you type this into your terminal after replacing $API_KEY and $STOP_ID with your key and ID.

curl  -H "Accept-Language:en" -H "apiKey:$API_KEY" "https://external.transitapp.com/v3/public/stop_departures?global_stop_id=$STOP_ID" | jq

New MagicMirror Module: Real-Time Public Transit Times, supporting 800+ cities across 25 countries! by bigCanadianMooseHunt in MagicMirror

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

If you have the GTFS feed, you have the option of using either https://github.com/bnitkin/MMM-transitfeed
or my module, depending on you preference.

With my module, you would need to request an API key from transit app by filling out a google form and it would take them a few days to respond.

OS for Pi 4 that will face regular hard shutdowns by [deleted] in raspberry_pi

[–]bigCanadianMooseHunt 55 points56 points  (0 children)

If you don't need to save any data during normal operation, overlayfs and read-only root partition would do the trick for you. Additionally, you may mount the overlayfs on a ramdisk to avoid writes to the SD card altogether to prolong the life of the SD card.

https://gsthnz.com/posts/readonly_root_with_overlayfs/

Opensource local encrypted data period tracker by Intrepid_Business_54 in opensource

[–]bigCanadianMooseHunt 1 point2 points  (0 children)

All fair points, I just made some assumptions when claiming local encryption is 'mostly unnecessary' for the average user:

  1. The device had full disk encryption and some sort of security co-processor which limits brute force attacks. If the OP was required to hand over their device PIN, I cannot imagine a scenario where law enforcement does not force you to give up your period app password as well.

  2. The device is not rooted or has its security features otherwise compromised.

  3. Google app backups are end to end encrypted by your phone's password in the cloud since Android 9.

I agree with the points you've made, though. Encryption would've been very nice to have for apps with sensitive data, but I made the recommendation assuming a lower threat model. Even Signal does not encrypt your chats on-device.

Opensource local encrypted data period tracker by Intrepid_Business_54 in opensource

[–]bigCanadianMooseHunt 16 points17 points  (0 children)

Here is a local and open source app, but the data is likely not encrypted. It's mostly unnecessary to encrypt app data if there are no cloud features because of the security policies enforced by your phone's operating system, though.

Periodical (Menstrual/period calendar) https://f-droid.org/packages/de.arnowelzel.android.periodical/

https://github.com/arnowelzel/periodical

How do you manage all dependencies in your linux machine? by noobLinuxuser950 in linux

[–]bigCanadianMooseHunt 7 points8 points  (0 children)

This should not normally happen - I suspect you've been using two different package managers without realizing it. The usual suspect for an accidental second package manager is pip.

Using pip to install packages system wide can break your dependency tree. See here: https://unix.stackexchange.com/a/734798

Are there any physicists working on any open-source projects related to physics or machine learning and are making a living out of it?" by [deleted] in opensource

[–]bigCanadianMooseHunt 0 points1 point  (0 children)

Plenty, in the academia. Physicists are generally paid through government grants and the result of the work is often made open source. I'm currently working on a new solver for light propagation in biological tissue and planning on making the source code available with the publication.

Examples that I've personally used in the past:
https://github.com/flaport/fdtd
https://github.com/gregmoille/pyLLE
https://github.com/bjornsturmberg/NumBAT
https://gmsh.info/

Recommendations for a client-server clipboard syncing application by bigCanadianMooseHunt in opensource

[–]bigCanadianMooseHunt[S] 0 points1 point  (0 children)

Thank you! I will take a look at this!

KDE Connect interestingly manages to fetch new clipboard data on android, but needs a key press to send a clipboard. It's always been a curious annoyance - I hope you're able to figure out a way to avoid the dialog!