Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Professor of Cats
Mar 22, 2009

Hadlock posted:

99.9% of the things I've shorted and killed either happened after 11pm, involved alcohol, or both

:) Guilty.

e: (pew pew snipe etc)

Adbot
ADBOT LOVES YOU

KKKLIP ART
Sep 3, 2004

This might be more of a general linux question rather than an raspberry pi question, but I can manually mount my Freenas box to a designated folder, but for whatever reason, nothing I do to my fstab options gets it to mount on boot, which I would like. I tried googling stuff, but everything I see seems to indicate that I have the commands right:

code:
//192.168.0.202/data/ /home/pi/Desktop/Freenas cifs username=NAME,password=PASS,workgroup=WORKGROUP,vers=1.0,users,auto,user_xattr 0 0
Someone suggested making the last 0 a 2, but that didnt change anything. Worst case i could have a cronjob mount -a at boot, but that'd be a little annoying because I just want it to auto-mount.

mewse
May 2, 2006

KKKLIP ART posted:

This might be more of a general linux question rather than an raspberry pi question, but I can manually mount my Freenas box to a designated folder, but for whatever reason, nothing I do to my fstab options gets it to mount on boot, which I would like. I tried googling stuff, but everything I see seems to indicate that I have the commands right:

code:
//192.168.0.202/data/ /home/pi/Desktop/Freenas cifs username=NAME,password=PASS,workgroup=WORKGROUP,vers=1.0,users,auto,user_xattr 0 0
Someone suggested making the last 0 a 2, but that didnt change anything. Worst case i could have a cronjob mount -a at boot, but that'd be a little annoying because I just want it to auto-mount.

This thread suggests adding _netdev to your cifs options

e: and theres a shell script in there that shows how to test if your network is up lol

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
I have some questions!

I have a chicken coop that my birds hate, because it is dark and they are, literally, chickens. I thought i could run some lights in there that change their brightness based on time, controlled by the pi. Then i figured i want a pair of really lovely wide angle super low res cameras to make sure my dumb birds go to bed at the right place each night.

I had an idea for automatically opening and closing doors that use a pulley system, but upon reflection that sounds hard to do because :effort:

So: i have a model 3b pi, and i was wondering if there is any low powered dimmable usb lights or cameras which would fit into such a use case, AND could collectively be powered by the pi (i would likely be stapling it to the coop for easyness).

Is there a list somewhere of pi-project stuff that could suit?

Sputnik
Jul 21, 2003

I felt like a ninja, and my kung-fu was strong.

McGiggins posted:

I have some questions!

I have a chicken coop that my birds hate, because it is dark and they are, literally, chickens. I thought i could run some lights in there that change their brightness based on time, controlled by the pi. Then i figured i want a pair of really lovely wide angle super low res cameras to make sure my dumb birds go to bed at the right place each night.

I had an idea for automatically opening and closing doors that use a pulley system, but upon reflection that sounds hard to do because :effort:

So: i have a model 3b pi, and i was wondering if there is any low powered dimmable usb lights or cameras which would fit into such a use case, AND could collectively be powered by the pi (i would likely be stapling it to the coop for easyness).

Is there a list somewhere of pi-project stuff that could suit?

Well, I won't be able to help with everything, but I will tell you that relay modules (like this one from Amazon) are the way to go with using the Pi to move bigger motors and machines. gently caress the whole pulley thing, which would presumably be a pain-in-the-rear end and a bitch to calibrate to near-zero weight, and use a relay module. Those things could be used for a 10Amp motor on regular AC just plain fine and dandy. That opens up even ridiculous options, like garage door opener designs.


edit: And since it took me waaaay too long to figure out the exceptionally simple pinout for the relay modules, I'd be happy to help you if you get equally stuck.

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
So that's an expansion board that has its own wallplug to enable it to power things that the pi itself cannot supply enough power for??

Ie, it plugs into my pi and the wall, the peripheral things plug into it (thus being powered)? Are the peripherals accessible from the pi through this board, or is it power only?

Apologies if this is a stupid question, I'm basically doing this off the cuff with no diy hardware experience.

420 SWAGLORD
Apr 20, 2014

saban bajramovic

McGiggins posted:

So that's an expansion board that has its own wallplug to enable it to power things that the pi itself cannot supply enough power for??

Ie, it plugs into my pi and the wall, the peripheral things plug into it (thus being powered)? Are the peripherals accessible from the pi through this board, or is it power only?

Apologies if this is a stupid question, I'm basically doing this off the cuff with no diy hardware experience.

That is an expansion board with four relays on it. Each relay is like a switch controlled by your pi. They could control a light, or a motor, or anything really. You wire to them like you would any switch, the only difference is that they are 'flipped' by the pi. This does means you would still have to provide power to the things controlled by those switches.

I don't want to sound mean, but this is very very basic electrical wiring stuff that you really need to read up on *before* you try a project. I just don't want to see those chickens get hurt

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
I get it now, it's a controller for "dumb" hardware that more or less isn't "smart" hardware that can't be directly configured at a software level by the pi itself without this intermediary.

Plugging a regular lamp into this would allow me to change its state, and thus what it does, which the normal usb and other connectors of the pi do not allow without a whole bunch of other screwing around, as they can only work at certain settings, thus making them incapable of interacting with non-smart software enabled stuff in the method i desire.

Is this right? I have the autisms, so sometimes hardware stuff is a little hard unless i "get" the right context presentation.

McGiggins fucked around with this message at 12:33 on Apr 19, 2018

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

McGiggins posted:

I get it now, it's a controller for "dumb" hardware that more or less isn't "smart" hardware that can't be directly configured at a software level by the pi itself without this intermediary.

Plugging a regular lamp into this would allow me to change its state, and thus what it does, which the normal usb and other connectors of the pi do not allow without a whole bunch of other screwing around, as they can only work at certain settings, thus making them incapable of interacting with non-smart software enabled stuff in the method i desire.

Is this right? I have the autisms, so sometimes hardware stuff is a little hard unless i "get" the right context presentation.

yes

If this helps: Imagine a light switch on a wall. Take away the switch/paddle part. Replace it with a port the raspberry pi hooks up to. The raspberry pi can now turn the switch on and off.

xzzy
Mar 5, 2009

To give some hard numbers, a single gpio pin on the pi can output 3.3v at 16mA (roughly, see the link). Overall max output is 51mA. A single LED will use 15mA so it's not hard to see how easy it is to overload a pi.. you can run 3 LEDs before hitting maximum.

Running a motor off the pi is even less realistic.


The specifics of the power output are actually way more complicated if you want to get your hands dirty, read this: http://www.thebox.myzen.co.uk/Raspberry/Understanding_Outputs.html

420 SWAGLORD
Apr 20, 2014

saban bajramovic

McGiggins posted:

I get it now, it's a controller for "dumb" hardware that more or less isn't "smart" hardware that can't be directly configured at a software level by the pi itself without this intermediary.

Plugging a regular lamp into this would allow me to change its state, and thus what it does, which the normal usb and other connectors of the pi do not allow without a whole bunch of other screwing around, as they can only work at certain settings, thus making them incapable of interacting with non-smart software enabled stuff in the method i desire.

Is this right? I have the autisms, so sometimes hardware stuff is a little hard unless i "get" the right context presentation.

I had a whole post here but I accidentally deleted it and now I'm mad. Anyways uh that's functionally correct, but I still think you'd really benefit from at least reading up on the parts of a circuit you know? Relays are a pretty fundamental part of safe wiring, directing power while keeping it away from your delicate electronics/fingers. Like in a car, the lights/blinkers/starter/fuel pump are all controlled by relays. When you turn the ignition switch a tiny little electrical signal goes to a relay that flips and sends mad power from the battery/power block to your starter without having to all flow through the switch you're touching/passenger compartment containing your family. Stuff like this is why cars don't just catch fire all the time anymore.

Idk I just really think you should at least know what this stuff is before you buy things and plug them together. "Fuses" would be another nice topic to touch on. I don't have any great links because I learned all this irl as a child, but I'm sure someone can point you to a basic "parts of a circuit and their roles" infographic or something. It's cool, interesting stuff that you should probably get down before you think about the automation part

haveblue
Aug 15, 2005



Toilet Rascal
You should be very, very sure of what you are doing before you start hacking together devices that manipulate wall power. Don't want to end up as a cautionary tale in the OSHA thread.

My own project is sort of coming along. After installing the speaker hat, its drivers, and the USB microphone, the open-source Alexa clone did not work out-of-the-box. Launching it causes the entire system to stop producing audio, even if I then kill the process. The sound data is going somewhere because the little light bar on the hat still bounces in the way it would if the sound were playing, but the sound isn't playing. After trying to find a way to unjam it for a while, I switched to installing the official Amazon reference SDK. The install script for this refused to work with my setup, but they also include instructions for doing it all manually, which seems to have worked so far (except for gstreamer which doesn't show up as installed even though its make install appear to be successful). Being a Raspberry Pi doing full builds of stuff is extremely slow so I had to stop it halfway through the final compilation and I'll have to pick up where it left off later.

Is this a good place to ask about debugging this sort of thing, or is there a better thread?

haveblue fucked around with this message at 19:11 on Apr 19, 2018

Sagebrush
Feb 26, 2012

McGiggins posted:

I get it now, it's a controller for "dumb" hardware that more or less isn't "smart" hardware that can't be directly configured at a software level by the pi itself without this intermediary.

Plugging a regular lamp into this would allow me to change its state, and thus what it does, which the normal usb and other connectors of the pi do not allow without a whole bunch of other screwing around, as they can only work at certain settings, thus making them incapable of interacting with non-smart software enabled stuff in the method i desire.

It's not "dumb/smart" hardware; it is high and low power stuff. Your Raspberry Pi runs on like 3 volts and a few milliamps of current. A desk lamp requires 110v and maybe 500-1000mA. A toaster requires 110v and like 10,000mA (10 amps). You can't have that sort of voltage and current running through a Raspberry Pi because it will explode or melt or catch fire. The relay board is an electronically-controlled switch that keeps the high power and low power circuits separated from one another, while having an isolated connection that lets the low-power digital logic operate the high-power device.

I second that you should read up on basic electrical properties (current/voltage/resistance/power, ohm's law) and safety devices (fuses, circuit breakers) before you start working with anything that plugs into the wall. Or really anything that uses electricity. https://www.allaboutcircuits.com/textbook/ is a great first resource

mewse
May 2, 2006

When you get frustrated/terrified of wiring mains voltage there is a device called the power tail that safely passes mains voltage but is electronically signaled for on/off

Hadlock
Nov 9, 2004

I would strongly suggest you not wire your raspberry pi in to your house mains unless you have a close relative who is a licensed electrician to supervise you. I once shorted an 18650 laptop cell and managed to vaporize the wire causing the short. That's a mere 30A @ 4v. I don't know how many amps will can course through your body at 120v before the breaker flips, but it's probably at least 15.

I had to replace a 12' section of 120v wire (that carries 30A) on my boat recently, before we plugged it in to the shore power we triple checked everything, had someone on the breaker switch and had two fire extinguishers ready to go in case I wired it badly.

The smell of burnt hair is awful.

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
If at all possible i won't be doing any mains anything at all.

The entire scope of the project is to stick a pi in the coop, put some lovely leds to give a weak illumination around the top edge so they're comfortable going in, and some form of lovely small low power, low rez night vision camera or two to spy on the birds and make sure they're safe.

Hmmm, and maybe a tiny speaker so i can go "chook chook chook" and gently caress with them from afar.

The auto-door is a super stretch goal.

All this talk of mains wiring is making me think this is a much higher difficulty project than i thought. :ohdear:

Hadlock
Nov 9, 2004

McGiggins posted:

All this talk of mains wiring is making me think this is a much higher difficulty project than i thought. :ohdear:

Just imagine that the electricity is 150 octane* liquid Australian** fire that's out to kill you, respect it, and you'll probably*** survive

*I realize that is not how octane works
**Everything in Australia is trying to kill you
***Maybe, if you're exceedingly lucky

krissgjeng
May 2, 2012
For lighting you could use a magic blue lightbulb it is a cheap led lightbulb that supports dimming and different colors. you can control it via bluetooth using something like this: https://github.com/Betree/magicblue

spiny
May 20, 2004

round and round and round

McGiggins posted:

If at all possible i won't be doing any mains anything at all.

The entire scope of the project is to stick a pi in the coop, put some lovely leds to give a weak illumination around the top edge so they're comfortable going in, and some form of lovely small low power, low rez night vision camera or two to spy on the birds and make sure they're safe.

Hmmm, and maybe a tiny speaker so i can go "chook chook chook" and gently caress with them from afar.

The auto-door is a super stretch goal.

All this talk of mains wiring is making me think this is a much higher difficulty project than i thought. :ohdear:

you could do it all with 12v, i.e. a car battery.

you'll need something to keep the battery charged, but a 60W solar panel would do the trick.

You can then use car lamps or pretty much any 12v stuff you like with much less chance of hurtin g yourself. Bear in mind you can still easily set fire to all sorts of things if you short a car battery though.

12v > 5v converts are aliexpress cheap to run the Pi

I have a similar setup in my workshop, 100W panel on the roof which keeps a 110Ah battery charged, from which I run a load of LED light panels and a DAB radio. In 10000 years it'll pay for itself :)

cursedshitbox
May 20, 2012

Your rear-end wont survive my hammering.



Fun Shoe

spiny posted:

you could do it all with 12v, i.e. a car battery.

you'll need something to keep the battery charged, but a 60W solar panel would do the trick.

You can then use car lamps or pretty much any 12v stuff you like with much less chance of hurtin g yourself. Bear in mind you can still easily set fire to all sorts of things if you short a car battery though.

12v > 5v converts are aliexpress cheap to run the Pi

I have a similar setup in my workshop, 100W panel on the roof which keeps a 110Ah battery charged, from which I run a load of LED light panels and a DAB radio. In 10000 years it'll pay for itself :)

If you can, Marine battery over Automotive.
use this though, and:

led and 2n2222. This will allow PWM (adjustable brightness).
automotive wiper/window/ motor and a H-bridge to operate your coop door. (sensing can be done via two mechanical switches. one each at the limit of the door's travel.)

nthing reading up on some basic electricity/electronics.

smackfu
Jun 7, 2004

For the lighting, wouldn’t the easiest option be to just use a smart home lighting thing and then control it from the Pi? Even the basic white ones have dimming and there is no wiring involved.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I'd like to use a zero as a sensor for various things. There's power but no wifi or internet available at the locations I want to do some sensing.

Obviously, I could get a regular cellular hotspot, but thats pretty expensive for the super low data rates I need. To make a guess I just need to do an HTTP request like once every 5 minutes with a few hundred bytes.

I feel like I've seen ... things ... that maybe use GPRS or something for this type of use case, but I can't really remember any details.

Any ideas?

Moey
Oct 22, 2010

I LIKE TO MOVE IT
I think you have nailed it.

I've never done this, but couldn't you get a GPRS/GSM shield for the Pi then send SMS to a service to take that data and shove it wherever needed?

Rooted Vegetable
Jun 1, 2002

Thermopyle posted:

I feel like I've seen ... things ... that maybe use GPRS or something for this type of use case, but I can't really remember any details.

Any ideas?

Something like https://www.thethingsnetwork.org ?

Depends if you can get a connection remotely close to it

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
LoRa should work if you can get a gateway or host within a couple kilometres

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

Thermopyle posted:

I'd like to use a zero as a sensor for various things. There's power but no wifi or internet available at the locations I want to do some sensing.

Obviously, I could get a regular cellular hotspot, but thats pretty expensive for the super low data rates I need. To make a guess I just need to do an HTTP request like once every 5 minutes with a few hundred bytes.

I feel like I've seen ... things ... that maybe use GPRS or something for this type of use case, but I can't really remember any details.

Any ideas?

I've heard the folks at Hologram are trying to make cell-based data and IoT cheap for occasional use: https://hologram.io/

Moey
Oct 22, 2010

I LIKE TO MOVE IT

mod sassinator posted:

I've heard the folks at Hologram are trying to make cell-based data and IoT cheap for occasional use: https://hologram.io/

This is pretty awesome looking.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Those all look like decent options.

Right now I'm thinking a GSM modem with an AT&T IoT SIM is going to be the cheapest...but the most effort. I can ebay usb modems for less than 20 bucks and AT&T IoT plan with SIM and 2MB of data for $2/month.

I think most of the effort will be involved in finding modems that will work with the pi and linux.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Yeah it might be easier to get a cheap little hotspot and swap in the IoT / whatever SIM card. Then you can run a simple wifi network for the Pi or any other nearby devices to talk to and send data. In my experience it's much, much easier to configure linux with wifi vs. GSM modems. With GSM you're dealing with crusty old PPP stuff in Linux. It can work but you're going to be reading 20 year old man pages and readmes from back in the modem dialup days that may or may not be relevant anymore. You're also all set when when one sensor turns into two, three, four, etc.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Thermopyle posted:

Those all look like decent options.

Right now I'm thinking a GSM modem with an AT&T IoT SIM is going to be the cheapest...but the most effort. I can ebay usb modems for less than 20 bucks and AT&T IoT plan with SIM and 2MB of data for $2/month.

I think most of the effort will be involved in finding modems that will work with the pi and linux.

GPRS/plain GSM/EDGE service is in the process of being discontinued by all North American carriers with all the major American cell carriers that used to provide it having turned it off. Because of this, there's a lot of cheap equipment for these 2G technologies being sold which won't actually work but people are trying to unload quick.

Be careful to ensure you're buying 3G UMTS equipment to ensure you get signal and the ability to activate on AT&T et al.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

mod sassinator posted:

Yeah it might be easier to get a cheap little hotspot and swap in the IoT / whatever SIM card. Then you can run a simple wifi network for the Pi or any other nearby devices to talk to and send data. In my experience it's much, much easier to configure linux with wifi vs. GSM modems. With GSM you're dealing with crusty old PPP stuff in Linux. It can work but you're going to be reading 20 year old man pages and readmes from back in the modem dialup days that may or may not be relevant anymore. You're also all set when when one sensor turns into two, three, four, etc.

Oh, that's a good idea.


fishmech posted:

GPRS/plain GSM/EDGE service is in the process of being discontinued by all North American carriers with all the major American cell carriers that used to provide it having turned it off. Because of this, there's a lot of cheap equipment for these 2G technologies being sold which won't actually work but people are trying to unload quick.

Be careful to ensure you're buying 3G UMTS equipment to ensure you get signal and the ability to activate on AT&T et al.

Good point, I forgot about that.


In case anyone is curious about my use case:

I own a few of my own and manage somewhere around 250 rental properties for other people. Because of the large number it's not uncommon for some vacancies to sit for months without a tenant. I'd like to be able to know if the electric goes out or the furnace stops working or if there's a water leak in any of these empty apartments. Thus the idea of a raspberry pi monitor.

Thermopyle fucked around with this message at 21:06 on Apr 20, 2018

eddiewalker
Apr 28, 2004

Arrrr ye landlubber
I’m getting a lot of pops and clicks on my USB DAC playing Raspotify on a PiZeroW.

The pops seem to correspond with CPU load, so I moved to DietPi. Fewer pops, but still not great. When I pop the same SD card into a Pi3, it works perfect.

This is what Top looks like most of the time on the Zero


Am I expecting too much running a $5 computer into a $1000 sound card? Do I just need to buy another Pi3?

This software setup works fine on several other Zeros plugged into stereos around the house, but maybe they’re not hifi enough to hear these artifacts.

KKKLIP ART
Sep 3, 2004

Learning DietPi is a thing makes me wonder if I should move my Pi3 to an install of DietPi for my PiHole thing. I know that PiHole is pretty light, but I also thought of either running deluge or transmission from the Pi too, and more resources never hurt anyone.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

KKKLIP ART posted:

Learning DietPi is a thing makes me wonder if I should move my Pi3 to an install of DietPi for my PiHole thing. I know that PiHole is pretty light, but I also thought of either running deluge or transmission from the Pi too, and more resources never hurt anyone.

Don't bother torrenting on a Pi. The transfer limitations make it suck.

KKKLIP ART
Sep 3, 2004

fishmech posted:

Don't bother torrenting on a Pi. The transfer limitations make it suck.

I have a FreeNAS client, I just wanted a thinclient that I can use to actually run the torrenting software because the Transmission build for Freenas leaves a lot to be desired. Really just wanted to put my main PC to sleep. Maybe I'll actually see if someone has done a Deluge port for Freenas.

E: maybe I do rtorrent/rutorrent instead. IDK.

KKKLIP ART fucked around with this message at 14:34 on Apr 21, 2018

Sad Panda
Sep 22, 2004

I'm a Sad Panda.

fishmech posted:

Don't bother torrenting on a Pi. The transfer limitations make it suck.

Mine seems fine. Downloads at 5MB/s which is most of my connection.

Eletriarnation
Apr 6, 2005

People don't appreciate the substance of things...
objects in space.


Oven Wrangler
Torrenting is fine on a Pi if you are OK with being limited to Fast Ethernet speeds not just while downloading but also while transferring off files. I got tired of waiting and eventually migrated to a PC so I could get SATA and gigabit Ethernet.

It would probably also work great if you already have a NAS with gigabit and just have the Pi automatically clone over finished downloads before you need them.

Eletriarnation fucked around with this message at 18:05 on Apr 21, 2018

xzzy
Mar 5, 2009

Years ago I tried running btsync on a rev 1 pi and it would constantly crash trying to handle large files (roughly 500mb and up), it just didn't have enough memory to handle the file and the associated indexing.

Newer ones are probably fine but it is something to keep an eye on.

Oben
Aug 7, 2004

Oh, the lights changed
I'm using a pi zero w as a torrent seeder (using qBittorrent). It was supposed to be a temporary thing, but it works great, nearly maxes out my 5Mb upload and uses almost no power so v:v:v

Adbot
ADBOT LOVES YOU

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

KKKLIP ART posted:

I have a FreeNAS client, I just wanted a thinclient that I can use to actually run the torrenting software because the Transmission build for Freenas leaves a lot to be desired. Really just wanted to put my main PC to sleep. Maybe I'll actually see if someone has done a Deluge port for Freenas.

E: maybe I do rtorrent/rutorrent instead. IDK.

You can run the FreeBSD build of Deluge on your FreeNAS system.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply