Huawei 3G modem with domoticz

Compatibility (hardware, devices and OS)
Post Reply
Posts: 32
Joined: Monday 11 August 2014 23:23
Target OS: Raspberry Pi
Domoticz version:

Huawei 3G modem with domoticz

Post by smq » Sunday 03 April 2016 10:36

Hello friends,

I connected huawei 3g modem to my Raspberry PI via USB to add possibility to receive SMS commands and send SMSes to me with information when for example alarm is raised. I know that in domoticz is possible to use clickatel but I wan't to became independent of external service in case of lost internet connection.
I configured gammu-sms deamon and I can sending smses from linux console like that (using bash script):

Code: Select all

[email protected] ~ $ echo "text to be send" | sudo gammu-smsd-inject TEXT XXXXXXXXX
where XXXXXXXXX is of course my phone number.

The problem is when I'm trying to initiate the script from the domoticz.
I created dummy switch and in section "On action" I put this command:

Code: Select all

in script is the same command like above. When I'm switching on the switch, then script is launching but sms is not comming out by gammu ;(
I getting an error:

Code: Select all

Sun 2016/04/03 10:33:45 gammu-smsd[16640]: Error in outbox on 'OUTC20160303_103321_00_+48XXXXXXXXX_sms0.smsbackup'
So then I need to kill gammu, remove outbox files from /var/spool/gammu/outbox and lanuch gammu again.
It's really strange, because script is working properly when I'm launching manually (from pi user and root as well).
Anybody have a

Posts: 5
Joined: Wednesday 27 May 2015 11:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Austria

Re: Huawei 3G modem with domoticz

Post by Reinz » Sunday 10 April 2016 21:21

I made something similar, but with SMS Servertools3 and had the problem that the sms deamon could not move the text files (for the sms) in the spool directory from "outgoing" to "sent" due owner ship problems.

Here is my solution

Posts: 78
Joined: Wednesday 16 September 2015 22:10
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Paris area, France

Re: Huawei 3G modem with domoticz

Post by oliviers » Sunday 10 April 2016 21:53

Another solution to send SMS from DOMOTICZ is to install SMS GATEWAY (Available on Google Play) on an Adroid phone (In my case, I use an old phone just for this purpose -- of course it must have a SIM card!). It creates an SMS server on the phone.
Then from DOMOTICZ one can send SMS by inserting this command in a script:

Code: Select all

wget ""$txt

Where: is the [email protected]/port of the SMS Gateway server in the Android phone
0123456789 is the destination phone number
txt contains the text to be sent

No need to sign up with clikatel!
Paris area
Raspberry Pi 2B - RFXComm 433 - IrTrans - Zwave

Posts: 36
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland

Re: Huawei 3G modem with domoticz

Post by mayyam » Tuesday 21 February 2017 13:54

Can You point to app You are using ? It's a few of them.
- Raspberry Pi 2
- RFLink 433Mhz / NRF 2.4GHz
- different species of ESP

Posts: 1
Joined: Tuesday 25 July 2017 11:23
Target OS: Linux
Domoticz version:

Re: Huawei 3G modem with domoticz

Post by MegaBOOBLIK » Tuesday 25 July 2017 11:46

1. folder

2. file

Code: Select all


# Write ./ MESSAGE
# Phone numbers separated by a space
PHONE="22222222222 3333333333 4444444444"

for p in $PHONE
  echo $1 | gammu sendsms TEXT $p -unicode
exit 0
3. Events
10.png (10.8 KiB) Viewed 260 times
P.S. if u wana check gammu just
echo TEST | gammu sendsms TEXT 12345678901

12345678901 - phone number

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests