News for hackers. Stuff that matters.
Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @11:21AM (#20264398)
That's silly. RasPis are stupidly useful.

I've got:

* A Zero W hooked up to a PM2.5 to do air quality monitoring in the house. Just bought a couple more sensors for it (VOC, eCO2, etc), but haven't hooked them up yet.

* A 3B+ running the UniFi controller for my home network.

* One is running a custom Hue automation I built to shift the color temperature of the lights throughout the day.

* One is built into an internet connected dog treat dispenser I built as a gift.

* A rather dusty Pi is running CNCjs so I can have a decent interface to my cheap grbl CNC.

* And finally I have a Pi running OctoPrint for my 3D printer.

And that's just the ones currently running. I've got two more in progress. One to automate an exhaust fan based on inside and outside temperatures. Another is destined for the garage where it will replace the not-so-great MyQ "smart" functionality of the garage door opener.

To each their own I suppose, but I've been consuming RasPis like candy. $60 all-in gets you a fairly beefy platform with almost all the I/O you could require and a vast ecosystem of software and HATs. Honestly their only downside is that at some point I'll have to reconfigure my home network when I start exhausting my current internal /24 with 200 RasPis.

Re:Raspberry Pi 4 by apta on Monday June 24, 2019 @01:32PM (#20266112)
> A Zero W hooked up to a PM2.5 to do air quality monitoring in the house. Just bought a couple more sensors for it (VOC, eCO2, etc), but haven't hooked them up yet.

Do you have any resources on how to set up something like that?

Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @03:26PM (#20267454)
Adafruit sells a lot of air quality sensors that can work with RasPi, Arduino, etc. They also have lots of guides. So I'd just go on there and take a look. My setup isn't really unique. I used this link: https://www.balena.io/blog/build-an-environment-and-air-qual... as my guide for setting up something with logging and graphing. I didn't do a full Docker-fied Balena cloud deal; I just replicated the stack manually and used their guide as inspiration. It's overkill, but was quick and works fine.
Re:Raspberry Pi 4 by xrjn on Monday June 24, 2019 @11:31AM (#20264515)
> One is running a custom Hue automation I built to shift the color temperature of the lights throughout the day.

Ooooh do you have the code up somewhere for this? I would love to set it up at home :)

Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @11:58AM (#20264876)
Hue has a Labs addon that does this. You can try that easily. Didn't work for me though.

If you have Home Assistant, someone built code for that: https://community.home-assistant.io/t/circadian-light-with-p...

As for mine, it's a total hack job, but for what it's worth: https://gist.github.com/fpgaminer/7840a6f2fb2d3a3be83625d7ac...

I don't do the fancy minute by minute adjustments to the color temperature; just a couple fixed settings for time of day and based on when the sun sets. And I just have it adjust a scene, which I have my Hue switches configured to use when I turn the lights on.

There's no good way to have this system work with, for example, turning on the lights through Alexa/Siri/etc since they won't use the Circadian scene that's been setup. But what I've got works well enough for now.

Re:Raspberry Pi 4 by bgentry on Monday June 24, 2019 @04:38PM (#20268207)
Not the OP but I use Kelvin for this, works great! It basically treats my Hue White Ambience bulbs like Flux, where they automatically dim and warm in the evenings. Those changes happen gradually over the course of minutes/hours so it's not jarring.

https://github.com/stefanwichmann/kelvin

Re:Raspberry Pi 4 by beaugunderson on Monday June 24, 2019 @08:24PM (#20269988)
I'll throw mine in as well, it automates changing the color temperature to help with better sleep:

https://github.com/beaugunderson/sleep-lights/blob/master/sl...

Re:Raspberry Pi 4 by sbov on Monday June 24, 2019 @05:06PM (#20268474)
> * A Zero W hooked up to a PM2.5 to do air quality monitoring in the house. Just bought a couple more sensors for it (VOC, eCO2, etc), but haven't hooked them up yet.

We have neighbors that smoke, and sometimes based upon wind patterns it blows into our yard. Any idea if they have sensors that can pick up this sort of thing so I can close our windows?

Re:Raspberry Pi 4 by rorykoehler on Tuesday June 25, 2019 @10:07AM (#20274292)
Next step. Have the pi auto close your windows
Re:Raspberry Pi 4 by drewfish on Tuesday June 25, 2019 @12:09PM (#20275637)
You'll probably need to research what the particle size(s) is(are) for cigarette smoke, but this detects a bunch of different sizes: https://www.sparkfun.com/products/15103

I have some code to read from this, it's not too hard. PM me if you're interested in my code. (I can open source it.)

Re:Raspberry Pi 4 by aoeusnth1 on Monday June 24, 2019 @05:37PM (#20268783)
Should be picked up by a PM2.5 sensor.
Re:Raspberry Pi 4 by mbrameld on Monday June 24, 2019 @12:01PM (#20264905)
Which CO2 sensor did you go with and how happy are you with it, if you don't mind talking about it?
Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @12:10PM (#20265025)
I haven't used it yet, only have the PM2.5 hooked up right now. But for what it's worth I grabbed the Adafruit SGP30 breakout. I'm not going to be "happy" with it, since it's not a real CO2 sensor, but I don't have $1000 for a real sensor. Hopefully it'll be interesting regardless. The PM2.5 sensor for all its faults has at least given me a better idea of what activities around the house cause increases in particulate matter. It's not useful information, but it's fun and interesting.
Re:Raspberry Pi 4 by warp on Monday June 24, 2019 @04:45PM (#20268286)
I'm using a co2meter.com one [1] connected with USB. Reading out the values is a bit slow, but I just do that in a cron job every 5 minutes and log the results. This does exactly what I needed it to do with a minimum of fuss, so I'm happy with it.

[1] "CO2Meter RAD-0301 Mini CO2 Monitor" on Amazon, $70

Re:Raspberry Pi 4 by newsoul2019 on Monday June 24, 2019 @05:01PM (#20268426)
How great would it be if Apple built CO2 and particulate sensors into their products.
Re:Raspberry Pi 4 by cheunste on Monday June 24, 2019 @03:34PM (#20267534)
So uh...what if I have no interest in home automation or possess a CNC or a 3D printer?
Re:Raspberry Pi 4 by outworlder on Monday June 24, 2019 @04:28PM (#20268097)
Then perhaps this would interest you: https://pi-hole.net/

You are posting here, so at least internet access you should have :)

EDIT: What about a magic mirror? https://forum.magicmirror.builders/

Re:Raspberry Pi 4 by cheunste on Monday June 24, 2019 @05:04PM (#20268461)
I actually set up a pihole a week ago. Still trying to figure out to how optimize my use out of it as it doesn't block everything (mainly Chinese stuff).

I also considered a magic mirror, but my problem with a magic mirror is that I don't have the tools necessary to build my own frame.

Re:Raspberry Pi 4 by KingFelix on Monday June 24, 2019 @02:31PM (#20266794)
That is awesome, it took me awhile to start using mine. I just put together a pi hole, plex server on Rockpro64 and I just bought a tinker board from Frys for $50. Runs a bit hot though

What software are you running? I have been using Dietpi for almost all my projects. Plex comes native( as an option to install) and a bunch of other software.

Re:Raspberry Pi 4 by itronitron on Monday June 24, 2019 @03:37PM (#20267568)
I actually came here to ask which would be a better platform for building a CNC, Raspberry Pi or Arduino. Is your cheap grbl CNC using an arduino to control the steppers?
Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @03:49PM (#20267704)
Yeah it's the cheap 3018 Pro from Sainsmart. An Arduino runs GRBL to control the steppers. I tacked on a RasPi 3B+ running CNCjs so the CNC could be operated headlessly.

Normally you need a laptop or something hooked into it over USB to feed it your G code, or do manual control. But I didn't want my laptop in the shop getting dusty while the CNC runs, and I also didn't want to risk the cheap CNC failing and throwing a voltage spike into my laptop.

So I opted to use the RasPi. Also makes it nice to have a web interface, and you can add lots of stuff to it (e.g. camera).

(Sainsmart sells an offline controller attachment, which allows manual control with buttons and feeding gcode off an sd card. But the RasPi is only a little more money and you get the web interface, etc)

P.S. I should tack on the usual warning about hooking up a life threatening device like a CNC to the network. I use an SSH tunnel to keep mine secure, instead of exposing CNCjs directly.

Re:Raspberry Pi 4 by alexives on Monday June 24, 2019 @05:24PM (#20268665)
I do the same thing! Plus, with the webcam integration you can keep an eye on it from another room. (Not too far though in case something goes wrong)
Re:Raspberry Pi 4 by bduerst on Monday June 24, 2019 @03:47PM (#20267682)
>* One is running a custom Hue automation I built to shift the color temperature of the lights throughout the day.

Do you even need a RPI for this? Some of these seem overengineered.

Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @03:59PM (#20267798)
> Some of these seem overengineered.

Oh for sure. Normally I'd throw the Hue automation software on my home server, but it's busy with other stuff.

Other than that, for the other stuff I listed, I would have said the same a few years ago and opted for ESPs, Arduinos, STM32s, or some other "lightweight" solutions. But the Pi has gotten to this nice sweet spot now that they've got WiFi built-in and most of the rough edges are gone. They can do almost everything the other solutions can do, and for the things they can't you can buy HATs that fill in the gaps. So it's just nice to have one big, universal hammer that I can pull out for my crazy projects.

Most importantly, I don't like wasting time any more, and I'm willing to spend a couple tens of bucks on RasPis that might be overkill, rather than save X dollars making the best, slimmest, most engineered solution around the perfect STM32 chip.

Re:Raspberry Pi 4 by boromi on Monday June 24, 2019 @11:40AM (#20264621)
* A 3B+ running the UniFi controller for my home network.

What's the unifi controller?

Re:Raspberry Pi 4 by jki275 on Monday June 24, 2019 @12:24PM (#20265213)
Just the software that runs Ubiquiti equipment. You can run it on anything, the "cloud key" device Ubiquiti has is probably the most popular, I just run it on a Windows server in my network. Some people run it on a rpi, though I've never understood why.
Re:Raspberry Pi 4 by archon810 on Monday June 24, 2019 @01:51PM (#20266342)
Probably because it's cheaper than the Cloud Key.
Re:Raspberry Pi 4 by jki275 on Monday June 24, 2019 @02:08PM (#20266512)
It is, but in my experience the reliability factor is pretty ugly for the rpis. I'd rather either pay directly for the device designed for it, or just run the software on a machine already on the network. Obviously that doesn't work for everyone.
Re:Raspberry Pi 4 by fpgaminer on Monday June 24, 2019 @03:40PM (#20267605)
RasPi reliability is tricky, for sure. The recipe that's working for me now is brand name power supplies (RasPi foundations, CanaKit, or Adafruit) and brand name SD cards. Don't trust SD cards that come in RasPi bundles or kits, even from Adafruit; I've had those fail horribly. So far all my Samsung cards are working great. I've also been using A1 grade SanDisks, no issues so far (only been a few months) as well as using cheap SSDs for one RasPi. I highly doubt the SSD is going to run into any issues, and it works seamlessly on the new Pis with a nice boost in performance.

The RasPi itself is so cheap I think a lot of people cheap out on the power supply and such, which ends up giving them lots of problems.

Anyway, given the poor reviews I've seen on the Cloud Key regarding hardware failures, especially on the newer versions, I just went with a Pi. But yeah, if someone has a machine on their network already, that's a great option too. I just wish Ubiquiti would release an official Docker image.

EDIT: I'm not necessarily arguing that people use RasPis for UniFi controllers, or that you personally should. I just thought your comment was a good opportunity to discuss RasPi reliability, because I know a lot of people have trouble with that.

Re:Raspberry Pi 4 by HeWhoLurksLate on Monday June 24, 2019 @05:17PM (#20268586)
For power supplies, my go-to is Apple iPad chargers (the older ones) because they're built to last.

Long-term, my plan is to mod some flavor of computer PSU and get properly regulated 5V out of it.

Also, I'm one of those people who runs a UniFi controller on a Pi. I used Docker, it's been totally fine for my uses.

Re:Raspberry Pi 4 by jki275 on Monday June 24, 2019 @06:38PM (#20269259)
I’m using a drok buck converter off of a 12vdc battery to run a jetson nano. Solid so far.
Re:Raspberry Pi 4 by kawfey on Monday June 24, 2019 @02:49PM (#20267017)
In my experience, anything other than the Cloud Key is quite unreliable. I have been running it on my Win10 desktop without many issues besides the annoyingly restarting after updating.
Re:Raspberry Pi 4 by chrisdhal on Tuesday June 25, 2019 @07:28AM (#20273097)
I run it as a Docker container on my unRaid server and it's been super stable.
Re:Raspberry Pi 4 by jki275 on Monday June 24, 2019 @03:13PM (#20267305)
I run it on Server 2016, it's bulletproof there.
Re:Raspberry Pi 4 by mburns on Monday June 24, 2019 @12:14PM (#20265087)
Essentially, the thing that runs a local web UI to configure/manage other UniFi devices.
Re:Raspberry Pi 4 by grahamperich on Monday June 24, 2019 @11:45AM (#20264707)
Thanks for the ideas :)