Personal computing discussed

Moderators: SecretSquirrel, notfred

 
Darkmage
Gold subscriber
Lord High Gerbil
Topic Author
Posts: 8048
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Mirror mirror on the wall...

Tue Oct 04, 2016 12:03 pm

... how do I make you perform a remote call?

Short version: How do I get a Raspberry Pi to update a Git project and multiple modules inside that project on a recurring basis? I don't think I'll be able to remote into the Pi, due to it being on another person's network that may or may not allow SSH.

Long version: This coming weekend, I'm going to a wedding for a friend of my wife's. I built a magic mirror as a wedding gift:
Image
It's a Raspberry Pi running a monitor behind one-way glass. The software is stored in GitHub and the module system also uses GitHub to store individual modules (Instagram, Twitter, etc.). I'm not sure I can VNC into the Pi due to it being on someone else's wireless network and who knows how I would find its IP address after this weekend. So my thought was to use GitHub to maintain a fork of the mirror code, plus a fork of each module I want to keep updated. Or possibly use Git subprojects, but I don't understand how that works well enough to set it up. I can set up a cron to pull from my fork every night and if I want to change configuration, I can just update the repository.

Is there a simpler solution I'm missing? Is there an easy way to find your Pi after you give it away?
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
UberGerbil
Grand Admiral Gerbil
Posts: 10308
Joined: Thu Jun 19, 2003 3:11 pm

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 12:45 pm

Cool project! Hand-made gifts are the best gifts. Hope the recipients are geeky enough to really appreciate it (I mean, anybody can appreciate the utility; but I mean appreciating the craftsmanship). Is the frame easily replaced in case it doesn't fit into somebody's decor?

I'd be interested in seeing a build log if you have photos and care to post one.
 
chuckula
Gold subscriber
Gerbil Jedi
Posts: 1706
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 1:01 pm

That is pretty awesome right there.
4770K @ 4.7 GHz; 32GB DDR3-2133; GTX-1080 sold and back to hipster IGP!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
TheRazorsEdge
Gerbil First Class
Posts: 155
Joined: Tue Apr 03, 2007 1:10 pm

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 1:17 pm

Darkmage wrote:
Is there a simpler solution I'm missing? Is there an easy way to find your Pi after you give it away?

You can build some phone-home functionality. E.g., you could have it pull a certain URL to parse instructions, or you could have it post data (ideally with a unique identifier in case you ever make another one).

At a minimum, if it checks in you'll have its IP address. Anything beyond that is up to you. If the home router supports UPnP, a daemon on the Pi could automatically open ports for VNC or SSH. I believe most routers ship with this enabled out of the box.

You could have it setup a secure tunnel as a fallback in the event that UPnP is not available. As long as you have a domain registered on the public internet (or a subdomain on a dynamic DNS service), you should have no problems when the setup is outbound from their network.

Anything you do is probably a security risk unless you seed it with some keys for SSH/SSL/TLS in advance. I would generate new key pairs for this particular case---that keeps your personal keys isolated, and it's not like there is much effort involved.
 
niofis
Gerbil
Posts: 14
Joined: Tue Oct 02, 2007 2:19 pm

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 1:26 pm

If you use ssh regularly you might know about reverse ssh proxys, meaning you could have the pi connect to a vm or other server, and from there, back to the pi whenever you need to. Check the following gists I use on a regular basis:

ssh-tunnel.sh
https://gist.github.com/niofis/a1407f7755b76d13d360
Uses autossh to keep the ssh connection alive, and connects to a remote server using ssh key-based authentication. It creates a reverse tunnel.

ssh-tunnel.service
https://gist.github.com/niofis/bc24f1b33414fd77d77f
Is a systemd service to start the tunnel after reboots.


Regards
 
Darkmage
Gold subscriber
Lord High Gerbil
Topic Author
Posts: 8048
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 3:09 pm

UberGerbil wrote:
I'd be interested in seeing a build log if you have photos and care to post one.
Sure, I can do that. I'll throw it in the Back Porch after I get back from the wedding. In the meantime, you can click on the picture to see the pics I took while building it. It's brief, but it should give you an idea of the process.

UberGerbil wrote:
Is the frame easily replaced in case it doesn't fit into somebody's decor?
"Easily" is a relative term. :) The frame is a "backless frame" from Hobby Lobby. While it's easy to get a frame that matches your decor, you'd have to flip the mirror over and undo the dozen screws that are holding the box onto the frame. Best case scenario: A dozen wood screws and it will come right out and you can replace it. You'll have to drill new holes in the frame, but that's about it.

TheRazorsEdge wrote:
At a minimum, if it checks in you'll have its IP address. Anything beyond that is up to you. If the home router supports UPnP, a daemon on the Pi could automatically open ports for VNC or SSH. I believe most routers ship with this enabled out of the box.

You could have it setup a secure tunnel as a fallback in the event that UPnP is not available. As long as you have a domain registered on the public internet (or a subdomain on a dynamic DNS service), you should have no problems when the setup is outbound from their network.

Hmm. The dynamic DNS I already have. And I like the idea of the Pi us UPnP to open up a port and connect to my house, for no other reason than to let me know it's there and I can get into it if I need to. Let me do some research and see if I can figure this part out myself. I may beg for more assistance later.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
derFunkenstein
Gold subscriber
Gerbil God
Posts: 24259
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 3:31 pm

I have zero advice for you. Just posting to say that is the coolest wedding gift idea I've ever seen. 
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
 
Waco
Gold subscriber
Minister of Gerbil Affairs
Posts: 2263
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: Mirror mirror on the wall...

Tue Oct 04, 2016 3:58 pm

First question - if you're giving it as a gift and setting it up (which is the coolest wedding present I've ever seen, btw), couldn't you ask them for some help in accessing it once it's setup for upgrades/whatever? It's possible they don't want you messing with it once it's "installed", and the point might be moot.
Z170A Gaming Pro Carbon | 6700K @ 4.5 | 16 GB | GTX Titan X | Seasonix Gold 850 | XSPC RX360 | Heatkiller R3 | D5 + RP-452X2 | Cosmos II | Samsung 4K 40" | 480 + 240 + LSI 9207-8i (128x8) SSDs
 
Darkmage
Gold subscriber
Lord High Gerbil
Topic Author
Posts: 8048
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Mirror mirror on the wall...

Wed Oct 05, 2016 5:34 am

So the most recent news on the mirror is that the wedding has been postponed upon account of Hurricane Matthew rolling across their back lawn sometime tomorrow. The silver lining is that I now have three months to finish the coding & configuration.

Waco wrote:
First question - if you're giving it as a gift and setting it up (which is the coolest wedding present I've ever seen, btw), couldn't you ask them for some help in accessing it once it's setup for upgrades/whatever? It's possible they don't want you messing with it once it's "installed", and the point might be moot.
I don't know. In my planning, I was kind of vague on how I was going to get it connected to their wireless network in the first place. I don't know how much time I'll have to explain it to them, hands-on time with the mirror while we're down there and whatnot. Additionally, these people have stupid amounts of money and a full time staff. I don't know who installed their wireless and what level of paranoia a professional installation entails. I'm barely competent to edit a file in Linux, I don't think I can walk their assistant through the process over the phone.

Ideally, I can get the Pi to run a VNC server and I can just jump on the box if I ever need to. But there are a lot of unknowns.

And thanks for the compliments, guys. It started as a combination of "What do you get for the people who have everything?" and "I just saw this neat thing on the Internet and I wanna make one but I don't have a good reason."
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
ronch
Graphmaster Gerbil
Posts: 1101
Joined: Mon Apr 06, 2009 7:55 am

Re: Mirror mirror on the wall...

Wed Oct 05, 2016 5:51 am

Cool project!
NEC V20 > AMD Am386DX-40 > AMD Am486DX2-66 > Intel Pentium-200 > Cyrix 6x86MX-PR233 > AMD K6-2/450 > AMD Athlon 800 > Intel Pentium 4 2.8C > AMD Athlon 64 X2 4800 > AMD Phenom II X3 720 > AMD FX-8350 > RYZEN?
 
TheRazorsEdge
Gerbil First Class
Posts: 155
Joined: Tue Apr 03, 2007 1:10 pm

Re: Mirror mirror on the wall...

Tue Oct 11, 2016 4:49 pm

Darkmage wrote:
Hmm. The dynamic DNS I already have. And I like the idea of the Pi us UPnP to open up a port and connect to my house, for no other reason than to let me know it's there and I can get into it if I need to. Let me do some research and see if I can figure this part out myself. I may beg for more assistance later.

You only really need UPnP if you want it to open a port so it can listen passively from their network. If you have the device create a secure tunnel to your network (using dynamic DNS), you can ignore UPnP entirely.

As background, UPnP is primarily useful for P2P applications, where an unknown client may need to communicate into your network. It allows the internal hosts to dynamically configure port forwarding on the router.

If you implement a secure tunnel, you may want to go out on port 443. This is the same port that web sites use for SSL, so it is generally unrestricted. If this happens to be restricted, then there is probably no simple option available. Proxying/monitoring SSL traffic is one of the most annoying defense measures to implement, so if their "staff" is doing it then you probably need explicit permission for anything to work.
 
Murtlap
Gerbil
Posts: 10
Joined: Fri Oct 21, 2016 6:32 am
Location: USA

Re: Mirror mirror on the wall...

Mon Oct 24, 2016 3:24 am

Wow, awesome idea, beautiful mirror!
 
Darkmage
Gold subscriber
Lord High Gerbil
Topic Author
Posts: 8048
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Mirror mirror on the wall...

Mon Oct 24, 2016 9:47 am

Thank you. I forgot to mention, the build log is up in the Back Porch.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
ozzuneoj
Gerbil Elite
Posts: 522
Joined: Tue Jan 21, 2014 1:27 pm

Re: Mirror mirror on the wall...

Mon Oct 24, 2016 3:51 pm

Talk about a weird coincidence... the day you created this thread I saw it, read about it and was impressed... then the next day went to a local museum that just opened (in the woods, half an hour from civilization) and they actually had an exhibit that presented information in a display much like the one in this thread. The mirror glass and display looked similar to this, but it didn't have the IR interaction and was a little smaller. Still, very strange to hear about this then see one in person within 24 hours.

Awesome idea BTW. :D
Desktop - i5 2500K@4.5Ghz - MSI P67A-G43 - 16GB DDR3-2133 - PNY GTX 970
HTPC - i7 4790 - Asus B85 - 8GB DDR3-1600 - EVGA GTX 1050 Ti
Selling lots of cool PC stuff on Mercari. Use code VBGQMM for a $10 sign up credit!
 
gerbilspy
Graphmaster Gerbil
Posts: 1014
Joined: Mon Aug 05, 2002 5:38 pm
Location: Southern Illinois

Re: Mirror mirror on the wall...

Mon Oct 24, 2016 4:33 pm

Awesome project and gift!

This makes me want to retrofit the mirror above my bathroom sink. If only my wife wasn't a luddite.
Not retired anymore
 
ludi
Darth Gerbil
Posts: 7777
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: Mirror mirror on the wall...

Wed Nov 16, 2016 2:01 pm

gerbilspy wrote:
Awesome project and gift!

This makes me want to retrofit the mirror above my bathroom sink.  If only my wife wasn't a luddite.

How much of a Luddite?  Once she hears that she can preen AND browse Pinterest at the same time, you might have a sale.
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration

Who is online

Users browsing this forum: No registered users and 3 guests