Send SMS with USB GSM modem when alarm triggered

Hi,
I found the way to create /etc/udev/rules.d/10-gsm-modem.rules and now I have 3 USB new ports:
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3

why 3 ports?

I tried to use them in SMS integration but I receive always problem to connection to device…how I can solve?

I have to insert before SIM card in HUAWEI E3531 key?

Hi, did you have any luck getting this to work? Mine worked fine until about october 2021, since then it has the same problem as yours.

Not yet, I will try again.
I just re-installed the HAO
I will keep you posted

@Oscar_Calvo hi. Can you give us some help here? It is a USB device with SIM800C like the one you have in the list of compatible devices. It worked like a charm until a few months ago, it configured by integration and it worked fine. Now through the integration it is not detected, if you manually add it to config.yaml, the notification of a new device appears in HA but it always fails to connect when trying to configure it.
Thanks

@Oscar_Calvo
I bought the SIM800C as linked from the docs.
unfurtunately i get this error when i am trying to add it.

  • Failed to initialize, error ERR_TIMEOUT
  • Failed to initialize, error ERR_DEVICEOPENERROR

I have tried adding it by it’s ID, /dev/ttyUSB3 and /dev/gsm-modem as created in my 10.local.rules, but still geting this issue.
If i remove the simcard i get error for no simcard and no operator instead.

ls -l /dev/

crw-------    1 root     root       10,  61 Oct 12 15:24 ashmem
crw-r--r--    1 root     root       10, 235 Oct 12 15:24 autofs
drwxr-xr-x    2 root     root           760 Oct 12 15:24 block
drwxr-xr-x    2 root     root            60 Jan  1  1970 bsg
crw-------    1 root     root       10, 234 Oct 12 15:24 btrfs-control
drwxr-xr-x    3 root     root            60 Jan  1  1970 bus
crw-------    1 root     root       10,  62 Oct 12 15:24 cachefiles
drwxr-xr-x    2 root     root          3160 Feb  3 14:15 char
crw-------    1 root     root        5,   1 Feb  3 13:11 console
crw-------    1 root     root       10,  60 Oct 12 15:24 cpu_dma_latency
crw-------    1 root     root       10, 203 Oct 12 15:24 cuse
drwxr-xr-x    8 root     root           160 Oct 12 15:24 disk
drwxr-xr-x    2 root     root            80 Jan  1  1970 dma_heap
lrwxrwxrwx    1 root     root            13 Oct 12 15:24 fd -> /proc/self/fd
crw-rw-rw-    1 root     root        1,   7 Oct 12 15:24 full
crw-rw-rw-    1 root     root       10, 229 Oct 12 15:24 fuse
crw-------    1 root     root      254,   0 Oct 12 15:24 gpiochip0
crw-------    1 root     root      254,   1 Oct 12 15:24 gpiochip1
crw-------    1 root     root      254,   2 Oct 12 15:24 gpiochip2
crw-------    1 root     root      245,   0 Oct 12 15:24 gpiomem
lrwxrwxrwx    1 root     root             7 Feb  3 14:15 gsm-modem -> ttyUSB3
crw-------    1 root     root       10, 183 Oct 12 15:24 hwrng
crw-------    1 root     root       89,   0 Oct 12 15:24 i2c-0
crw-------    1 root     root       89,   1 Oct 12 15:24 i2c-1
crw-------    1 root     root       89,  10 Oct 12 15:24 i2c-10
crw-------    1 root     root       89,  22 Oct 12 15:24 i2c-22
drwxr-xr-x    2 root     root            60 Jan  1  1970 input
crw-r--r--    1 root     root        1,  11 Oct 12 15:24 kmsg
crw-rw-rw-    1 root     kvm        10, 232 Oct 12 15:24 kvm
lrwxrwxrwx    1 root     root            28 Oct 12 15:24 log -> /run/systemd/journal/dev-log
crw-rw----    1 root     disk       10, 237 Oct 12 15:24 loop-control
brw-rw----    1 root     disk        7,   0 Oct 12 15:24 loop0
brw-rw----    1 root     disk        7,   1 Oct 12 15:24 loop1
brw-rw----    1 root     disk        7,   2 Oct 12 15:24 loop2
brw-rw----    1 root     disk        7,   3 Oct 12 15:24 loop3
brw-rw----    1 root     disk        7,   4 Oct 12 15:24 loop4
brw-rw----    1 root     disk        7,   5 Oct 12 15:24 loop5
brw-rw----    1 root     disk        7,   6 Oct 12 15:24 loop6
brw-rw----    1 root     disk        7,   7 Oct 12 15:24 loop7
drwxr-xr-x    2 root     root            60 Oct 12 15:24 mapper
crw-rw----    1 root     video     251,   0 Oct 12 15:24 media0
crw-rw----    1 root     video     251,   1 Oct 12 15:24 media1
crw-r-----    1 root     kmem        1,   1 Oct 12 15:24 mem
drwxrwxrwt    2 root     root            40 Jan  1  1970 mqueue
drwxr-xr-x    2 root     root            60 Jan  1  1970 net
crw-rw-rw-    1 root     root        1,   3 Oct 12 15:24 null
crw-r-----    1 root     kmem        1,   4 Oct 12 15:24 port
crw-------    1 root     root      108,   0 Oct 12 15:24 ppp
crw-rw-rw-    1 root     tty         5,   2 Feb  3 14:25 ptmx
drwxr-xr-x    2 root     root             0 Oct 12 15:24 pts
brw-rw----    1 root     disk        1,   0 Oct 12 15:24 ram0
brw-rw----    1 root     disk        1,   1 Oct 12 15:24 ram1
brw-rw----    1 root     disk        1,  10 Oct 12 15:24 ram10
brw-rw----    1 root     disk        1,  11 Oct 12 15:24 ram11
brw-rw----    1 root     disk        1,  12 Oct 12 15:24 ram12
brw-rw----    1 root     disk        1,  13 Oct 12 15:24 ram13
brw-rw----    1 root     disk        1,  14 Oct 12 15:24 ram14
brw-rw----    1 root     disk        1,  15 Oct 12 15:24 ram15
brw-rw----    1 root     disk        1,   2 Oct 12 15:24 ram2
brw-rw----    1 root     disk        1,   3 Oct 12 15:24 ram3
brw-rw----    1 root     disk        1,   4 Oct 12 15:24 ram4
brw-rw----    1 root     disk        1,   5 Oct 12 15:24 ram5
brw-rw----    1 root     disk        1,   6 Oct 12 15:24 ram6
brw-rw----    1 root     disk        1,   7 Oct 12 15:24 ram7
brw-rw----    1 root     disk        1,   8 Oct 12 15:24 ram8
brw-rw----    1 root     disk        1,   9 Oct 12 15:24 ram9
crw-rw-rw-    1 root     root        1,   8 Oct 12 15:24 random
drwxr-xr-x    2 root     root            60 Jan  1  1970 raw
crw-rw-r--    1 root     root       10, 242 Oct 12 15:24 rfkill
crw-------    1 root     root      236,   0 Oct 12 15:24 rpivid-h264mem
crw-------    1 root     root      238,   0 Oct 12 15:24 rpivid-hevcmem
crw-------    1 root     root      237,   0 Oct 12 15:24 rpivid-intcmem
crw-------    1 root     root      235,   0 Oct 12 15:24 rpivid-vp9mem
brw-rw----    1 root     disk        8,   0 Oct 12 15:24 sda
brw-rw----    1 root     disk        8,   1 Oct 12 15:24 sda1
brw-rw----    1 root     disk        8,   2 Oct 12 15:24 sda2
brw-rw----    1 root     disk        8,   3 Oct 12 15:24 sda3
brw-rw----    1 root     disk        8,   4 Oct 12 15:24 sda4
brw-rw----    1 root     disk        8,   5 Oct 12 15:24 sda5
brw-rw----    1 root     disk        8,   6 Feb  3 13:12 sda6
brw-rw----    1 root     disk        8,   7 Oct 12 15:24 sda7
brw-rw----    1 root     disk        8,   8 Oct 12 15:24 sda8
drwxr-xr-x    4 root     root            80 Oct 12 15:24 serial
lrwxrwxrwx    1 root     root             7 Oct 12 15:24 serial1 -> ttyAMA0
drwxrwxrwt    2 root     root            40 Oct 12 15:24 shm
drwxr-xr-x    3 root     root           140 Oct 12 15:24 snd
lrwxrwxrwx    1 root     root            15 Oct 12 15:24 stderr -> /proc/self/fd/2
lrwxrwxrwx    1 root     root            15 Oct 12 15:24 stdin -> /proc/self/fd/0
lrwxrwxrwx    1 root     root            15 Oct 12 15:24 stdout -> /proc/self/fd/1
crw-rw-rw-    1 root     tty         5,   0 Oct 12 15:24 tty
crw--w----    1 root     tty         4,   0 Oct 12 15:24 tty0
crw--w----    1 root     tty         4,   1 Feb  3 13:12 tty1
crw--w----    1 root     tty         4,  10 Oct 12 15:24 tty10
crw--w----    1 root     tty         4,  11 Oct 12 15:24 tty11
crw--w----    1 root     tty         4,  12 Oct 12 15:24 tty12
crw--w----    1 root     tty         4,  13 Oct 12 15:24 tty13
crw--w----    1 root     tty         4,  14 Oct 12 15:24 tty14
crw--w----    1 root     tty         4,  15 Oct 12 15:24 tty15
crw--w----    1 root     tty         4,  16 Oct 12 15:24 tty16
crw--w----    1 root     tty         4,  17 Oct 12 15:24 tty17
crw--w----    1 root     tty         4,  18 Oct 12 15:24 tty18
crw--w----    1 root     tty         4,  19 Oct 12 15:24 tty19
crw--w----    1 root     tty         4,   2 Oct 12 15:24 tty2
crw--w----    1 root     tty         4,  20 Oct 12 15:24 tty20
crw--w----    1 root     tty         4,  21 Oct 12 15:24 tty21
crw--w----    1 root     tty         4,  22 Oct 12 15:24 tty22
crw--w----    1 root     tty         4,  23 Oct 12 15:24 tty23
crw--w----    1 root     tty         4,  24 Oct 12 15:24 tty24
crw--w----    1 root     tty         4,  25 Oct 12 15:24 tty25
crw--w----    1 root     tty         4,  26 Oct 12 15:24 tty26
crw--w----    1 root     tty         4,  27 Oct 12 15:24 tty27
crw--w----    1 root     tty         4,  28 Oct 12 15:24 tty28
crw--w----    1 root     tty         4,  29 Oct 12 15:24 tty29
crw--w----    1 root     tty         4,   3 Oct 12 15:24 tty3
crw--w----    1 root     tty         4,  30 Oct 12 15:24 tty30
crw--w----    1 root     tty         4,  31 Oct 12 15:24 tty31
crw--w----    1 root     tty         4,  32 Oct 12 15:24 tty32
crw--w----    1 root     tty         4,  33 Oct 12 15:24 tty33
crw--w----    1 root     tty         4,  34 Oct 12 15:24 tty34
crw--w----    1 root     tty         4,  35 Oct 12 15:24 tty35
crw--w----    1 root     tty         4,  36 Oct 12 15:24 tty36
crw--w----    1 root     tty         4,  37 Oct 12 15:24 tty37
crw--w----    1 root     tty         4,  38 Oct 12 15:24 tty38
crw--w----    1 root     tty         4,  39 Oct 12 15:24 tty39
crw--w----    1 root     tty         4,   4 Oct 12 15:24 tty4
crw--w----    1 root     tty         4,  40 Oct 12 15:24 tty40
crw--w----    1 root     tty         4,  41 Oct 12 15:24 tty41
crw--w----    1 root     tty         4,  42 Oct 12 15:24 tty42
crw--w----    1 root     tty         4,  43 Oct 12 15:24 tty43
crw--w----    1 root     tty         4,  44 Oct 12 15:24 tty44
crw--w----    1 root     tty         4,  45 Oct 12 15:24 tty45
crw--w----    1 root     tty         4,  46 Oct 12 15:24 tty46
crw--w----    1 root     tty         4,  47 Oct 12 15:24 tty47
crw--w----    1 root     tty         4,  48 Oct 12 15:24 tty48
crw--w----    1 root     tty         4,  49 Oct 12 15:24 tty49
crw--w----    1 root     tty         4,   5 Oct 12 15:24 tty5
crw--w----    1 root     tty         4,  50 Oct 12 15:24 tty50
crw--w----    1 root     tty         4,  51 Oct 12 15:24 tty51
crw--w----    1 root     tty         4,  52 Oct 12 15:24 tty52
crw--w----    1 root     tty         4,  53 Oct 12 15:24 tty53
crw--w----    1 root     tty         4,  54 Oct 12 15:24 tty54
crw--w----    1 root     tty         4,  55 Oct 12 15:24 tty55
crw--w----    1 root     tty         4,  56 Oct 12 15:24 tty56
crw--w----    1 root     tty         4,  57 Oct 12 15:24 tty57
crw--w----    1 root     tty         4,  58 Oct 12 15:24 tty58
crw--w----    1 root     tty         4,  59 Oct 12 15:24 tty59
crw--w----    1 root     tty         4,   6 Oct 12 15:24 tty6
crw--w----    1 root     tty         4,  60 Oct 12 15:24 tty60
crw--w----    1 root     tty         4,  61 Oct 12 15:24 tty61
crw--w----    1 root     tty         4,  62 Oct 12 15:24 tty62
crw--w----    1 root     tty         4,  63 Oct 12 15:24 tty63
crw--w----    1 root     tty         4,   7 Oct 12 15:24 tty7
crw--w----    1 root     tty         4,   8 Oct 12 15:24 tty8
crw--w----    1 root     tty         4,   9 Oct 12 15:24 tty9
crw-rw----    1 root     dialout   204,  64 Feb  3 13:10 ttyAMA0
crw-rw----    1 root     dialout   188,   0 Feb  3 14:25 ttyUSB0
crw-rw----    1 root     dialout   188,   1 Feb  3 13:12 ttyUSB1
crw-rw----    1 root     dialout   188,   3 Feb  3 14:23 ttyUSB3
crw-------    1 root     root        5,   3 Oct 12 15:24 ttyprintk
crw-------    1 root     root       10, 239 Oct 12 15:24 uhid
crw-------    1 root     root       10, 223 Oct 12 15:24 uinput
crw-rw-rw-    1 root     root        1,   9 Oct 12 15:24 urandom
drwxr-xr-x    3 root     root            60 Oct 12 15:24 v4l
crw-------    1 root     root      247,   0 Oct 12 15:24 vc-mem
crw-------    1 root     root      241,   0 Oct 12 15:24 vchiq
crw-------    1 root     root      246,   0 Oct 12 15:24 vcio
crw-rw----    1 root     tty         7,   0 Oct 12 15:24 vcs
crw-rw----    1 root     tty         7,   1 Oct 12 15:24 vcs1
crw-rw----    1 root     tty         7,   2 Feb  3 13:10 vcs2
crw-rw----    1 root     tty         7,   3 Feb  3 13:10 vcs3
crw-rw----    1 root     tty         7,   4 Feb  3 13:10 vcs4
crw-rw----    1 root     tty         7,   5 Feb  3 13:10 vcs5
crw-rw----    1 root     tty         7,   6 Feb  3 13:10 vcs6
crw-rw----    1 root     tty         7, 128 Oct 12 15:24 vcsa
crw-rw----    1 root     tty         7, 129 Oct 12 15:24 vcsa1
crw-rw----    1 root     tty         7, 130 Feb  3 13:10 vcsa2
crw-rw----    1 root     tty         7, 131 Feb  3 13:10 vcsa3
crw-rw----    1 root     tty         7, 132 Feb  3 13:10 vcsa4
crw-rw----    1 root     tty         7, 133 Feb  3 13:10 vcsa5
crw-rw----    1 root     tty         7, 134 Feb  3 13:10 vcsa6
crw-rw-rw-    1 root     root       10,  59 Oct 12 15:24 vcsm-cma
crw-rw----    1 root     tty         7,  64 Oct 12 15:24 vcsu
crw-rw----    1 root     tty         7,  65 Oct 12 15:24 vcsu1
crw-rw----    1 root     tty         7,  66 Feb  3 13:10 vcsu2
crw-rw----    1 root     tty         7,  67 Feb  3 13:10 vcsu3
crw-rw----    1 root     tty         7,  68 Feb  3 13:10 vcsu4
crw-rw----    1 root     tty         7,  69 Feb  3 13:10 vcsu5
crw-rw----    1 root     tty         7,  70 Feb  3 13:10 vcsu6
crw-------    1 root     root       10,  63 Oct 12 15:24 vga_arbiter
crw-------    1 root     root       10, 137 Oct 12 15:24 vhci
crw-rw-rw-    1 root     kvm        10, 238 Oct 12 15:24 vhost-net
crw-rw----    1 root     video      81,   0 Oct 12 15:24 video10
crw-rw----    1 root     video      81,   5 Oct 12 15:24 video11
crw-rw----    1 root     video      81,   6 Oct 12 15:24 video12
crw-rw----    1 root     video      81,   1 Oct 12 15:24 video13
crw-rw----    1 root     video      81,   2 Oct 12 15:24 video14
crw-rw----    1 root     video      81,   3 Oct 12 15:24 video15
crw-rw----    1 root     video      81,   4 Oct 12 15:24 video16
crw-rw----    1 root     video      81,   7 Oct 12 15:24 video18
crw-------    1 root     root       10, 130 Oct 12 15:24 watchdog
crw-------    1 root     root      249,   0 Oct 12 15:24 watchdog0
lrwxrwxrwx    1 root     root             7 Oct 12 15:24 z-wave-usb -> ttyUSB1
crw-rw-rw-    1 root     root        1,   5 Oct 12 15:24 zero
lrwxrwxrwx    1 root     root             7 Oct 12 15:24 zigbee-usb -> ttyUSB0
brw-rw----    1 root     disk      254,   0 Oct 12 15:24 zram0
brw-rw----    1 root     disk      254,   1 Oct 12 15:24 zram1
brw-rw----    1 root     disk      254,   2 Oct 12 15:24 zram2
# ls -l /dev/*USB*
crw-rw----    1 root     dialout   188,   0 Feb  3 14:25 /dev/ttyUSB0
crw-rw----    1 root     dialout   188,   1 Feb  3 13:12 /dev/ttyUSB1
crw-rw----    1 root     dialout   188,   3 Feb  3 14:23 /dev/ttyUSB3
# lsusb
Bus 001 Device 007: ID 1a86:7523
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 004: ID 1a86:7523
Bus 001 Device 003: ID 05e3:0608
Bus 001 Device 002: ID 2109:3431
Bus 002 Device 002: ID 174c:1156
Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 005: ID 10c4:ea60
# ls -l /dev/*tty*
crw-rw-rw-    1 root     tty         5,   0 Oct 12 15:24 /dev/tty
crw--w----    1 root     tty         4,   0 Oct 12 15:24 /dev/tty0
crw--w----    1 root     tty         4,   1 Feb  3 13:12 /dev/tty1
crw--w----    1 root     tty         4,  10 Oct 12 15:24 /dev/tty10
crw--w----    1 root     tty         4,  11 Oct 12 15:24 /dev/tty11
crw--w----    1 root     tty         4,  12 Oct 12 15:24 /dev/tty12
crw--w----    1 root     tty         4,  13 Oct 12 15:24 /dev/tty13
crw--w----    1 root     tty         4,  14 Oct 12 15:24 /dev/tty14
crw--w----    1 root     tty         4,  15 Oct 12 15:24 /dev/tty15
crw--w----    1 root     tty         4,  16 Oct 12 15:24 /dev/tty16
crw--w----    1 root     tty         4,  17 Oct 12 15:24 /dev/tty17
crw--w----    1 root     tty         4,  18 Oct 12 15:24 /dev/tty18
crw--w----    1 root     tty         4,  19 Oct 12 15:24 /dev/tty19
crw--w----    1 root     tty         4,   2 Oct 12 15:24 /dev/tty2
crw--w----    1 root     tty         4,  20 Oct 12 15:24 /dev/tty20
crw--w----    1 root     tty         4,  21 Oct 12 15:24 /dev/tty21
crw--w----    1 root     tty         4,  22 Oct 12 15:24 /dev/tty22
crw--w----    1 root     tty         4,  23 Oct 12 15:24 /dev/tty23
crw--w----    1 root     tty         4,  24 Oct 12 15:24 /dev/tty24
crw--w----    1 root     tty         4,  25 Oct 12 15:24 /dev/tty25
crw--w----    1 root     tty         4,  26 Oct 12 15:24 /dev/tty26
crw--w----    1 root     tty         4,  27 Oct 12 15:24 /dev/tty27
crw--w----    1 root     tty         4,  28 Oct 12 15:24 /dev/tty28
crw--w----    1 root     tty         4,  29 Oct 12 15:24 /dev/tty29
crw--w----    1 root     tty         4,   3 Oct 12 15:24 /dev/tty3
crw--w----    1 root     tty         4,  30 Oct 12 15:24 /dev/tty30
crw--w----    1 root     tty         4,  31 Oct 12 15:24 /dev/tty31
crw--w----    1 root     tty         4,  32 Oct 12 15:24 /dev/tty32
crw--w----    1 root     tty         4,  33 Oct 12 15:24 /dev/tty33
crw--w----    1 root     tty         4,  34 Oct 12 15:24 /dev/tty34
crw--w----    1 root     tty         4,  35 Oct 12 15:24 /dev/tty35
crw--w----    1 root     tty         4,  36 Oct 12 15:24 /dev/tty36
crw--w----    1 root     tty         4,  37 Oct 12 15:24 /dev/tty37
crw--w----    1 root     tty         4,  38 Oct 12 15:24 /dev/tty38
crw--w----    1 root     tty         4,  39 Oct 12 15:24 /dev/tty39
crw--w----    1 root     tty         4,   4 Oct 12 15:24 /dev/tty4
crw--w----    1 root     tty         4,  40 Oct 12 15:24 /dev/tty40
crw--w----    1 root     tty         4,  41 Oct 12 15:24 /dev/tty41
crw--w----    1 root     tty         4,  42 Oct 12 15:24 /dev/tty42
crw--w----    1 root     tty         4,  43 Oct 12 15:24 /dev/tty43
crw--w----    1 root     tty         4,  44 Oct 12 15:24 /dev/tty44
crw--w----    1 root     tty         4,  45 Oct 12 15:24 /dev/tty45
crw--w----    1 root     tty         4,  46 Oct 12 15:24 /dev/tty46
crw--w----    1 root     tty         4,  47 Oct 12 15:24 /dev/tty47
crw--w----    1 root     tty         4,  48 Oct 12 15:24 /dev/tty48
crw--w----    1 root     tty         4,  49 Oct 12 15:24 /dev/tty49
crw--w----    1 root     tty         4,   5 Oct 12 15:24 /dev/tty5
crw--w----    1 root     tty         4,  50 Oct 12 15:24 /dev/tty50
crw--w----    1 root     tty         4,  51 Oct 12 15:24 /dev/tty51
crw--w----    1 root     tty         4,  52 Oct 12 15:24 /dev/tty52
crw--w----    1 root     tty         4,  53 Oct 12 15:24 /dev/tty53
crw--w----    1 root     tty         4,  54 Oct 12 15:24 /dev/tty54
crw--w----    1 root     tty         4,  55 Oct 12 15:24 /dev/tty55
crw--w----    1 root     tty         4,  56 Oct 12 15:24 /dev/tty56
crw--w----    1 root     tty         4,  57 Oct 12 15:24 /dev/tty57
crw--w----    1 root     tty         4,  58 Oct 12 15:24 /dev/tty58
crw--w----    1 root     tty         4,  59 Oct 12 15:24 /dev/tty59
crw--w----    1 root     tty         4,   6 Oct 12 15:24 /dev/tty6
crw--w----    1 root     tty         4,  60 Oct 12 15:24 /dev/tty60
crw--w----    1 root     tty         4,  61 Oct 12 15:24 /dev/tty61
crw--w----    1 root     tty         4,  62 Oct 12 15:24 /dev/tty62
crw--w----    1 root     tty         4,  63 Oct 12 15:24 /dev/tty63
crw--w----    1 root     tty         4,   7 Oct 12 15:24 /dev/tty7
crw--w----    1 root     tty         4,   8 Oct 12 15:24 /dev/tty8
crw--w----    1 root     tty         4,   9 Oct 12 15:24 /dev/tty9
crw-rw----    1 root     dialout   204,  64 Feb  3 13:10 /dev/ttyAMA0
crw-rw----    1 root     dialout   188,   0 Feb  3 14:25 /dev/ttyUSB0
crw-rw----    1 root     dialout   188,   1 Feb  3 13:12 /dev/ttyUSB1
crw-rw----    1 root     dialout   188,   3 Feb  3 14:23 /dev/ttyUSB3
crw-------    1 root     root        5,   3 Oct 12 15:24 /dev/ttyprintk
# ls -l /etc/udev/rules.d/*.rules
-rw-r--r--    1 root     root           315 Feb  3 12:21 /etc/udev/rules.d/10.local.rules
# ls -l /dev/serial/by-id/
lrwxrwxrwx    1 root     root            13 Feb  3 14:15 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB3
lrwxrwxrwx    1 root     root            13 Oct 12 15:24 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx    1 root     root            13 Oct 12 15:24 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_8a1e26945584e911877a4992d6f3a178-if00-port0 -> ../../ttyUSB1

Also it is worth mentioning i am on a RPi4-4gb using Home Assistant OS

Edit: After closer inspection, i figured that the SIM800C wasn’t supplied with enough power and powercycled, added a powered USB hub and it works.

Hi, all !

I purchased a SIM800C USB modem and planned to use it to send/receive SMS. But after connecting to Synology’s USB port, I still couldn’t connect the device.
Command lsusb -l in Synology shows the connected device, just like a Docker container does.

Telnet Synology:
LOGIN@HOST:/dev$ lsusb -i
|__usb1 1d6b:0002:0404 09 2.00 480MBit/s 0mA 1IF (Linux 4.4.180+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
|__1-1 1a86:7523:0264 ff 1.10 12MBit/s 98mA 1IF ( ffffffd8ffffffb9ffffffd0ffffffa2)
** 1-1:1.0 (IF) ff:01:02 3EPs ()**

Container in Docker:
bash-5.1# lsusb -i
Bus 001 Device 009: ID 1a86:7523
Bus 001 Device 008: ID 1bcf:0c31
Bus 001 Device 003: ID f400:f400
Bus 002 Device 004: ID 174c:5106
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003

When entering the SMS configuration in configuration.yaml, HA throws an error:
Invalid config for [sms]: No device at /dev/ttyUSB1 found for dictionary value @ data[‘sms’][‘device’]. Got ‘/dev/ttyUSB1’. (See /config/configuration.yaml, line 320).

Please tell me how can I connect the device?

P.s. The SIM card is activated. I check with a call from my mobile to SIM800C.
HA ver: Home Assistant 2021.12.10

I had similar issue
what i did:

check the sim orientation

remove integration
reboot

in case it doesn’t work… one time I re-installed ha from scratch. in this case it worked without any issues

2 Likes

I installed the SIM card correctly. When I call from my mobile device on SIM800C, I get a call.
Now I have found how to connect in Docker container to Synology USB devices.
Path to devices:
sms:
device: /dev/bus/usb

HA automatically prompted me to install GSM SMS intagration, but it also doesn’t see the device when I run the integration. I tried to substitute the device ID, but it does not determine it.

Additionally, I started the HA container in privileged mode and added permissions to access USB devices:
Added a rule: /etc/udev/rules.d/99-serial.rules
Inside the rule: KERNEL==“ttyUSB[0-9]*”,MODE=“0666”
Perhaps this also helped.

But I still can’t connect the modem… :neutral_face:

I know’t why I not see GSM modem in configuration wizard SMS integration… I can’t add screenshot :frowning:

When registering in a GSM network, should the LED on the modem flash? My modem is not making any beeps. For verification, I only have the opportunity to call the modem and get the correct call. When I disconnect the modem from the USB port and make a call from my smartphone - I get “the subscriber is not available”, but when I plug the modem into the USB port I get a beep to call the subscriber.

I did some work and found out that Synology OS 7 does not have USB/COM chip drivers CH340/341.

  1. community
  2. List of USB ID’s

google search:

  1. Can’t rebuild ch341.c driver in kernel
  2. Get serial devices working on Synology DS216+II DiskStation

I haven’t seen the option to install these drivers yet. But it seems to me that this is the problem.

I installed SIMCOM_Ltd (SIMCOM_SIM800) Revision:1308B02SIM800M32_BT

sudo gammu sendsms TEXT -text “Ohhai”
If you want break, press Ctrl+C…
test passed, I received SMS.

I planned to use it to send SMS, but in home assistant I see

Logger: homeassistant.components.sms.notify
Source: components/sms/notify.py:68
Integration: SMS notifications via GSM-modem (documentation, issues)
First occurred: 22:02:54 (3 occurrences)
Last logged: 22:06:02
Sending to … failed: ERR_UNKNOWN

How I test the sms gateway in HA?

@Oscar_Calvo - wondering if you want to look at this. I switched my sim from a 3G Huawei USB modem to a 4G ZTE USB modem, and I’m getting ERR_GETTING_SMSC when I try to send.

  • This SIM worked with the integration unmodified in my 3G modem, problem only started when switched to the 4G modem
  • The correct SMSC is on the SIM, when I do AT+CSCA? I get a response of +CSCA: "+12063130004",145 and that is correct for my carrier (T-Mobile in US)
  • I am able to send SMS messages in putty using +CMGS
  • I am able to receive SMS using the integration without any modifications
  • I am able to send SMS using the integration, but only when I load it as a custom component and hardcode the SMSC as described by @googanhiem in reply 326

So I have it working when loaded as a custom component, but would like to help have it working in the main component which would open up another inexpensive 4G USB device for people to use.

Problem on Pi4 after upgrading to Home Assistant OS 7.5

Hello, I use a Huawei E3531 Surf Stick to send SMS. Every thing was working nicely on My PI4 running core-2022.3.5 this morning until I upgraded to Home Assistant OS 7.5.

After reboot (I did it several times), I have this 3 error messages:

1/
Logger: homeassistant.components.notify
Source: components/notify/legacy.py:75
Integration: Notifications (documentation, issues)
First occurred: 14:15:33 (5 occurrences)
Last logged: 14:15:33

Failed to initialize notification service sms

2/
Logger: homeassistant.components.sms.notify
Source: components/sms/notify.py:24
Integration: SMS notifications via GSM-modem (documentation, issues)
First occurred: 14:15:33 (5 occurrences)
Last logged: 14:15:33

SMS gateway not found, cannot initialize service

3/
Logger: homeassistant.components.sms.gateway
Source: components/sms/gateway.py:169
Integration: SMS notifications via GSM-modem (documentation, issues)
First occurred: 14:15:33 (1 occurrences)
Last logged: 14:15:33

Failed to initialize, error ERR_TIMEOUT

I updated to OS 7.5 today and my sms is still working. It looks like it isn’t seeing your modem, did you go to the system hardware page and see if the modem is still showing there?

Can you follow these steps?

  1. Remove SMS integration.
  2. Reboot the host device
  3. Add the SMS integration again.
1 Like

Hi @novamostra , I am working on getting support for custom baud speed in the configuration settings for SMS.
To use this, you will need to remove the current SMS and add it again.

Support custom baud speed by ocalvo · Pull Request #68320 · home-assistant/core (github.com)

Thank you Oscar,

By removing, Rebooting end adding the integration, I recovered the SMS integration and SMS send/recv is OK

The modem changed from /dev/ttyUSB3 to /dev/ttyUSB4 (The cause is maybe coming from in January, I added a Zigbee USB key),

Hi all,
Thanks @Oscar_Calvo for your great works and advises.
Following this topic I get my SIM800C working with my home assistant OS.
If this can help here is the sum up of what is working for me.
My home assistant version is :

Core 2022.6.0
Supervisor 2022.05.3
OS 8.1

1/ The module I bought (I have no commercial link or any discount by giving this link…) is

https://fr.aliexpress.com/item/1005002857211359.html

2/ getting the device id using the command

ls -l /dev/serial/by-id

3/ writting the folowing config in the configuration.yaml

sms:
  device: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  notify:
   - platform: sms
     name: sms_person1
     recipient: "+33XXXX"

4/ integrate the GSM-modem (was automaticly discovered for me)

On Node Red, got send sms and received working with the folowing config.
6/ to receive sms

module in node red : "event all"
Server : home assistant
event type : sms.incoming_sms

7/ to send sms

module in node red : "call service"
Server : my home assistant server
domain : notify
service : sms_person1

in detail below the data expression

{
  "message":"Hello I am your house and I received your message :' " &
   payload.event.text & "' le " & payload.event.date & " from number " &
   payload.event.phone 
}

The Full flow I use to test the connexion that re-send sms with data previously received by sms (using the config descrbie upper)

But I Stil have an issue. I am not able to update the phone number from node red.
I tried to change the recipient in configuration.yaml to a variable and update it in a node red script , but it is not working.

Does any one have an idea please ?

Thanks,
Best regards

Other information,
I tryed to read the source code, and it seems that the number can comes from the config (like i did)
and can comes from another place like it is mention in the notify.py

  if discovery_info is None:
        number = config[CONF_RECIPIENT]
   else:
        number = discovery_info[CONF_RECIPIENT]

does any one now where the discovery_info array comes from
or what is the procedure if I would to custom the code to do some tests on my own?

Thanks

Not the response you’re expecting, but doing it in yaml might be easier (there’s already a post above indicating how to do it)

Anyway, can you try to remove country code from the notification configuration or use 00 instead of + ? I tried two SIM cards from different operators and one of them required country code, whilst the other didn’t.