Remote access to local w/o internet conection

Hi folks,

I am a newbie into home system, but already started experimenting with RPI a bit. I plan to install openHAB and connect a few sensors/devices.

My main concern and general question is internet connectivity and more specifically remote access when local internet is off (due to maintenance or some other reason). How do you folks handle this problem and is it solvable at all?

What are recommended design & architecture considerations for this sort of problem?

Hello,

My degraded/backup plan is to use SMS to send commands to a 3G dongle with the help of the SMS binding.

1 Like

Hey @dalgwen, thanks for your reply. I am interested in how an end to end process looks like, so please correct my assumptions below in case they are wrong:

  1. There exists a 3G dongle device with SIM card inserted into one of the USB slots of your RPI (I simply assumed here that your hub is raspeberry-pi based);
    1.1 is this the SMS binding you refer to: SMSModem - Bindings | openHAB
  2. Is the PI always running on 3G connectivity or does it defaults to 3G only when the WiFi is off? If yes, how is that achieved: is it automatically thanks to the binding or is there some configuration I need to do beforehand?
  3. How secure is this way of communication in general?
  4. What are some gotchas that I need to be aware of and consider before actually implementing this? (specific dongle brands, python libraries, etc)

Thank you!

Hello again,
Good questions !

1- Yes

2- The binding uses the dongle with the AT protocol (simple command send over a serial connection) and does NOT use a 3G/4G/5G DATA connection. It’s plain SMS. The raspberry still uses wifi for all internet related operations. There is no network switching operation.

3- SMS is unfortunately unsecure. Someone can 1- easily spoof a phone number or even 2-eavesdrop your message, as it is not encrypted. You can use a password in your messages for 1 but for 2 there is no solution, except that the probability of a sophisticated attack like this is very low if you are a random guy.

4- Yes there are “gotchas”. The dongle must support AT message. Unfortunately it is not easy to know if this is the case. Most users use old dongles, known to work. A dongle compatible with gammu (for example) SHOULD work. But there is no guarantees.
Another “gotcha” : many old dongle uses 2G to send SMS, and 2G is on the way to be shutdown in many countries.

Another solution is, as you suggest, to use a more advanced network switching solution, with a 3G/4G/5G router, or a phone sharing connection, or something like that ?
I’m interested, but I can’t speak for these solutions.

To summarize, the advantages of the SMS binding solution are :

  • easy (no network configuration, no switching)
  • low cost (no fancy subscription, just base services)
    Drawbacks :
  • only text command
  • not secure for someone REALLY motivated
  • not really future proof ?

I hope others will post their own solution, I’m interested !

I forgot : welcome in this community !

1 Like

If there is no internet access for the LAN upon which the RPi runs, there simply is no way to remotely access the RPi. @dalgwen provides a way to get an alert when internet access is lost, nothing more. A lot of times you don’t really need anything more.

What you are asking for is, frankly impossible. It’s like asking “how can I power my lamp when I unplug it from electricity?” You can’t, not without some other power supply to plug it into.

Not too many home users would find it worth the costs to set up two redundant internet connections but, if for some reason you do find that worth paying for you can definitely set up your network to fail over from one ISP to another (maybe one is your cable/phone ISP and the other is a 5G wireless AP). All that is outside of OH itself though and is going to require some network engineering.

That doesn’t mean the RPi crashes or OH stops working locally on your LAN. It just means your RPi cannot reach anything that requires the Internet and you cannot reach your OH from anywhere outside of your LAN.

So as you build your home automation, plan in failure modes. I like to refer to the Mitch Hedberg joke

An escalator can never break: it can only become stairs. You should never see an Escalator Temporarily Out Of Order sign, just Escalator Temporarily Stairs. Sorry for the convenience.

Build escalators, not elevators. When internet is lost, make sure the critical features of your home automation can continue to function in at least with minimal functionality. But that’s probably going to mean it continues humming along without remote access.

1 Like

One addendum : it can be a two way communication. You can issue command to your openHAB system. And get response from it. The only limits are

  • the code complexity in the rule
  • the SMS text only nature
  • the security :sweat_smile:
1 Like

Great answers, @dalgwen and @rlkoshak. Thank you for having me in this community.

I do love it, that people here still care about other people like me just beginning in the process and trying to figure out the design and complications beforehand. Much appreciated!

I am indeed trying to design for both situations where WiFi is available (most of the time) but also have a backup plan in case something goes wrong with it.

I am aware that the local hub will continue working even without WiFi, however my main concern is in the case of no WiFi and me being far away from my home coupled with a emergency situation eg. door/window open and storm is coming or something similar.

Having a second ISP is not an option for me at the moment I am afraid, so I am looking for the most efficient design of having access to the local hub from outside and some best design and practices around that.

Hence I believe cellular is the way to go, however not sure about the exact hardware and software requirements/complexities around that solution (if feasible at all).

I totally loved the escalator vs elevator reference!

Appreciate your inputs, folks!

Welcome to openHAB!

How often does your home lose Internet access?

I think we hear this particular concern pretty regularly, and for me the answer depends very much on the reliability of your Internet connection. If it’s down for a total of 24 hours in a year (and never due to a power outage), then your uptime is 99.72%. That’s pretty good! If so, you’re putting time and money into a backup cellular solution that only pays you back if there are emergencies during that 0.28% time frame that demand use of the cellular connection.

The probability of a cellular backup solution benefiting you also decreases as we add more considerations to the disaster scenario.

  1. You need to be away from home, with Internet access and awareness of the incoming emergency.
  2. You need to be unable to contact anyone at home or nearby who can close the door/window for you.
  3. You need to have Internet access wherever you are.
  4. openHAB has to be able to do something for you (e.g. close the door/window)
  5. You need to not be getting a haircut, getting a cavity filled, or anything else that prevents you from issuing commands to openHAB.

This isn’t to say that you shouldn’t have backup plans. I’m all about having backup plans. I would just caution against targeting any specific point of failure if the probability of it occurring is very low. If you regularly lose Internet access, then it’s a different story.

As Rich wrote:

The key here is “home automation”. If you have to intervene, then your home is not automated. So rather than making sure you can control it from anywhere, make sure your server knows what to do when you’re not available. Then your backup plans apply to more than just a loss of Internet.