Netgear_LTE could be extended to allow LTE connection management?

Background for the curious unfamiliar: The Netgear LTE component works with LB2120 which is an LTE modem that supports failover from wireline (e.g. cable or fiber ISP). It’s super useful for redundancy especially when you are relying on an internet connection to enhance HA security/alarm capabilities.

Currently, the component allows you to send SMS via notifier, and a couple of simple sensors for incoming SMS message count and data usage. @amelchio Thanks for maintaining this component, what a surprise to see it available!

I would love to be able to use automations and/or Node-RED to monitor/control the LTE connection and failover. Use case example, failover to LTE only if the “wireline” connection is dead and my “Away” boolean or MQTT topic is true. Another would be to reconnect LTE if it randomly disconnects (which apparently is a common problem with the LB2120).

I guess we’d need sensors for LTE & wireline status, and services to reconnect LTE, change failover (auto, mobile only, wireline only), and change the auto connect (never, always, always except when roaming).

I don’t have the skillset to help implement, but happy to elaborate on use cases, do testing and provide feedback.

The integration contains just what I need but I am happy to add more features when somebody needs them :smiley:

I actually submitted a pull request adding more sensors just a few hours ago. Those are mostly about LTE status though, probably a few more will be needed for your wireline status.

I see failover and auto connect options in the modem UI, so that can be added. I am not sure what you mean with reconnect, though? My modem does not disconnect.

Thanks for quick reply. Here’s an annotated screen shot showing what I mean by mobile reconnect:

Currently in the case that the LTE connection is dropped for whatever reason, there is no feature to automatically reconnect and so I have to log in to the UI and manually click. Having this in the HA component would be awesome!

I never saw that. Is there a way to force it to show when my connection is stable?

I’m able to force it by going to Settings > Mobile > Preferences > Network selection mode and clicking the Scan button. You’ll get a warning dialog that the modem will disconnect to scan for networks. After confirming the scan start, return to the Overview dashboard and you should see this disconnected state with the reconnect link.

Confirmed, now I see it. Okay, I will implement these things :+1:

What kind of wireline status are you looking for?

Awesome!

For Wireline I just need connected or disconnected. For Mobile, there are three statuses that I have seen: connected, standby, disconnected.

I have implemented this now. If you know how to use a custom component, this is my branch.

All five raw files must be copied to <config>/custom_components/netgear_lte/

Since the netgear_lte config is in flux, here is an example that will work with that branch:

netgear_lte:
  - host: !secret lb2120_hostname
    password: !secret lb2120_password
    notify:
      - name: sms
        recipient:
          - !secret lb2120_phone
    sensor:
      monitored_conditions:
        - sms
        - usage
        - wire_connected
        - mobile_connected

Great! I will give it a try a bit later.

Got it working in Node-RED, perfect for my use cases. Many thanks!

Maybe dumb question: with 92.1 update the services you added to set options and reconnect LTE have disappeared from HA. I still have the custom component files in place. How do I get those services back? Do I need to update my custom component files with source from another branch?

EDIT: nvm, I’m not really familiar with custom component maintenance, but I noticed that the connection control branch you pointed to had been updated since I last got the files, so I copied them all down fresh, restarted, and everything’s back now!

Glad you got it sorted. Not all the new features made it into 0.92 but they will be in 0.93, so you can delete your custom component at that time. The configuration layout got changed a bit so be sure to check the documentation when you go back to the official version.

@amelchio I would like to request one more feature in connection management. Background: my connection usually starts at LTE/4G, but after some time it degrades to 3G. When I am on site, I simply disconnect and reconnect, and that takes me back to 4G.

Can you please add the ability to disconnect the wireless connection, or perhaps add the option to “cycle” (drop and re-estabilish) the connection?

Thanks!

@Scott8586 I do not see a disconnect button in the web admin?

Probably you can force a reconnect by setting autoconnect to “never” and then back to “home”.

Thanks @amelchio, I will try this!

@Scott8586 A netgear_lte.disconnect_lte service was finally added in Home Assistant 0.98.

2 Likes