LAN of things for the machine/fusor shop

This is somewhat of an admission of failure. You can't easily pigeon-hole everything, and most real projects use commercial software, homebrew, and hardware all at once. So, for you makers out there (including me) - this is where to put whole projects that don't fit well in the other forums.

LAN of things for the machine/fusor shop

Postby Doug Coulter » Sat Dec 31, 2016 10:41 am

After a few high output events from the fusor, I decided to move across my campus into another building (the "office trailer"), which means I want the same kind of monitoring and remote control for that building as I have for this one. As tech has moved on a bit, I'm doing it a little differently, though there's a lot in common. Things evolve...
As I have power more readily available over there, but most of the wiring channels and LAN ports are "full", I decided to make the "slave uP" units wireless, using ESP8266 modules. I am using a pi-3 as a wireless access point and router for those, with the configuration currently so that I can use it as a general purpose access point/router, but the plan is to turn off iptables in it and make the shop slave processors "invisible" to even my lan, except through the pies webpage, making it harder to "hack" from outside, and preventing any hack from taking part in some DDOS as we are seeing with the "internet of things" gear these days. It's early times on this project, I know what I want to do (at least at first) but I'm still in the "try this and see how it goes" stage of design and implementation. If I get something that makes me really happy, I may retrofit the other setups to the same standard.
It's beginning to look like I should get a GitHub setup or equivalent, as it's a lot of plain old sysadmin grunt work to set all this up on a pi and the various little sub-computers, and this board won't let me share multi gigabyte images, which I'd love to do so others can play along with me.

The basic setup on the pi is this:
Pixel opsys
hostapd (access point)
dhcpd for dns on the WAP
iptables for routing
xtightvnc for remote desktop access. Everything else here used that, so the new realvnc was removed due to not working with the rest.
mysql because we want to have a nice database of past data to do things with
Samba, just because...and adding a NAS to this might be nice.
phpmyadmin for the above (yuck, but it works)
nginx because it's the best webserver out there, particularly for pi
gnuplot to plot stuff
perl, because that's what I use for glue when computer speed isn't the main issue but my time is
php because a lot of important things - like raspi cam web interface need it (not a language I especially like, but refactoring something else to get rid of it is even more painful)
python because many of adafruit's pi things are python-only (thank $deity perl has an Inline::Python module so I can just include that junk and call it like it was perl subroutines)
gedit because I like that as my general purpose text editor
padre for perl, which sadly won't run in a lot of other places anymore, but it's like devstudio6 for perl
Glade for guis
arduino IDE for those - I'm a big fan of being able to develop on the machine they'll be talking to, though I do keep backups elsewhere on another pi used as a NAS, too.

That's a lot of work to describe, along with abstruse workarounds when the old tutorials don't (can't) account for the new things systemd has broken this week and so on. I'll be working on some way to just save bit images (.iso) for the lashup, as it's a pretty good place to start if you don't mind the fact that I also took out a lot of the kid stuff toys for cleanliness, I'm not using scratch or minecraft on this stuff!.

These of course reflect my personal taste with "only" programming experience that goes back to the PDP-8. YMMV, I'm not religious about what you use, but when it's all mine, I use what I like. Sometimes I think I have good reasons...but I'm not into software religion much.

Other machines at this point span a range - other pies (fusor control stuff), arduino unos, ESP8266, various test equipment that has ethernet interfaces, and anything else I think of and put on the 'net.

So, at this point, the LOT shop pi emits a webpage that looks like this:
LOTPi.png
Oops, garish background of an otherwise nice sky, I'll fix it.

This hooks into my telco LAN, and emits a wireless access point that has a different set of network addresses that are non-routable and non discoverable from the main LAN if I so choose, for security. You pretty much can't find this from the internet, and if you're in my wifi range, you're on campus and inside my kinetic-action range, so to speak...
This doesn't do anything much yet other than exist and isn't even installed in the shop yet - it's in the nice heated space I'm working in this winter for the moment.
I tried some initial work with the ESP8266's that result in them having minimal web servers for simple stuff. I will probably ditch that going forward and just talk to them from the "master" pi for that building. One reason is there's just no need for that, but the main one is that their webserver is quite limited, and crashes about every 4-5 days for no obvious reason, while the UDP interface seems to stay up even when the web server goes down. But just to prove you can do it, they look like this:
(source code on request)
ESPPlot.png
Served from an ESP using svg graphics and a rolling data buffer.

This is really pushing the ESP (adafruit's Huzzah model) to the limit, resources wise. And there's no point when there's a pi dedicated to this that has nmysql and nginx and gnuplot on it already. The ESP (or ESP+Uno) can just do the real time data aq and control, and talk to the pi for the fancier UI stuff. I am not yet sure if I can do real time hard-deadline stuff in an ESP because it might go off on an interrupt to handle the wifi and mess that up. If that turns out to be the case, that's what Unos are for - total control over timing without any pre-emption I didn't put in on purpose.
This particular shot is from the one over in my living space, since the plot is more interesting - you can see where I turned on the unvented propane heater this morning when I got up, raised the temperature and humidity really fast. The one I'm testing in the machine shop is more or less straight lines just now - that's a lot (many tons of steel) thermal mass and a tight building, if you want things to move, you gotta go over and move them, and even then, it's really slow.

Other than the things I have in the other buildings and sheds, there are a few new things I want on this:
Real outdoor weather - wind speed and direction, insolation added to the usual temperature and humidity. I want insolation in some calibrated form that will let me know how much I can pull from the solar setup without running down batteries. Due to the nature of the system, all extra solar power is simply dumped. The only way to find out if I have extra is to add loads till the net charge amps on the system batteries go negative, not very satisfying. There are plenty of low priority loads I could switch in on demand if I knew what I could get away with at any given time - water distillation, HVAC, charging my car...and so on.
Soil temperature and moisture in my garden...duh
Status of the water collector - is the water clean and usable, or dirty and growing algae? I'd like to automate dumping the dirty stuff instead of having to go look each time.
Cosmic radiation monitoring (or incidental local radiation such as from the fusor, but at a distance) - just because it would be cool to have.
Analog smoke/gas detection - mostly because I can, and a smoke detector can't be heard across the campus.
It already has a nice video camera and I'll put that on a servo'd gimbal. Why not? Toys R us.

More when there is more.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: LAN of things for the machine/fusor shop

Postby Doug Coulter » Sat Dec 31, 2016 2:45 pm

I put the ESP sketch in a github repository here: https://github.com/dcfusor/ESPWeather
Sadly, they won't let me upload that juicy pi image - it's 2gb as a gzip and they limit to 25 mb. Even though this site was paid for as "unlimited" previous attempts to add things this big to our ftp portion have resulted in the site being shut down on the first attempt to download (in fact, that download was me checking the integrity over a rather slow DSL connection) as their idea of unlimited is somehow a lot different from the one in any dictionaries. That problem is still unsolved. Anyone want to host some real nice pi images for us and other things like that?

Took ~ 6 hours to upload it to google drive...
(DSL in the boonies, sigh), the share link is: https://drive.google.com/drive/folders/ ... sp=sharing
For the folder it's going into. Get it while it's hot, as the limited space there means I may have to delete it to make room for something else later on.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: LAN of things for the machine/fusor shop

Postby Donovan Ready » Mon Jan 02, 2017 11:34 am

I'll host 'em for you. As soon as the 2Gb download finishes, I'll post the link here.

Edit: http://saposjoint.net/Forum/files/Coulter/
Donovan Ready
 
Posts: 239
Joined: Thu Apr 17, 2014 1:22 pm
Location: Austin, Texas


Return to Combined projects

Who is online

Users browsing this forum: No registered users and 7 guests

cron