Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What do you do with your Raspberry Pi?
1741 points by xylo 11 months ago | hide | past | web | favorite | 1069 comments
I have Raspberry Pi and I mainly use it for VPN and piHole. I’m curious if you have one, have you found it useful? What do you do with your Raspberry Pi?



There's a bus station across from my studio / coworking space. I can see people waiting for the bus and doing either: 1) staring into the void 2) looking at their watches 3) desperately glancing in the direction where the bus is coming from.

I figured that it'd be nice to let people know when the bus is supposed to be there. So, I installed a 28" display on a monitor stand, installed the stand on my window frame, turned the monitor to face the bus station, and show the up-to-date arrival time in a very big font (the buses have GPS; the Pi gets the real time info from the local transit authority).

This is in Montreal. Some info here [0]. And a little video [1].

[0] https://greg.technology/#bus [1] https://youtu.be/pc16oPb5zW0


Big ups! I use this all the time in winter while waiting for the 55. I definitely assumed you worked at Ubisoft across the street!

Btw, from some experience spending cold winters looking at it, it flickers a lot by having so many screen changes, making it tiring to see the screen change so much. L'AUTOBUS - SERA - LA - DANS - 5... - MINUTES - GREG . - TECHNOLOGY. It would be easier on the eyes if it changed less often.

Thanks so much anyways!


Ha, small world :-)

Agreed on timing, it could be better. I'll consider skipping some of the words + make them appear slower. Thanks for the suggestion!


BUS 55 - DANS - 5MIN ?


AUTOBUS - DANS - 5 - MINUTES

I think that makes sense, yeah. I would rather not flash other digits (55) as that could be confusing for someone who sees that number go by (was that the bus number or the number of minutes?)

Thank you!


You guys don't do minute notation (5')?


I don't think that it's as common to write or read

I'll be there in 5'

Also, since this is a sign seen from about 10-15 meters away, using an apostrophe might lead to confusion (it might not be clear to read).

The aesthetics of the big flashing words are also intentional. Way, way back in my brain there was definitely [0] playing while I was creating this. :-)

[0] * * * WARNING A lot of Flashing Lights! * * * https://www.yhchang.com/SAMSUNG_MEANS_TO_COME_V.html


5' is also a notation of 5 Feet..


Is it too nerdy to just write "BUS 55", "+5MIN" ?

You'll also have 50% more screens in the same amount of time.


> This is in Montréal Official language is french. So Bus 55 is coming in 5 mins!


Me too!

No, just kidding, I am in France but the idea is awesome. Simply fantastic.


This is awesome work and thank you for doing this for public without asking.

P.S. does the transit authority offer an API or is this prone to breaking when they change their page layout?

[edit: I just read about the rumor on your webpage. Clarifies.]


Thank you!

As many other transit authorities, the STM [0] offers "GTFS" data (a standard feed format for transit info) [1].

Mucking around STM's public site, you'll also see the schedule information go by if you inspect the network requests. From what I've seen, their API endpoints are stable, reliable and fast. I've had to do ~2 updates in >1 year of service.

[0] http://stm.info/en [1] http://www.stm.info/en/about/developers

[ edit: that rumor is just a rumor :-) ]


If you use MITMProxy or Charles you can easily intercept the traffic on 99% of all iPhone/Android apps (bit harder if pinned-sertificate). These API’s are often stable because a lot of users don’t update their apps that often.


For newer android apps this is no longer true. By default, apps only trust system CA's. User added System CA's are not trusted by apps. I believe only the browser uses the user added CA's.


That is why these systems generate their own certificate that you add to your phone, so you still can see the traffic.

For MITMProxy you can visit http://mimt.it when the setup is running.

A bit more difficult with “pinned-setificate” where you have to:

1) Decompile the app (easy if you search for the online APK-download and APK-decompile tools)

2) Move the certificate out of the APK and use it for the traffic between MITMProxy/Charles and the server

3) Replace the certificate in the APK with one generated for MITMProxy/Charles, or just delete it if that works for the app (most likely not)

4) Re-compile the APK and install on your device

5) Run MITMProxy/Charles as before, just with some parameters to load the “pinned-certificate”

(There is also a lot of guides for this. Maybe not for pinned-certificate.)


1) decompile 2) remove the line that does the pinning (Easy to find) 3) recompile and sign

5 minutes


It can be crazier than that. App makers who work with important APIs often pin to specific certificates (not signers) so we have an one final absolute emergency measure to kill a version and force an upgrade when we have to.


That is what I refer to as pinned-certificate. Not often used except from some of the biggest companies like Facebook and Snapchat. See my answer on how to go around this.


Your answer sure wouldn't work for my tiny startup's app's pinning and we followed a guide initially.


In S. Korea most bus station have a display showing the current position of the bus and the estimated waiting time. Recently they are changing the display to show the bus stop remaining and removed the estimated time of arrival.

Lots of people use app so when the bus is about to arrive the bus station will suddenly get busy and full of people.


I live nearby and often use this when catching the 55! Sort of surreal to start reading your post and immediately recognize it's something from just a block away!


Hey, I also take the 55 but I never saw the screen!


Stop staring at your phone (kidding)


There's construction right now at the street corner, so they moved the bus station, unfortunately. I hope that they'll be done soon!


This is so sweet to read! Thank you!!


In China, they can get these bus message on a smartphone at mostly main city. The app would show the bus location and predict the time bus would reach according to the traffic status graphically.


We get this in the US in most major cities as well. But sometimes you don’t want to deal with smartphones and apps with bad UI developed by Fortune 500 firms for regional transit authorities, you just wish there would be a simple sign next to the stop that gave you 2 pieces of information: “BUS X IN Y MINUTES”.


We have both in my city (Spain). The problem with displays is that sometimes they get too much light and you can't see that well. Also, the app has much more info than the display, and you don't need to be in the bus stop to know when the bus is going to be there.


Awesome! This has reminded me of an old Heroku app that has been sitting idle for years: https://wmata-status.herokuapp.com (before the Silver line, which is why the UI is all wonked now)

I wanted to do something similar to try and reinvent the old/ugly/hard-to-parse televisions scattered around the DC metro.


Lovely UI, congrats!! You should definitely consider doing a 'gonzo' TV install somewhere in the city where you have access to power, wifi and shelter.


That’s a killer idea. Raspberry pi to the rescue!


I believe the UI is great and will work perfectly on big-screens installed at stations. Kudos for making the app and such a nice UI.


really cool project man, props! bit strange they don't do this ,but i suppose Canada is A LOT larger than my country so perhaps it's harder to roll out decent services in all places :D very nice stuff though! the most annoying thing in the world to me is waiting on something without a clear indication of when the wait will end so you are doing a big big service to these poor people :D


Thanks! Some bus stations in Montreal do have small digital signs announcing the next departures. I’m sure those devices cost a bit of money and need to be serviced, so it makes sense that not all stations get them. (All stations do have a paper schedule which is neat, but isn’t real time info..!)


blinks ouch, perhaps it's just my colour-blindness, but just fyi I can't read your site at all unless I highlight the text.

Awesome public service with the Pi bus times though, love it!


I sincerely apologize, I just relaunched my site and did not take that into consideration. I’ll definitely revisit this. Thank you!


I just changed the site to use a plain background color. Thanks again.


That is a very kind thing to do.


Ha! I live a few blocks from that corner. Always wondered who set that up and for what reason.

Nicely done. Hopefully the construction there will end soon, too.


Thank you! So happy to see the response from Montreal (/ Mile End) HNers :-)


Ah, so that is your work! I always found it amusing.


You, sir, are a modern-time knight


Great job! This is an excellent example of being able to contribute to one's community with a small but nonetheless substantive project.


I am just wondering here - why does not the bus stop have the digital schedule set up? Is it normal for Canada?


Canada's a big country :-) As far as I understand, local transit authorities in every city have the autonomy to decide how they spend their budgets. A digital sign is useful, but is it worth having one at every single stop, considering the cost to buy them, the necessary infrastructure (electricity, internet access), the support costs to repair/replace them, etc.?

Also, paper schedules have been part of all stops here for a long time. Considering that the buses are pretty reliable, the paper schedule typically does the job. And you can always use the transit authority's website or one of the many mobile apps to see if there's an unexpected delay.


>> but is it worth having one at every single stop, considering the cost to buy them, the necessary infrastructure (electricity, internet access), the support costs to repair/replace them, etc.?

Well, I just don't recall when I saw a public transport stop that does not have the digital sign here in the Netherlands. The paper version is always provided as well. But I suspect that it works like this in large cities only.


Given how this has been received, interspersed HN headlines will have to be added.


If the buses have GPS then Montreal should launch an app. They did that here where I live and now everyone can see where each bus is, live, on a map of the city. Best thing ever for us control freaks.


The transit authority did have an app, which they’ve pulled at some point (as far as I understand, they felt like they couldn’t compete with the level of transit info apps out there — which isn’t untrue). There’s also the Transit app [0] that is made in Montreal, so I guess that they (the transit authority) were happy to shine a light on that (pretty great) app.

In any case, one of the neat things about the Pi sign is that it works for everyone (whether you have a phone or not), and is part of the urban landscape. You can use your phone for more important things, or just leave it alone a few minutes while you wait. :)

[0] https://transitapp.com/


In big cities in Poland it's a common thing. Good job tho


How cool are you! Great idea.


I know this stop and have always appreciated your sign. Thank you +1!


You, Sir, are a hero.


I have it set up to run a project where a subreddit has control over the watering of a live plant in my apartment.

The pi runs a reddit bot that reads the votes, and can switch on a pump to water. It also collects data about sunlight, moisture, temp and humidity to help inform the decision about watering. Despite many people's preconceptions about the goodness of the internet, I must admit that they do a wonderful job caring for my plant!

website: http://www.takecareofmyplant.com

subreddit w/ voting: http://old.reddit.com/r/takecareofmyplant


> Despite many people's preconceptions about the goodness of the internet, I must admit that they do a wonderful job caring for my plant!

Maybe I should create a subreddit where people can control a bot that has access to my bank accounts so they can manage my finances, invest some, etc. ;-)


Didn't someone do this with Twitch Plays Stocks? Essentially gave them some capital and let the chat decide what trades to make. They nuked the portfolio within 24 hours.


On average (and very much more than just average) there is a negative correlation between trading frequency and portfolio performance (you are not an HFT firm, don't compare yourself to one).

Set up a system like that wrong, and it doesn't matter how smart the crowd is, you're going to lose all your money. It would be interesting to play with the parameters of the game and see how results changed. (how often trades are made, max portfolio % per trade, voting mechanics, etc.)


Agreed

You'd want to play to the 'wisdom of the crowd'.

Perhaps some kind of voting on a selection of likely stocks?


Sounds like the most optimal setup would be a single vote (1 vote = $1 spent on a stock of your choice) at the start and then just wait 1 year for the results.


You could put in a set amount per day (or week), choices weighted by the votes since last time, and get some of the benefits of dollar cost averaging, plus more reason for continued engagement.

Maybe introduce sales after it's been around for a year. (Though I'm not sure which mechanism, DCA doesn't work in reverse.)



but if you had people "invest" a dollar of their own I bet they would manage it well ..


Paying a dollar for the entertainment of burning down everyone's investment would be a great deal for a troll.


you'd be surprised...


A bunch of people have already done this. They're called crypto-exchanges... <smirk>


I have a Nigerian prince friend who will make your finances a lot easier to calculate. PM me for more.


Wisdom of the crowds


Reference Boaty McBoatface



That isn’t Boaty McBoatface, that’s Boaty McBoatface 2 (or Boaty McTwoFaced as it ought to be known). Boaty McBoatface was the name the public voted for the research vessel, not the submersible. That was given as an attempt to save face after rejecting the public vote.


Did something similar.

Raspberry pi is automatically uploading video of each watering to YouTube (https://www.youtube.com/channel/UCtl442fLi6KAOowkw_w83rA/vid...) and informing me with summary (incl. watering duration, soil moisture level, temperature, humidity, light level etc.).

Not that I care that much about the plant but automating it has been fun. It's been on auto pilot now for a couple of months now and the plant from the looks of it seams to be happy.


How did you guys automate watering? Any good DIY tutorials you recommend? What devices/parts do I need?


I'm using a cheap submersible water pump controlled via relay by a python script running on raspberry pi. Water pump is connected to a clear vinyl tube for water distribution to the plant.

Availability of water level at source is checked by a non-contact liquid level sensor.

Triggers for watering plant are defined as follows: 1. There is water in tank / source (checked by non-contact liquid level sensor) 2. Soil moisture level is below certain threshold (measured by 2 soil moisture capacity sensors embedded in the plant) 3. Watering duration is determined by current soil moisture level; Python script activates relay to run the pump for the right duration. 4. Same python script also: - activates camera to record watering (+2s buffer to have all on the video) via usb cam connected to the pi (leveraging opencv lib) - uploads recorded video automatically to youtube channel (if pi has internet connection) - summarizes watering event and sends me notification with link to the recording and other helpful stats (temp, humidity, moisture level etc.) - saves all metrics to sqllite db for future reference

Key parts I ended up using for the project: 1. Water pump: https://www.amazon.com/gp/product/B01LWXV7DE/ref=ppx_yo_dt_b...

2. Non-contact Liquid Level Sensor -XKC-Y25-NPN: https://www.amazon.com/gp/product/B07D3246BH/ref=ppx_yo_dt_b...

3. Gikfun Capacitive Soil Moisture Sensor: https://www.amazon.com/gp/product/B07H3P1NRM/ref=ppx_yo_dt_b...

4. Relay: https://www.amazon.com/KeeYees-Channel-Indicator-Arduino-Ras... (though I just bought my when visiting Fry's)

Primary motivation to do the project was so that wife can have pice of mind knowing plants are taken care of while we are away on longer trips.

Hope this helps.


Thanks that helps. However this is for an indoors-only setup right?


That's what I'm talkin' about! You should definitely come check out the sub! I'm always happy to work with other people on new additions / functionality / ideas.


This is one of the coolest uses of reddit/community sites that I have ever seen.

Out of curiosity, how did you come up with this idea?


Trying to impress a girl with my plant-keeping abilities ;) --We had a collaborative message thread reminding everyone to water our plants based upon a set schedule which I was going hook up to a pump to automate, and at the time Twitch Plays Pokemon was a big thing, so I just kind of combined the two ideas.

If you have interest in doing something similar, come check out the subreddit and feel free to DM me on reddit or twitter. Always happy to talk about plants and automation


So finally did you impress that girl or not? :D


No... but some people on the internet thought it was cool, so I can live with that :)


You impressed the Internet and that is a greater accomplishment than impressing a girl.


This is what I try to tell myself


You okay, friend?


Perhaps not?


Just a side note, the links under "Check out some of the tools I used to build this" don't seem to render, I think they're blocked by my Pi-Hole


yeah, they're Amazon affiliate links (gotta pay for hosting some how)

my pihole also blackholes them


Start a side-side business taking bets on if the plant will be watered today?


Once financial incentives are added, that's when bots take over the subreddit


A CDO! Guess we never learn :)


Or a CDO made up of CDO’s.


Why the downvote? This is a real thing that contributed towards the 2008 financial crisis and still exists today just not usually called a CDO.


You're back! I remember joining to help take care of the original plant, but I left when there was a big gap in coverage. Did you get a new plant? It seems that the name has changed.


It would be interesting to create a live feed of plants taken care of by remote botanists at an industrial scale. Maybe to train an ML model. Of course I know next to nothing about botany so this probably wouldn't work for some reason.


The website letsrobot.tv lets you do this. Many people on there use raspbis to receive commands from the crowd, control the motors, and stream back a video feed to the site. If you write something into the chat, the robots say it.

I interfaced a toy excavator remote with an Arduino and also put a small Cozmo robot online from time to time. Some people took their robots outside even :)


I love it, well done!


Thanks, feel free to check in and vote from time to time!


I have 13 in service right now:

- Outdoor irrigation control via OpenSprinkler Pi: https://opensprinkler.com/product/opensprinkler-pi/

- Z-Wave home automation via ZWay: https://z-wave.me/products/razberry/

- 2 Custom HAVC thermostats using: https://github.com/jeffmcfadden/PiThermostat

- An NTP server with GPS attached for a time source.

- 2 for weather monitoring (one directly attached to sensors, one that aggregates the data from a few sources and provides reporting)

- A sort of centralized "workhorse" Pi that runs a lot of random cron jobs, etc.

- An Alexa gateway for home automation

- An NES emulator

- An infrared-remote source for turning on/off surround receiver, TV, etc.

- Monitoring of HVAC temperatures/performance

- An intranet server

Assuming I didn't forget anything.


You are a kindred spirit. I have: 2 pi NTP servers - one running a GPS hat + PPS wired up, one using a USB gps receiver. a "workhorse" pi - 2 wired ds18b20 temperature sensors, cron jobs, email generators, weather page generator, connectivity monitor. One pi running piubos + nextcloud. One pi running as a clock. One pi running as a wireless temperature receiver. a few floating pis running media center or retropie or other things... just swap in the right USB stick and run.


Good souls. I took the time to setup a highly accurate stratum-1 not server only to find my ISP permanently blocks udp 123.


Can a VPN pass that, further loading up the Pi?


A vpn won’t help you with inbound, since any packets marked as destination port 123 are simply dropped. That time server is simply for my own purposes now and can’t contribute to the pools.


I was meaning a remote VPN that the Pi connects to. Possibly a bit overkill.


Could use a pi to automate emailing isp staff every day nagging them about the blocked port.


Just curious, what kind of cron jobs are you running?


I just went to look at my crontab again. Some highlights (lowlights?):

- Turning lights on/off around the house, because I found cron to be a more reliable scheduling agent that the one built-into my Wave software when I first set it up.

- Testing network performance (ping times to various locations)

- Fetching a mail account and processing the messages for an automation I have setup for some things.

- Updating online weather services with data from my weather station.

- Kicking off data gathering/update jobs.


You know, cron is simple... but so directly useful.

I moved some stuff out of cron into systemd and although it worked, it was over-complicated in an infuriating way.

I realize systemd is useful, but the implementation is like trying to navigate through a teenager's bedroom trying to find something.


He told it: random ones.


Maybe there should be a help group for people like us?


We need help. Possibly ways to acquire new models pis early, or get volume discounts.


Just curious, what kind of firewalls are you running?


pfSense [on Netgate appliance] for me.


>2 for weather monitoring (one directly attached to sensors, one that aggregates the data from a few sources and provides reporting)

So, I hear people doing this alot. However what exactly does this help with? Like, is the extra information really more useful than just the standard old TV weather forecast?


I do this primarily because I'm a weather geek. I don't _need_ this at all.

I do find it interesting to see the differences in temperature (and humidity, etc.) in the microclimate around my house compared to the city and greater metro area.

I also use the data to measure the performance of my home's HVAC system. Doing this _does_ require real-time local temperature and humidity data. But again, this is all for fun.

I just enjoy it.


What sort of sensors are available? Just the stuff off the pi site?


For temperature only I prefer the 18B20 sensor. They’re very easy to interface with and they can be at the end of very long wires.

Adafruit has a bunch of sensors that work over the i2c bus; they’ve included python code for accessing the data as well, which makes it easy to get started.

There are sensors out there for everything. Absolutely everything.

https://www.adafruit.com/product/1782


You can integrate just about any sensor into a Pi depending on your knowledge. (any sensor you find on sparkfun would work for someone with a little determination)


>I just enjoy it.

That is as good a reason as any!


How does the data benchmark the HVAC? Or are you actually combining weather + HVAC data to benchmark the home envelope (e.g. insulation)?


Good question.

I'm really benchmarking the system against itself, year on year, by comparing the weather outside vs. performance (output temperature of the HVAC unit, average temperature inside the house).

I'm not trying to find an objective efficiency rating so much as monitor performance over time to see if it's changing.


I see, I guess I didn't even consider the performance might meaningfully fluctuate.


It can be really useful for determining the microclimate. The landscaping & gardens in your yard can live or die from it.


> Z-Wave home automation via ZWay:

Whats your success with this? I am not referring so much to the Raspberry Pi part - but the actual ZWave protocol and whatever mesh network it creates. Is it reliable? Or do your lights flicker on and off randomly?


I have used mostly light switches, dimmers, and a few isolated relays, plus home power monitoring.

My experience is that it has all been rock solid. I’m using most GE branded in-wall light switches and they’ve been very reliable for me. Misc other brands for the other modules.

I’d recommend it.


What sort of equipment are you using for monitoring your HVAC system performance?


Just temperature monitoring, really. I have sensors measuring temperature right at HVAC input, output, attic temperature, as well as home interior temp and outside temp and humidity.


be interesting in weather monitoring, could you describe it more detail


I have a Pi connected to a BME280 breakout board that I got from Adafruit (https://www.adafruit.com/product/2652). It's also connected to a Dallas 18B20 temperature sensor. The sensors are outdoors in a small actively-ventilated enclosure I made. The Pi is indoors, and the wires run through the wall.

Why 2 temperature sensors? Turns out the BME280 runs about 2°F hot, and the 18B20 is right on, so I end up using the 18B20 as my primary temp sensor.

Every minute a cronjob runs and the Pi takes readings from the sensors and stores them locally.

Then, I have another Pi that, every minute, reads those values and stores them in a long-term database (I have about 5 years of weather data at this point). The long-term database is running a custom Rails app I wrote to report on the data and show graphs, compare weather over years, etc.

In theory this could all live in a single Pi, but for various legacy reasons I ended up with a dedicated Pi for data processing, and a dedicated Pi for data gathering.


Seems like a Pi is overkill for a few of these, why not a micro?


Absolutely overkill for most of these things, but I've been managing linux servers for 20 years now and find it really easy and fast to get a Pi up and running to do what I want.

There's also some efficiencies from having everything on the same hardware platform.

But mostly it's just comfortable for me.


I started a company that constructed booths which used 70 accurately sync'd Pis with custom PiCams (fitted with lenses) to take pictures of human subjects, for turning them into avatars like this:

https://sketchfab.com/3d-models/pete-swagger-walk-a55d807de1...

At the beginning of the project, I'd barely powered up the Pis I had collecting dust in my drawer. By the end, I was a legitimate domain expert in several niches within niches of Pi dark arts. For example, since Pis do not have hardware clocks, you have to rely on NTP. However, you need to take pains to make sure that each Pi is getting the same amount of voltage or else they will run at different speeds. If you want to power 70 Pis in a constrained space, you need to devise a customized power distribution system with adequate heat venting.

Due to the thin effect, voltage drops over distance, so the distance a Pi was from the power would impact the voltage and therefore the speed. The major breakthrough came when I realized that I could start with a high end power supply outputting 14 volts and terminate each parallel line with a device known as a UBEC. They are used primarily by drone enthusiasts to make efficient use of battery packs.

A UBEC is designed to drop down a supply voltage to 5v without bleeding off the excess voltage as heat. Since this could also describe a fuse, we felt comfortable bypassing the Pi's MicroUSB power supply and attaching the UBEC's pins directly to the top pins on the Pi's GPIO breakout.

That's just a tiny example of the hijinx. The Pi is an incredible tool if you're patient and clever.

What a rollercoaster.


What you call UBEC is just a switch mode DC-DC buck converter. They are used everywhere in electronics, and you could probably save money buying general puprose 5V buck converter modules instead of modules made specifically for RC. Anyway, that's very interesting info about supply voltage affecting Raspberry Pi speed and timekeeping, thanks!


As @Kadin suggested, the UBEC we purchased in bulk was, at the end of the day, a packaged product that had two things going for it. First, it had undergone some degree of QA and we found the results to be consistent, which was a huge deal for us. Second, it came with a 3-pin connector that could not have been more perfect for plugging directly onto the GPIO pins.

For anyone attempting something similar, here's my boy scout good deed for the day: http://www.banggood.com/External-Brushless-BEC-UBEC-3A-5V2-5...

It's entirely possible that you could get a cheaper buck converter, possibly for pennies. However, this was not where the money was being spent in our project... and if we had to do literally anything to it to prepare it for use (such as soldering on a pin socket) it would have destroyed any cost advantage.


This is true, although UBECs are also packaged with some filtering caps, and are in a nice heatshrinked package usually -- so I look at it the other way around; packaged UBECs are so cheap, if you can make do with them, it's too easy to just grab them off the shelf and move on with life rather than DIYing it from components.

All depends how many of whatever you're building, I suppose.


I did a quick search and wasn't able to find anything even close to the price of the UBEC we used: http://www.banggood.com/External-Brushless-BEC-UBEC-3A-5V2-5...

However, I cannot state enough that the price of this small component was simply not where the costs accumulated on this project. We geeks have a nasty tendency to over-optimize things that just don't matter in the big picture. You totally nailed it when you mentioned that this device is a packaged (and QA'd) product. The fact that it just slips right onto a Pi's GPIO pins without requiring any further modification is what makes this such a win. If you have to do anything to [70 units of] a component to make it work, you're blowing up any miniscule price arbitrage anyhow.


Could something like this be used for synchronization in such a scenario? https://ncase.me/fireflies/


I think the problem here is not that the clocks are out of sync, but rather that the actual clock frequencies are voltage-controlled.

With the firefly analogy, it's like having one firefly flashing at 1.73513x (random number) faster than it's neighbor - can't easily have them persistently synchronized.


Yes - exactly this.


Thank you for sharing this! I love it. It's beautiful.

Unfortunately, I also have literally no idea what you're proposing. I would like to, though.


It is visualisation of simple technique to synchronise many clocks without central authority, algorithm is explained on left side of website. You need to turn on 'Nudge thy neighbour" and then wait for fireflies to sync.


Cool idea, but not applicable to our scenario. People would step in and there would be a 3-2-1 count and then step out. There was no flash to sync against. And even if there was, if the devices are all running at different speeds, the sync is moot.


The model looks fantastic. Can you share any details on how the project worked or what your company is?


First: sigh. First-coda: past tense

Second: I worked alongside a brilliant team with rare knowledge of geometry reconstruction. We took the 70 images of people, algorithmically removed the backgrounds and then used a proprietary process to create a mesh geometry from the intersection masks of those shapes in 3D space, which all had to be carefully calibrated on the regular. That geometry was smoothed to create a valid smooth human mesh. We then created a texture which would be mapped to the physical geometry of the mesh. All lighting and camera sensors had to be carefully measured and corrected, with ample algorithmic color smoothing along the seams of this texture. Then we ran our proprietary auto-rigging algorithm on the mesh, and exported both a 3JS compatible obj+jpg as well as a Unity bundle. The entire process was optimized to take under 60 seconds. This meant that you could step out of the booth, watch the magic happen, and then immediately put on a Vive and interact with yourself in a mirror using your fully articulated new avatar.

Third: VCs were unwilling to fund something with a hardware component

Fourth: sigh


Sorry to hear that it didn't work out, but it's still an impressive achievement. 60s to produce something that lifelike is incredible. I'm surprised no game companies were interested.


Believe it or not, a significant aspect of the struggle was with my partners. I wanted to focus on games and they wanted to make emoji meme apps.

Some day, I will write a book. It’ll be a doozy.


Was any of the geometry reconstruction or texture mapping done on the Pis themselves? I can imagine with 70 of them you’d have a nice little cluster to work with. Cool project, either way!


We definitely tried to do on-board processing, as we were still bottlenecked by the blazing “gigabit over USB 2.0” NIC speed. However, while I have a hunch that the new Pi 4 might be more than up to some of the crunching, the real problem is that the spatial nature of the domain means that each Pi would need access to the sparse clouds and shape masks generated by the rest in order to proceed. We could do color correction and remove lens distortion on the Pi, but that’s it.

Reflecting on this conversation, it occurs to me that I should strongly consider publishing a string of #1 on HN deep dives on what I learned to pay it forward. ;)


I'd definitely read those if you wrote them. I build small machines that use Pi Zeros as motor controllers and I'm a sponge for domain knowledge about using them in practice.

Your point about voltage fluctuation affecting clock speed already has me re-evaluating my current solution. Also I'm really curious about your custom cameras. Thanks for sharing!


Well that sucks, I could see this being used in VR arcades


"yep"


Happy to answer any specific questions about the tech that I'm able to answer. I was not responsible for the proprietary algorithms that generated the avatar.


Side question: how did the company go? and what was the product (the animation) for? games?


Unfortunately, things didn't end well. I can't actually talk about it.

The business plan morphed significantly during our 4-year run, from 3D pet scanning to location-based branded marketing to what was going to be a big gaming focus (my vote) or glorified 3D emojis (their vote).

I wanted any game/experience that featured characters/avatars to be able to allow people to play as themselves. I didn't get a chance to see that concept through.


That is seriously cool! Way to go!


I live in an apartment with quite strict fire-protection standards. Due to the fact that I have a cat that absolutly loves to go outside, I needed to find a solution for him to get outside without a catdoor trough my door.

So I installed a fire-protecion-approved door drive that is hooked to a raspberry pi. Another raspberry pi then analyzes a video stream and detects my cat. If my cat is in the frame for n amount of time, a message is sent to the pi conntected to the door drive and the door opens up slightly for him to get in.


Wow. I literally just sat down to relax after building a cardboard prototype cat door fitting in my open window in winter. You just made me feel partly inferior, and partly like I'm in good company


Now check out this project: https://www.youtube.com/watch?v=1A-Nf3QIJjM

A cat door that can tell if the cat has a mouse it's going to "gift" to you, and locks to keep the cat out.


I may now get a cat just to set this up.


Sounds like there is a market for fire standard approved cat doors! ;)

I loved reading what you are doing with the Pi though.


As you might have guessed, that came to my mind too. Due to the fact that I have worked with a company in the fire damper business, I was contacting them and we were brainstorming about it. The thing is: The market is just non existent. Also fire-protection regulations can be very specific depending on the country you are in. For example, EU ratings are not always recognized here in Switzerland.

Since last week I'm in contact with the manufacturer of the door drive tough because they maybe want to create a product out of it. To be honest I think it would pure marketing and at the moment it is very unlikely to ever hit the market.


A fun dream I've had (context: I've always been confined to apartments) is some sort of cat/pet utopia in a block, so they wouldn't be stuck inside alone. But that wouldn't be feasible since they have to navigate the fire-proof doors between floors...

Unless your cat door goes to market. May luck be on your side :)

(really, don't underestimate niches, you can probably find plenty of places to sell this sort of product...)


Do you have a link to the "door drive" that you're using? I've had this idea for a long time and really want to build it.


I don't use this specific drive due to the fact that another company gave me a better deal for some marketing. But if I had to choose again, I would buy a dormakaba ED 100 or ED 250 (depending on the weight of your door). They support multiple opening angles depending on how you activate it.


Does this open a door or a cat door? I’m just imagining breaking into places by wondering around holding a picture of a cat.


Do you have a screengrab of your cat?


Here is a picture of him examining the tech behind his magic door https://i.imgur.com/81VgqaR.png


Now here's an experiment: can you trigger your door by printing out an image of your cat? :-)


super cool! Sorry for my ignorance, but how does it close again? Do you issue fire alarm and it closes ?


The door stays open for n amount of time (normally around 1min but I changed it to 30sec). The drive has a laser sensor attached to it (it is required to have installed with automatic doors in Switzerland if you don't want any issue with insurance). As soon as the specified amount of time has passed, the door drive tries to close the door. It only works if the laser sensor detects no obstacles.

Maybe a bit off-topic but: The only thing that differs an "fire-protection approved" door drive from a non approved drive is that the drive is not allowed to have an option to keep the door open. Also in case of power outage (or fire) the door needs to close without power.


Can you please open-source this?


Why do you use two separate pis for it?


I'd imagine the processing power required to detect whether or not a video feed contains a cat doesn't jive well with sharing a CPU with something presumably-realtime-sensitive like driving a motor to open a door.


You are exactly right. Before I "optimised" the image recognition the whole detection part was running on a Mac Mini. I also like to "separate concerns". The Pi that is handling the door opening runs Alpine with a read-only file system so whenever there is a power outage or whatever it boots into a known good state. The image processing part is behind a big UPS and is running with a writable file system.


Seems like the door opening Pi would be a good candidate for an esp8266 or an esp32 (if you were looking to save costs and/or have fun playing with a more limited environment)


esp8266 means wifi, and also means you don't have the whole linux TLS ecosystem to play with. I'd be somewhat cautious about using an esp8266 (as much as I like them) to unlock my front door...


Why would you be cautious? Not saying there's no downsides, but if anything I consider it to be an "upside" that the device is simpler. Now I don't need to worry about linux, or making sure it's a read only filesystem with an image all setup, etc.

I look at it this way: If you want a remote device that measures or controls just one or two things, but does very little if any calculations - use a esp8366/32 (or anything with low power requirements). If you need to process data (video stream), or do other calculations, potentially while controlling many different sensors/things - you'll likely want a raspberrpi/similar


I want locks on my doors.

If you can come up with a reasonably secure way to get an ESP8862 to unlock your door that I can't sniff from across the street with a pringles can hooked up to a wifi dongle running in promiscuous mode (perhaps with a pile of off board AWS to crack your WPA key), I'd be interested in checking it out.

I'm not saying it can't be done. But for _me_, I'd prefer to piggy back on all the battle tested tools available in linux like OpenSSL rather that pretend I can write bulletproof crypto code for the constrained resources available on the esp. And I'd prefer to run my unlock signals over wires rather than over a radio. I'm cautious like that.


Preshared one time pad would be pretty simple. But just because it has wifi, doesn't mean you have to use it. The chip is bristling with io so running real wires is always an option (and hey, you probably have to power it by wires anyway).

There's definitely something to be said for not having the surface area of some hobbiest-grade linux distro on your door locks also. I'd like to perform a "security update" on my door locks just about never.

Anyway, the esp32 has a tls stack which is adequate if you want to go that way. Lately there are a handful of boards on the market that pair the esp32 with a PoE chip that are becoming my goto for little "iot" projects.


There are probably much easier ways to break into your apartment than cracking a custom wifi widget.

Obligatory xkcd:

https://xkcd.com/538/


Thanks for the tips! I will order a esp8266 and check it out.


Unless you love soldering wires to tiny little smt pads I'd recommend looking for one of the "development boards" based on the 8266 (or as others have pointed out in this thread the bigger, faster, stronger, esp32). Not only will you get some through-hole connections to some subset of the pins, but you'll also get an onboard power supply and probably a usb port for programming so you can get right to cooking.


Thanks! Will do some research and then try to order the right one.


There are no end of ESP32 dev boards but if you're new to working with MCUs I'd always recommend starting with something from Adafruit or Sparkfun. They just have way more documentation and support.

So I'd go with something like an Adafruit ESP32 Feather [0]. Sure it's super impressive that one can pick up a perfectly functional anonymous board on eBay for almost nothing but, for getting started, $20 for something from Adafruit will save you a lot of initial hassle.

MicroPython on ESP32 [1]. MicroPython specifically on the Adafruit ESP32 Feather [2].

[0] https://learn.adafruit.com/adafruit-huzzah32-esp32-feather?v... [1] https://docs.micropython.org/en/latest/esp32/tutorial/intro.... [2] https://github.com/pvanallen/esp32-getstarted


I can highly recommend the "Wemos D1 Mini" for starting with ESP8266 as it's tiny, cheap but can be plugged in to a PC to be programmed over USB and has pin headers and readily available shields for getting started quickly. I have one in each room of the house reporting back temperature\humidity to the pi that controls the central heating :-)


You're welcome! You might also be interested in MicroPython (if you write python) which runs pretty solid on esp32 and has a lot of batteries included. You can almost forget you're running on a micro.


Do you by chance have a link to a good development kit for the esp32? I checked and I'm a bit overwhelmed by the amount of different components one can get.


One that I like is commonly branded TTGO, a search for "esp32 ttgo" or "esp32 oled battery" will turn up some options.

This is a link to the exact one I bought since you asked: https://www.ebay.com.au/itm/283082902927 (not actually branded TTGO, it's a clone)

Why you might like it:

- it has an OLED screen on the board for debugging and status output

- it has a battery holder and charging circuitry for an 18650 on the back of the board for portable powering/"UPS"

- it breaks out all the GPIO lines onto pins

Why you might not like it:

- like many esp32 dev boards it's slightly too fat to go straight into a standard breadboard. You have to join two breadboards to get access to both rows of pins.


Lately I've been playing with the Olimex esp32-poe [0]. It supports being powered over ethernet or lipo battery (or micro usb) and includes an SD card slot. If your application uses the ethernet, though, be sure to develop using a non-poe switch (or else power from the ethernet interface can leak over the usb programming interface and damage your laptop.)

[0] https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-sou...


A cat or your cat specifically?


That’s amazing


I could actually use exactly that. Do you have a blog outlining how you did it, or the code on github by any chance?


No sadly not. I'd love to write about it but my English is just not good enough to write a compelling story. Writing it in German and then having it translated is always a bit of a hassle. But I may consider it. At the moment I have an offer of the door drive manufacturer for doing a "home story" about the solution. If that will happen, it will definitely be released in English.

I will open source everything once I'm happy with the security and the ability to configure it.


For what it's worth, I didn't have any clue that English wasn't your first language until you said it.


Likewise! Although perhaps part of it is the additional effort it takes them to write in English, which would be understandable.


I've been having pretty good luck with a friend who runs stuff through Google translate, and then I (a native English speaker) fix it up to make it more natural. Might be worth a try. I bet there's plenty of people on HN for example that would do that for you.


Deepl.com is light years ahead for English to German and vice versa.


I wouldn't underestimate your English skills. What you've written here is perfectly serviceable.


> No sadly not. I'd love to write about it but my English is just not good enough to write a compelling story.

Reads like a monty python sketch.


Your English is amazing. Don’t let it stop you.


As a braille user, I was always fond of "laptops" without a built-in display, simply to save ssace, weight and power.

I found a braille display which features a small compartment with micro-USB inside. Used a Pi Zero (these days 0w) to transform that braille display into a full-features Linux laptop. I documented the first version here: https://blind.guru/brlpi.html


This is amazing! I played (very very briefly - like literally a 5 mins hands on) with a braille display sometime in the mid 90's. My dad was an early blind computer + speech user. like Apple II with ECHO-II speech synth kind or early and one summer had a visitor to the house with an earlier incarnation of the braille display. The guy had a whole load of adaptive tech with him but the braille display was the most interesing at the time. My dad never got into using anything like that, in fact never really got into portable tech as it was all still very big and bulky up to the point he passed away in 2003. I think he'd have loved getting involved in the Raspberry pi ecosystem and had he still been alive may have nudged me to making more use of them in assistive use cases. Thanks for the link!


This has got to be one of the coolest uses of pi ever. Amazing !


Cool.

You make reference to fonts. I assume this isn't font in the traditional sense, ie the look (feel?) of a character.


Nope, I actually do refer to fonts as you know them. Long story short, prior to linux kernel 4.19 and brltty 6.0, only those characters that are mapped to a glyph in the currently loaded console font can be backtranslated to the actual codepoint. So to be able to read unicode braille (0x2800-0x28FF) I needed to load a braille font in addition to the standard latin glyph.

This dependency on the loaded font has been removed with linux 4.19 and brltty 6.0. Now, there is a new device (/dev/vcsu) which can be used to read the unicode codepoints of characters on the console, without having to go through the loaded font.


Interesting.

I assume its for differing reasons? You would want an X to always be an X and what feels most like an X to you, and not be worried about whether the X is Ariel or Times New Roman.

Does it extend further to do italics and such?

I had naively thought the screen would do all the heavy lifting in this situation, feed it text, and it converts it to braille.


I have an old Raspberry Pi 1 that runs headless raspbian with a set of cheap speakers plugged into it and an old usb wifi adaptor. It has only one purpose: to play a wav file of a telephone ringing for one minute. My spouse does not ever have the ringer on her cell phone. So when I am out and I need her to look at her phone, I VPN in to my home network, ssh into the pi using Terminus on my iphone, and 'aplay' the wav file.

The real reason we ever wanted to get a landline was because of this issue, so instead of wasting money I just used spare parts to make an alert system I can activate remotely. I can also use the 'say' command for text-to-speech, but that's not really effective. The old school phone ringer wav is perfect.


> I VPN in to my home network, ssh into the pi using Terminus on my iphone, and 'aplay' the wav file

Once, when I was working away from home, someone unplugged the phone at home so I couldn't phone in. After becoming very frustrated, I SSH'd into my home server, and from there into the Mac Mini we used as a media station. Then:

- checked they were watching something using `ps`.

- killed that process so I had their attention.

- `say 'this is dad, I'm inside the computer.'`

- `say 'I want to phone you but you have unplugged the phone.'`

- `say 'plug it back in'`

Worked :)


When I was younger I worked at a retail store and I remember being thrilled to discover I could telnet into a cash register and echo text directly to the attached receipt printer.[0] I became a small time hero at one point when I used this power to alert our sister store that their phones weren't accepting calls during the middle of the holiday season.

[0] Also interesting is the time I discovered that sending a special escape code to the printer caused the cash drawer to open, but that's a tale for another thread.


Haha this reminded me of the time I lost my phone. I suspected it was left at work so I ssh'd into my Mac at work, started recording audio, dialed up my phone and voilá. It was there and I had peace of mind until tomorrow.


Turning on FaceTime remotely to see what’s in front of the computer has saved me a few times, and made me wish that my screen was angled differently many more.


Mine is always in clamshell mode with external monitor. Feels more ergonomic that way.


A few weeks ago I realized on my phone I can, from anywhere, say "Ok google, broadcast" and then say a message. That message gets played back on the Google Home devices.

My kids weren't replying to text messages about being ready to go to an appointment that we were pressed for time on, and I was on the way home, so I did that to tell them to get ready. A few seconds later I get a text from my wife: "How'd you do that?!?"


Reminds me of https://www.xkcd.com/530 .


You could automate this even more with a Twilio number, ngrok running on the Pi and a small webserver to trigger the audio playback. Then instead of having to ssh in you can just send a text.


If you're running a web server, why not just put up a page with a "ring" button and bookmark that on your phone?


Just make sure it isn't a GET, per a discussion the other week...


Or if you wanted to get even cheaper, depending on the carrier, you could text a personal E-Mail server.


Is ngrok the new dnat?



Expose your server endpoint to the public web however you like. There are lots of options and many have been discussed here recently. I just happen to be a fan of ngrok and use it daily for all sorts of cases, including on some of my Pi’s.


Does it work well over extended periods of time like that? I’ve just thought of using it temporarily for testing.


I have a tunnel that’s been running for over a month now with no issues. Basic free tunnels do have an expiration (24 hours IIRC) but the paid accounts will let you keep a tunnel open as long as you want.


If they have an iPhone, you can go into contacts and turn on emergency bypass just for you and that way their phone will ring when you call but not anyone else.


Or, if you have an aPhone, you can ssh directly into it (ssh server apps don't require root), or make it do an additional action (such as turning off silent mode, or playing something) when you call (I'm sure automation apps can do this without root), or a million other creative ideas as root user.


Similar issue, but I worked around it by setting up one of those find-your-phone apps and whitelisted my number. Now I can just text her the secret code and it makes her phone ring loudly even when it's on silent.


I have something similar set with Tasker to locate _my_ phone. That is, a particular word texted to my phone number will make the phone max out the volume, turn on the camera flashlight, and start making noises in the loop. I can also trigger this from my smartwatch[0].

I also have a "haptic test" function: press the button, the phone vibrates briefly. I originally created that check the delay on the Pebble-Tasker connection, but ended up using it almost every day to find my phone among the clutter in the house.

Tasker is amazing, if you have Android, I recommend checking it out.

--

[0] - misplacing a phone while having it still in Bluetooth range actually happened to me once long ago with a feature-phone. I looked and looked and couldn't find it. It was set on silent, so calling it didn't help. Then I noticed it's still connected via Bluetooth to my PC's phone management app, so I manually turned the ringer on, and discovered it deep within the mechanism of my bed. Finding it there without this trick would probably take me hours.


This would be really bad if she happened to be at a performance, restaurant, active shooter situation, etc.

Better off forcing a ring in the home than where you can't foresee the consequences.


Ah yes, daily active shooter situation...

In the same sentence as performance and a restaurant, not less.


That absurd association was the only way he could make a phone going off at a restaurant seem like an offensively irresponsible event.


If you consider the situations that would lead to the husband needing the wife so badly so as to need to override the wife's choice to not have the ringer already on, the subset of such situations which are life-threatening for the husband are probably situations in which the wife either can't assist in time or isn't the only person who can assist, so overriding the silence isn't required for life.

In contrast (and yes, my intention was contrast), if the wife was hiding from a shooter then her ability to maintain silence is required for life. Airplane mode isn't great, because she should be texting/tweeting/etc.

Thus, best to not let your silence be overridden.

For non-life-safety reasons that the husband might be trying to reach the wife, that could be solved via agreement ("keep your ringer on except in emergencies") instead of brute force.


I guess the key is "know your wife".

For instance, my wife has her phone ALWAYS set to silent. I like all the suggestions here.

I think the "active shooter" situation is a bit of a stretch, to be honest.


You must not have kids. They drastically increase the frequency with which one must contact a partner at random unexpected times. People mess up ringer settings all the time.

"the kid is vomiting and school needs us to come get them asap, which one of us is more available?" is not a life-threatening emergency, but it's a family emergency and needs attention. It also happens a lot. An awful lot more than your "unlikely to happen to most people in their lifetime" contrived scenario.


Oh yes. My wife is the worst offender. The amount of times I have had to cancel important things to get a taxi to our kindergarten because she had our car (and thus the agreed upon responsibility to pick up the phone) can't be counted on 2 hands, and he has only been 2 years in kindergarten.


True, it's a risk worth taking in that scenario.


I recently had a training course on it. Makes you think differently. Point is, being in control of your silence is extremely important.


This is a thing? It seems to be solving the wrong problem. I think my sheltered world is quite nice.


The right problem isn't solvable so immediately as what is achieved with tactical self defense.


This is brilliant. I have the same problem, and an extra gen1 pi hanging around, and I'm quite excited about this solution. Thanks for posting. :-)


I would have presumed you can have custom notification levels for specific phones calls baked into modern phones OSs.


iOS has a bypass list for “Do Not Disturb” mode, but sound is disabled via a hardware switch next to the volume buttons.

As a workaround, I’ll use the “Find my iPhone” chime which is the one way to bypass the hardware switch if I need to get my wife’s attention while the phone is set to silent.


Emergency bypass in iOS should also bypass the hardware silent switch.


Then it wouldn't be a hardware switch anymore, just a sensor. Meaning software could mess something up and "embarrass" you in public, completely voiding the point of the mute switch.


But this is exactly how it works. On my 8, I have emergency bypass turned on for my wife. When the hardware switch is turned to the "silent" position, I still get a ring when she calls and a tone when she texts. Everyone else I hear nothing.


It seems likely that the side switch is anyway connected to software - on iPad its purpose is configurable and I think it was for a short period on iPhone. I always assumed the point of the switch was for quick and convenient access, not for certainty. Besides, the hardware button also fails embarrassingly when full of lint.


That's what he said.


OMG Please tell me more about this! This is precisely what I need!


I do something similar but using the Twilio API I send texts to the Pi that do various things including making a ringing sound.


2 Pis for dealing with ADS-B (airplane data), one for 1090Mhz, the other for 978Mhz. I could run that on the same one, but seemed easier to just split them up given some of the software is a bit picky with device IDs. The 978Mhz is much quieter than the 1090Mhz, so I also run a private SpyServer (https://github.com/lloydpick/docker-spyserver) for listening to radio transmissions.

1 Raspberry Pi for a running a very stupid sitcom sound thing. Using a camera it tries to recognise who you are, then play a random sound assigned to you out of a little speaker. Think of like the cheering/clapping when a guest or celebrity enters the room in a sitcom tv show, and replace out the clapping with whatever sound you want.


This reminds me of this project I saw on twitter a while ago where a small arduino with a motion sensor would play the Seinfeld bass riff every time someone entered a room.


What do you use for receiving the radio traffice, something like an RTL-SDR, or something else?


For the ASD-B traffic I use the FlightAware USB dongles - https://flightaware.com/adsb/prostick/

And for the general radio, I use the RTL-SDR Blog USB dongle - https://www.amazon.com/RTL-SDR-Blog-RTL2832U-Software-Telesc...


Love the sitcom sound thing!


Me too. I've always though I and my friends should all have individual theme songs that play when they enter the room. Now I have another weekend project...


Why do you listen to all these radio transmissions?


For the airplane data, I always liked browsing sites like flightradar24, planefinder etc, and wondered how they aggregated the data, and it sort of just went from there. I also now send the ADS-B data to open projects rather than commercial only entities.

In terms of the random radio transmissions, it was simply because I was already installing the two ADS-B antennas in my attic, and thought I might as well just put up the standard telescopic antenna that came with the USB receivers as well. I'm a newbie in terms of radio, so it's just been interesting scanning the bands to see what you can find and listen to.

A future project I have is to try and pick up the 443Mhz transmission from a really simple weather/temperature sensor I got from Walmart a while ago, since apparently that's what it uses to talk to the little base station it came with.


I'm only familiar with the commerical ones (flightaware etc.). What are some of the open ones?



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: