Skip to main content

Huawei LTE smart home integration, free and open source

Huawei LTE integration for Gladys Assistant

Signal, data usage and SMS of a Huawei 4G/5G router, with scenes and a dashboard widget.

This integration connects Gladys to a Huawei 4G/5G router or HiLink USB stick (B310, B315, B525, B535, B618, B818, E5186, E5576, E3372h, 5G CPE…). It shows the signal, the data rates and the data used this month, sends SMS from your scenes and starts a scene when an SMS arrives or the connection drops.

Before you start​

  • Gladys 5.3 or later is required.
  • Gladys must reach the router on your local network: open its web page (usually http://192.168.8.1) from the computer that runs Gladys to check.
  • Have the password of the router web page at hand. Everything stays on your network: the integration never uses the internet nor a Huawei account.

Configuration​

FieldWhat to put
Router addressThe address of its web page, http://192.168.8.1 by default
Usernameadmin on almost every model
PasswordThe password of the web page; empty for a HiLink stick without login
Refresh interval (s)How often the router is read (15 to 3600 s, 60 by default)
Watch incoming SMSStarts the "An SMS is received" trigger for each new message
Mark handled SMS as readMarks the message read on the router once the trigger fired
Control buttons on the dashboardShows "Send an SMS", "Mobile data" and "Reboot" on the widget (off by default)

Then click Test the connection: the answer gives the model, the operator, the network type and the signal. Send a test SMS checks the SIM card can send messages.

What you get in Gladys​

Once the router is read, it appears in the Discovery tab. Add it: it brings these features.

FeatureUnitNotes
Signal (bars)0 to 5As the router shows it
RSRP, RSRQ, SINRdBm, dBRadio quality, useful to place the router
Internet connected0 / 11 when the mobile connection is up
Download / upload rateMbit/sCurrent rates
Data downloaded / uploadedGBThis month, as counted by the router
Connected forminutesLength of the current connection
Mobile dataon / offThe only feature you can control
Unread SMSnumber
Network type, operatortexte.g. LTE+, Orange F
WAN IP addresstextThe address given by the operator

A value your model does not give is simply not shown.

Scenes​

Triggers​

  • An SMS is received: a new message arrived in the router inbox. You can keep only one sender (the number exactly as the router shows it, e.g. +33612345678). The scene gets the sender, the message and the date.
  • The internet connection changes: the router connects, loses the mobile network, or stops answering ("Router unreachable"). Pick the states you want. The scene gets the new and previous state, the network type and the operator.

Actions​

  • Send an SMS: to up to 5 numbers separated by commas. The message can use scene variables (e.g. the temperature of a sensor).
  • Reboot the router: internet is cut for one to three minutes. The "Router unreachable" the reboot causes does not start a scene.

Dashboard widget​

The Huawei LTE router widget shows the signal, the rates, the data used this month, the connection, the network type, the operator and the unread SMS. The WAN IP address is hidden unless you turn on Show the WAN IP address in the widget settings.

The buttons that act on the router (Send an SMS, Mobile data, Reboot) only appear when Control buttons on the dashboard is on in the configuration: anyone who sees the dashboard can use them.

SMS​

  • At the very first start, the messages already waiting in the inbox do not start any scene: only the ones received afterwards do.
  • With Mark handled SMS as read off, the integration remembers the messages it already handled (in its own storage), so a restart does not start the same scene twice.
  • New messages are seen at each refresh (60 s by default).
  • Huawei routers store a limited number of messages: empty the inbox from time to time from the router web page.

Troubleshooting​

MessageWhat to do
The router does not answerCheck the address, and that Gladys runs on the same network as the router
The router refused the username or passwordRetype the password of the web page. The integration waits 10 minutes before trying it again
The router locked its loginToo many wrong attempts: wait a few minutes, then test again
The router asks for a loginFill in the password

The router allows only a few sessions at once: if its web page says too many users are logged in, log out of the web page or wait a few minutes.

Privacy and security​

  • The password is stored by Gladys as a secret and only sent to the router.
  • The integration only talks to the router address you gave, on your local network.
  • The content of SMS is only given to your scenes, never written to the logs.

Configuration settings​

These are the settings Huawei LTE asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoThe integration talks to your Huawei router on your local network, like its web page does: give it the router address and the password of its web page (the one you use on http://192.168.8.1). Nothing goes through the internet or a Huawei account.
Router addressstringYesAddress of the router web page, usually http://192.168.8.1.
UsernamestringNoUser of the router web page, almost always admin.
PasswordsecretNoPassword of the router web page. Leave empty for a HiLink USB stick without login.
Refresh interval (s)numberNoHow often the router is read, in seconds (15 to 3600). New SMS are seen at the same pace.
Watch incoming SMSbooleanNoFire the "SMS received" scene trigger for each new message.
Mark handled SMS as readbooleanNoOnce the trigger fired, the message is marked read on the router.
Control buttons on the dashboardbooleanNoShow "Send an SMS", "Mobile data" and "Reboot" on the widget. Anyone who sees the dashboard can use them.

How to install Huawei LTE in Gladys​

  1. In Gladys, open Integrations: Huawei LTE appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/prohand/gladys-huawailte:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/prohand/gladys-huawailte.

Huawei LTE requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Huawei LTE is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by prohand, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂