Hubitat on Raspberry PI (aka - Remote access to Hubitat while traveling)

Hi all, so I recently asked myself a question -- when COVID is over (or as over as it can be) and we can all go back to travelling again, there will be times when I will want to be able to access my Hubitat hub and possibly troubleshoot, while away. My only home computers are laptops that are either off or will be with me when travelling. One thing led to another and I very quickly realised I will need something like a Raspberry Pi with some VPN on it running 24/7 inside a drawer.

I know absolutely nothing about Raspberry Pi -- where to even get started, how to set it up, etc. I've watched a few YouTube vides but all I am interested in is Raspberry Pi in the context of Hubitat, not building electric circuits for DYI robots.

Could people recommend some YouTube videos or tutorials how to get started (preferably specifically with Hubitat) that describe things like to a 5 year old?

TIA!

You might want to look at your router as it may offer VPN services. That is how I access my home network.

6 Likes

Pivpn Lots of tutorials online.

2 Likes

It would never even occur to me to be an option...! It looks like my router does offer something that sounds like this. So I guess I need to change direction and do more research about this...

1 Like

You may need to set up a Dynamic DNS also unless your ISP provides a static IP for your connection.

6 Likes

I know some will probably bring up some security issues but I have always used Chrome Remote Desktop. I use it when I'm at work or away. I turn on my Home PC via a smart switch and then log in. Works great.

4 Likes

This is what I use with my Netgear router. As mentioned I setup a dynamic DNS, although I am not sure I needed it. I don't pay for a static IP but my IP has not changed in over 2 years now.

It's pretty easy to setup. I have the OpenVPN client on my phones so I can access my local network from anywhere.

1 Like

Title of the thread vs. what you ask in the OP is a bit confusing, Hubitat’s not running on a raspberry pi, or doing much else in relation to the RPi, per se, if the Pi is just a VPN server.

Are you interested primarily in learning more about your options to build out a remote access solution so you can access your Hub’s web interface when away from home?

An RPi is a computer, so it can do other things like run Node Red, Homebridge, serve as a backup server, all things that have the potential to be leveraged by Hubitat, but only if that’s what you’re interested in doing.

I would try out your tp-link router’s OpenVPN server feature for starters, to see if it meets your needs.

Once you have the OpenVPN server setup and hopefully DDNS setup as well on the router you just download the OpenVPN Connect client to your remote devices from https://openvpn.net and import the profile from the router to connect.

1 Like

I second this. I used Chrome Remote Desktop for many years before setting up a VPN. Also I can WOL my computers via Hubitat (thru Webcore) so it is super easy for me to control PC's remotely. Though, Chrome Remote Desktop is a solid option in terms of remote desktop. By far not the best, but the fact that you can just login thru a web browser makes it super convenient.

I recently switched to a full Unifi setup and now finally have a VPN setup, which is also nice. Makes it easy to access my home file server directly thru windows explorer, rather than a web browser. I can also remote in with Windows Remote Desktop as well. I like having 2 ways to do something, especially when you might need it remotely. Though the VPN is a lot slower than I would like, it gets the job done in a pinch.

2 Likes

I prefer Wireguard as it is faster and sort of simple to set up.. however I have always found OpenVPN to be reliable and well supported so if your router offers it then I would go that way. If you have an RPi and want to experiment then you could play around with WG as well..

In terms of dynamic DNS - DuckDNS is nice..

https://www.duckdns.org/

2 Likes

100%

200%

:rofl:

1 Like

I would love to try out wireguard, since I just setup a unifi gateway with an L2TP VPN server, best option it offers in the web GUI.

After some googling, i did find some info re: running wireguard on unifi. But running command line stuff can get me into trouble :exploding_head:.

1 Like

I highly recommend Firewalla as a great network device that does VPN and much more.

No affiliation, i just like their stuff.

2 Likes

I would like to see how you accomplish this. Can you share ?

Unless you have plenty of times to play around. Took me at least a week to get it half working and lost it all after an update because I didn't know what I was doing. I gave up and went back to my Pi.

1 Like

I have used the guide linked below to setup WireGuard on at least half-a-dozen SBCs. Doesn't take more than 20-30 minutes and has worked every time. Before I found it, I mucked around for 3-4 hours unsuccessfully.

2 Likes

Pretty easy in Webcore. Example below. Essentially I have a virtual switch setup, and if it changes to on, Webcore pushes a WOL request to the PC. All you need is the PC's MAC address. In windows you can do a ipconfig /all in cmd and it will be listed. I have 3 PC's at home setup with this functionality. My main rig, my plex server, and my HTPC.

Couple notes though:

  1. I believe to do WOL you need the computer to have hardwired ethernet.
  2. Sometimes it's a pain to get this setup on some PC's. You sometimes need to go into BIOS and make sure it is enabled. You also need to go into the device adapter settings and make sure it is enabled via device manager. Though, if you already have WOL setup, it'll work with Webcore.
  3. I'm know Windows supports this functionality, but I believe Mac's do as well. Could be wrong though, not a Mac user.

In my example I saved the MAC address as a variable, and then just used that in my command. Ignore the CodeTriggered statement, it doesn't pertain to this setup.

image

1 Like

Some TP-Link routers have Dynamic DNS available to setup in the router as well (in the Advanced -> Networking section). My archer A7 can register dynamic DNS with the TP-Link servers, NO-IP, or DynDNS.

3 Likes

Wow, woke up to another set of brilliant responses from this great community. I keep getting surprised every day how helpful everyone here is taking the time to provide their input, share their experience, simply help out.

I've started to explore some of the options people gave me here and it does look like I should probably start with my TP-Link's OpenVPN functionality. My ISP (Virgin Media in the UK) doesn't offer static IPs to residential customers, but my router does offer Dynamic DNS setup. @tony.fleisher -- I also have Archer C7 and it also offers the three options that you've mentioned. I've tried DynDNS but couldn't figure out if there was a 'free' option, so just went with TP-Link -- seemed pretty straightforward.

I do have a couple of question on the setup, but I realise it may be specific to my router and/or ISP.

  1. Is there any practical difference whether I go with TP-Link's Dynamic DNS or with NO-IP / DynDNS? Or is that just a utility service like water supplier?

  1. Should I select TCP or UDP? From my basic research it sounds like TCP given it gives 'error-correction' (whatever that means) and most connections require that. Is that what I should pick?

And the second choice -- Home Network Only vs. Internet & Home Network -- my interpretation is that Home Network Only means I will only be able to do things locally once connected via OpenVPN and not really go online. So this will be really to only use Hubitat locally (which is my main intention), but not for instance to watch Netflix UK (if I am in Africa for instance); for the second I need to select Internet & Home Network. Am I understanding it correctly?

  1. And lastly, what's the difference between OpenVPN and PPTP VPN? The description given by TP-Link sounds like it's again a choice between Coca-Cola and Pepsi. Does that sound about right?