/Huawei-LTE-Router-SMS-to-E-mail-Sender

Check and send Huawei LTE router SMS by general smtp.

Primary LanguagePythonMIT LicenseMIT

Huawei LTE Router SMS to E-mail Sender

The python script can help you read your sms from e-mail box.

Tested on:

  • HUAWEI B315s-22
  • HUAWEI B525s-65a

if you success use for other huawei router, you can feedback for me.

Operational content

  1. Find the unread SMS
  2. Send the SMS context via email
  3. Set has been read status for this SMS
  4. Loop to step 1

How to use

  1. copy .env.example to .env
$ cp .env.example .env
$ vim .env
  1. just run it!
$ python3 check-sms.py

Via Docker

This image on DockerHub

View on Docker Hub

$ docker run -e HUAWEI_ROUTER_PASSWORD=<password> -e GMAIL_ACCOUNT=<gmail-account> -e GMAIL_PASSWORD=<gmail-password> -e MAIL_RECIPIENT=<your-email-address> -d awei/huawei-lte-router-sms-to-email-sender

Necessary Environment Variables

  • HUAWEI_ROUTER_PASSWORD Huawei router login password (example: 123456)
  • GMAIL_ACCOUNT gmail account for smtp login (example: user@gmail.com)
  • GMAIL_PASSWORD gmail password for smtp login (example: P@ssw0rd)
  • MAIL_RECIPIENT Comma separated recipient (example: user1@livemail.tw,user2@gmail.com)

Option Environment Variables

  • HUAWEI_ROUTER_IP_ADDRESS Huawei router IP address (default: 192.168.8.1)
  • HUAWEI_ROUTER_ACCOUNT Huawei router login account (default: admin)
  • DELAY_SECOND Waiting seconds for each check (default: 10)
  • LOCALE Set lang (default: en_US, support en_US, zh_TW, zh_HK, zh_CN)

Related Projects

License

The python script is open-sourced software licensed under the MIT license.