Bonjour,
J’utilise une clé 3G Huawei E3531 depuis plus d’un an et demi. Elle fonctionnait bien. Mais depuis quelque temps, j’ai constaté que les interactions SMS ne fonctionnait plus. En cherchant un peu (pas mal en fait), je pense que la clé ne reçoit plus du tout les SMS. Jeedom peut encore envoyer des SMS mais plus en recevoir.
Je précise que je n’ai pas pas fait de mis à jour, car quand ça marche, je ne touche plus à rien
Jeedom est installé dans une machine virtuelle sous Proxmox qui tourne sur un NUC Lenovo M93.
La clé est configurée comme ceci
Le démarrage se passe sans problème
[2021-08-28 16:53:29][INFO] : Lancement démon sms : /usr/bin/python /var/www/html/plugins/sms/resources/smsd/smsd.py --device /dev/ttyUSB-E3531 --loglevel debug --socketport 55002 --serialrate 115200 --pin None --textmode no --smsc +33695000695 --cycle 10 --callback http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php --apikey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --pid /tmp/jeedom/sms/deamon.pid
[2021-08-28 16:53:29][INFO] : Start smsd
[2021-08-28 16:53:29][INFO] : Log level : debug
[2021-08-28 16:53:29][INFO] : Socket port : 55002
[2021-08-28 16:53:29][INFO] : Socket host : 127.0.0.1
[2021-08-28 16:53:29][INFO] : PID file : /tmp/jeedom/sms/deamon.pid
[2021-08-28 16:53:29][INFO] : Device : /dev/ttyUSB-E3531
[2021-08-28 16:53:29][INFO] : Apikey : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[2021-08-28 16:53:29][INFO] : Callback : http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php
[2021-08-28 16:53:29][INFO] : Cycle : 10.0
[2021-08-28 16:53:29][INFO] : Serial rate : 115200
[2021-08-28 16:53:29][INFO] : Pin : None
[2021-08-28 16:53:29][INFO] : Text mode : no
[2021-08-28 16:53:29][INFO] : SMSC : +33695000695
[2021-08-28 16:53:29][DEBUG] : Writing PID 10288 to /tmp/jeedom/sms/deamon.pid
[2021-08-28 16:53:29][DEBUG] : Init request module v2.21.0
[2021-08-28 16:53:29][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-08-28 16:53:29][DEBUG] : http://127.0.0.1:80 "GET /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-08-28 16:53:29][DEBUG] : Socket interface started
[2021-08-28 16:53:29][DEBUG] : LoopNetServer Thread started
[2021-08-28 16:53:29][DEBUG] : Listening on: [127.0.0.1:55002]
[2021-08-28 16:53:29][DEBUG] : Start listening...
[2021-08-28 16:53:29][DEBUG] : Connecting to GSM Modem...
[2021-08-28 16:53:29][DEBUG] : Text mode false
[2021-08-28 16:53:29][INFO] : Connecting to modem on port /dev/ttyUSB-E3531 at 115200bps
[2021-08-28 16:53:29][DEBUG] : write: ATZ
[2021-08-28 16:53:29][DEBUG] : response: ['OK']
[2021-08-28 16:53:29][DEBUG] : write: ATE0
[2021-08-28 16:53:29][DEBUG] : response: ['OK']
[2021-08-28 16:53:29][DEBUG] : write: AT+CFUN?
[2021-08-28 16:53:29][DEBUG] : response: ['+CFUN: 1', 'OK']
[2021-08-28 16:53:29][DEBUG] : write: AT+CMEE=1
[2021-08-28 16:53:29][DEBUG] : response: ['OK']
[2021-08-28 16:53:29][DEBUG] : write: AT+CPIN?
[2021-08-28 16:53:29][DEBUG] : response: ['+CPIN: READY', 'OK']
[2021-08-28 16:53:29][DEBUG] : write: AT+CLAC
[2021-08-28 16:53:49][DEBUG] : write: AT+COPS=3,0
[2021-08-28 16:53:49][DEBUG] : response: ['OK']
[2021-08-28 16:53:49][DEBUG] : write: AT+CMGF=0
[2021-08-28 16:53:49][DEBUG] : response: ['OK']
[2021-08-28 16:53:49][DEBUG] : write: AT+CSCA?
[2021-08-28 16:53:49][DEBUG] : response: ['+CSCA: "+33695000695",145', 'OK']
[2021-08-28 16:53:49][DEBUG] : write: AT+CSMP=49,167,0,0
[2021-08-28 16:53:49][DEBUG] : response: ['OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CSCA?
[2021-08-28 16:53:50][DEBUG] : response: ['+CSCA: "+33695000695",145', 'OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CPMS=?
[2021-08-28 16:53:50][DEBUG] : response: ['+CPMS: ("SM","ME"),("SM","ME"),("SM","ME")', 'OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CPMS="ME","ME","ME"
[2021-08-28 16:53:50][DEBUG] : response: ['+CPMS: 0,20,0,20,0,20', 'OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CNMI=2,1,0,2
[2021-08-28 16:53:50][DEBUG] : response: ['OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CLIP=1
[2021-08-28 16:53:50][DEBUG] : response: ['OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CRC=1
[2021-08-28 16:53:50][DEBUG] : response: ['OK']
[2021-08-28 16:53:50][DEBUG] : write: AT+CVHU=0
[2021-08-28 16:53:50][DEBUG] : response: ['ERROR']
[2021-08-28 16:53:50][DEBUG] : Configure smsc : +33695000695
[2021-08-28 16:53:50][DEBUG] : write: AT+CSCA="+33695000695"
[2021-08-28 16:53:50][DEBUG] : response: ['OK']
[2021-08-28 16:53:50][DEBUG] : Waiting for network...
[2021-08-28 16:53:50][DEBUG] : write: AT+CREG?
[2021-08-28 16:53:50][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:53:50][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:53:51][DEBUG] : write: AT+CSQ
[2021-08-28 16:53:51][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:53:51][DEBUG] : Ok
[2021-08-28 16:53:51][DEBUG] : write: AT+COPS?
[2021-08-28 16:53:51][DEBUG] : response: ['+COPS: 0,0,"Free",2', 'OK']
[2021-08-28 16:53:51][DEBUG] : write: AT+CPMS="ME","ME","ME"
[2021-08-28 16:53:51][DEBUG] : Send to jeedom : {'message': 'Free', 'number': 'network_name'}
[2021-08-28 16:53:51][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-08-28 16:53:51][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-08-28 16:53:51][DEBUG] : response: ['+CPMS: 0,20,0,20,0,20', 'OK']
[2021-08-28 16:53:51][DEBUG] : write: AT+CMGD=1,4
[2021-08-28 16:53:51][DEBUG] : response: ['OK']
[2021-08-28 16:53:51][DEBUG] : write: AT+CPMS="SM","SM","SM"
[2021-08-28 16:53:52][DEBUG] : response: ['+CPMS: 1,50,1,50,1,50', 'OK']
[2021-08-28 16:53:52][DEBUG] : write: AT+CMGD=1,4
[2021-08-28 16:53:52][DEBUG] : response: ['OK']
[2021-08-28 16:54:02][DEBUG] : write: AT+CREG?
[2021-08-28 16:54:02][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:54:02][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:54:03][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:03][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:03][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:54:03][DEBUG] : response: ['OK']
[2021-08-28 16:54:03][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:03][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:03][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:03][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:03][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:03][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:03][DEBUG] : Send to jeedom : {'message': '23', 'number': 'signal_strength'}
[2021-08-28 16:54:03][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-08-28 16:54:03][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-08-28 16:54:13][DEBUG] : write: AT+CREG?
[2021-08-28 16:54:13][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:54:13][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:54:14][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:14][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:14][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:54:14][DEBUG] : response: ['OK']
[2021-08-28 16:54:14][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:14][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:24][DEBUG] : write: AT+CREG?
[2021-08-28 16:54:24][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:54:24][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:54:25][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:25][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:25][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:54:25][DEBUG] : response: ['OK']
[2021-08-28 16:54:25][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:25][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:54:35][DEBUG] : write: AT+CREG?
[2021-08-28 16:54:35][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:54:35][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:54:36][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:36][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:54:36][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:54:36][DEBUG] : response: ['OK']
[2021-08-28 16:54:36][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:36][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:54:36][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:36][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:54:36][DEBUG] : write: AT+CSQ
[2021-08-28 16:54:36][DEBUG] : response: ['+CSQ: 22,99', 'OK']
L’envoi d’un SMS depuis Jeedom aussi
[2021-08-28 16:55:06][DEBUG] : Client connected to [127.0.0.1:44818]
[2021-08-28 16:55:06][DEBUG] : Message read from socket: {"apikey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","number":"+33612345678","message":"C'est la box Jeedom !"}
[2021-08-28 16:55:06][DEBUG] : Client disconnected from [127.0.0.1:44818]
[2021-08-28 16:55:09][DEBUG] : write: AT+CREG?
[2021-08-28 16:55:09][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:55:09][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:55:10][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:10][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:55:10][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:55:10][DEBUG] : response: ['OK']
[2021-08-28 16:55:10][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:10][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:55:10][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:10][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:55:10][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:10][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:55:10][DEBUG] : Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-08-28 16:55:10][DEBUG] : Send to jeedom : {'message': '23', 'number': 'signal_strength'}
[2021-08-28 16:55:10][DEBUG] : write: AT+CREG?
[2021-08-28 16:55:10][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-08-28 16:55:10][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:55:10][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:55:10][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-08-28 16:55:11][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:11][DEBUG] : response: ['+CSQ: 23,99', 'OK']
[2021-08-28 16:55:11][DEBUG] : write: AT+CMGS=32
[2021-08-28 16:55:11][DEBUG] : response: ['> ']
[2021-08-28 16:55:11][DEBUG] : write: 0021000B913366271284F6000015C353794E07B1C320F11B0F5296CBE4771B1402
[2021-08-28 16:55:12][DEBUG] : response: ['+CMGS: 238', 'OK']
[2021-08-28 16:55:22][DEBUG] : write: AT+CREG?
[2021-08-28 16:55:22][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:55:22][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:55:23][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:23][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:55:23][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:55:23][DEBUG] : response: ['OK']
[2021-08-28 16:55:23][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:23][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:55:23][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:23][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:55:23][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:23][DEBUG] : response: ['+CSQ: 22,99', 'OK']
Mais la réception d’un SMS font systématiquement apparaitre 2 erreurs Exception on GSM : None
[2021-08-28 16:55:46][DEBUG] : Send to jeedom : {'message': '22', 'number': 'signal_strength'}
[2021-08-28 16:55:46][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-08-28 16:55:46][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-08-28 16:55:56][DEBUG] : write: AT+CREG?
[2021-08-28 16:55:56][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:55:56][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:55:57][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:57][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:55:57][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:55:57][DEBUG] : response: ['OK']
[2021-08-28 16:55:57][DEBUG] : write: AT+CSQ
[2021-08-28 16:55:57][DEBUG] : response: ['+CSQ: 22,99', 'OK']
[2021-08-28 16:56:07][DEBUG] : write: AT+CREG?
[2021-08-28 16:56:07][DEBUG] : response: ['+CREG: 2,1,"0D70","04B139A0"', 'OK']
[2021-08-28 16:56:07][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 16:56:08][DEBUG] : write: AT+CSQ
[2021-08-28 16:56:08][DEBUG] : response: ['+CSQ: 24,99', 'OK']
[2021-08-28 16:56:08][DEBUG] : write: AT+CMGL=0
[2021-08-28 16:56:13][ERROR] : Exception on GSM : None
[2021-08-28 16:56:23][DEBUG] : write: AT+CREG?
[2021-08-28 16:56:28][ERROR] : Exception on GSM : None
J’ai mis 2 autres cartes SIM avec code PIN cette foi (2 opérateurs différents) dans la clé, j’ai exactement le même souci : envoi seulement. Je ne pense pas que ce soit une histoire de « promenade de clé » car les 2 autres SIM testées ont l’habitude de voyager
Auriez-vous d’autres pistes d’investigation ou simplement ma clé est-elle partiellement morte ?
[EDIT] J’ai essayé le plugin Gammu, mais j’ai eu un bug de type « line JSON ».
J’ai ensuite utilisé gammu en ligne de commande et j’ai réussi à envoyer des SMS.
Mais je n’ai pas réussi à faire fonctionner le daemon gammu-smsd. le service tourne, mais pas d’émission ni de réception.
Je suis revenu au plugin officiel SMS de Jeedom et là je vois l’information qu’il reçoit les SMS.
[2021-08-28 19:48:05][DEBUG] : notification: ['+CMTI: "SM",6']
[2021-08-28 19:48:05][DEBUG] : SMS message received
[2021-08-28 19:48:05][DEBUG] : write: AT+CMGR=6
Un truc nouveau, j’ai aussi des erreurs de scripts pythons à chaque fois qu’un SMS est reçu (ou envoyé).
Exception in thread Thread-142:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/var/www/html/plugins/sms/resources/smsd/gsmmodem/modem.py", line 874, in __threadedHandleModemNotification
self._handleSmsReceived(line)
File "/var/www/html/plugins/sms/resources/smsd/gsmmodem/modem.py", line 1003, in _handleSmsReceived
sms = self.readStoredSms(msgIndex, msgMemory)
File "/var/www/html/plugins/sms/resources/smsd/gsmmodem/modem.py", line 1041, in readStoredSms
msgData = self.write('AT+CMGR={0}'.format(index))
File "/var/www/html/plugins/sms/resources/smsd/gsmmodem/modem.py", line 418, in write
responseLines = super(GsmModem, self).write(data + writeTerm, waitForResponse=waitForResponse, timeout=timeout, expectedResponseTermSeq=expectedResponseTermSeq)
File "/var/www/html/plugins/sms/resources/smsd/gsmmodem/serial_comms.py", line 139, in write
raise TimeoutException()
TimeoutException: None
La réception se termine par une erreur et toujours pas d’intéraction
[2021-08-28 19:48:12][DEBUG] : write: AT+CREG?
[2021-08-28 19:48:12][DEBUG] : response: ['AT+CMGR=6
', '+CREG: 2,1,"0D70","04B1C65F"', 'OK']
[2021-08-28 19:48:12][INFO] : +CREG check disabled due to invalid response or unsupported command
[2021-08-28 19:48:13][DEBUG] : write: AT+CSQ
[2021-08-28 19:48:13][DEBUG] : response: ['AT+CSQ
', '+CSQ: 28,99', 'OK']
[2021-08-28 19:48:13][ERROR] : Exception on GSM :
Y aurait-il une méthode pour débogger plus proprement ?