La clé est une HUAWEI E220
SI je met une rallonge :
[2022-11-09 18:28:34][INFO] : Lancement démon sms : /usr/bin/python3 /var/www/html/plugins/sms/resources/smsd/smsd.py --device /dev/ttyUSB1 --loglevel debug --socketport 55002 --serialrate 9600 --pin 0000 --textmode no --smsc None --cycle 30 --callback http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php --apikey xxxxxxxxxxxxxxxxxxxxxxxxxx --pid /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:28:34][INFO] : Start smsd
[2022-11-09 18:28:34][INFO] : Log level : debug
[2022-11-09 18:28:34][INFO] : Socket port : 55002
[2022-11-09 18:28:34][INFO] : Socket host : 127.0.0.1
[2022-11-09 18:28:34][INFO] : PID file : /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:28:34][INFO] : Device : /dev/ttyUSB1
[2022-11-09 18:28:34][INFO] : Callback : http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php
[2022-11-09 18:28:34][INFO] : Cycle : 30.0
[2022-11-09 18:28:34][INFO] : Serial rate : 9600
[2022-11-09 18:28:34][INFO] : Pin : 0000
[2022-11-09 18:28:34][INFO] : Text mode : no
[2022-11-09 18:28:34][INFO] : SMSC : None
[2022-11-09 18:28:34][DEBUG] : Writing PID 3668 to /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:28:34][DEBUG] : Init request module v2.28.0
[2022-11-09 18:28:34][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-11-09 18:28:34][DEBUG] : http://127.0.0.1:80 "GET /plugins/sms/core/php/jeeSMS.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2022-11-09 18:28:34][ERROR] : Fatal error : [Errno 98] Address already in use
[2022-11-09 18:28:34][DEBUG] : Traceback (most recent call last):
File "/var/www/html/plugins/sms/resources/smsd/smsd.py", line 259, in <module>
listen()
File "/var/www/html/plugins/sms/resources/smsd/smsd.py", line 48, in listen
jeedom_socket.open()
File "/var/www/html/plugins/sms/resources/smsd/jeedom/jeedom.py", line 314, in open
self.netAdapter = TCPServer((self.address, self.port), jeedom_socket_handler)
File "/usr/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
[2022-11-09 18:28:34][DEBUG] : Shutdown
[2022-11-09 18:28:34][DEBUG] : Removing PID file /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:28:34][DEBUG] : Exit 0
[2022-11-09 18:29:04][ERROR] : Impossible de lancer le démon sms, vérifiez le port
Avec Hub alimenté :
[2022-11-09 18:36:49][INFO] : Lancement démon sms : /usr/bin/python3 /var/www/html/plugins/sms/resources/smsd/smsd.py --device /dev/ttyUSB1 --loglevel debug --socketport 55002 --serialrate 9600 --pin 0000 --textmode no --smsc None --cycle 30 --callback http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php --apikey v4DINcQfqiIJiTfCeiYp5GuL91b5tejE9DWIK66hpb8envqZ --pid /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:36:49][INFO] : Start smsd
[2022-11-09 18:36:49][INFO] : Log level : debug
[2022-11-09 18:36:49][INFO] : Socket port : 55002
[2022-11-09 18:36:49][INFO] : Socket host : 127.0.0.1
[2022-11-09 18:36:49][INFO] : PID file : /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:36:49][INFO] : Device : /dev/ttyUSB1
[2022-11-09 18:36:49][INFO] : Callback : http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php
[2022-11-09 18:36:49][INFO] : Cycle : 30.0
[2022-11-09 18:36:49][INFO] : Serial rate : 9600
[2022-11-09 18:36:49][INFO] : Pin : 0000
[2022-11-09 18:36:49][INFO] : Text mode : no
[2022-11-09 18:36:49][INFO] : SMSC : None
[2022-11-09 18:36:49][DEBUG] : Writing PID 25219 to /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:36:49][DEBUG] : Init request module v2.28.0
[2022-11-09 18:36:49][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-11-09 18:36:49][DEBUG] : http://127.0.0.1:80 "GET /plugins/sms/core/php/jeeSMS.php?apikey= xxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2022-11-09 18:36:49][DEBUG] : Socket interface started
[2022-11-09 18:36:49][DEBUG] : LoopNetServer Thread started
[2022-11-09 18:36:49][DEBUG] : Listening on: [127.0.0.1:55002]
[2022-11-09 18:36:49][DEBUG] : Start listening...
[2022-11-09 18:36:49][DEBUG] : Connecting to GSM Modem...
[2022-11-09 18:36:49][DEBUG] : Text mode false
[2022-11-09 18:36:49][DEBUG] : Enter pin code : 0000
[2022-11-09 18:36:49][INFO] : Connecting to modem on port /dev/ttyUSB1 at 9600bps
[2022-11-09 18:36:49][DEBUG] : write: AT
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: ATZ
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write ATZ done
[2022-11-09 18:36:49][DEBUG] : write: ATE0
[2022-11-09 18:36:49][DEBUG] : response: ['ATE0
', 'OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CFUN?
[2022-11-09 18:36:49][DEBUG] : response: ['+CFUN: 1', 'OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CMEE=1
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CPIN?
[2022-11-09 18:36:49][DEBUG] : response: ['+CPIN: SIM PIN', 'OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CPIN="0000"
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CLAC
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT^CVOICE=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT+VTS=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT^DTMF=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT^USSDMODE=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT+WIND=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT+ZPAS=?
[2022-11-09 18:36:49][DEBUG] : response: ['COMMAND NOT SUPPORT']
[2022-11-09 18:36:49][DEBUG] : write: AT+CSCS=?
[2022-11-09 18:36:49][DEBUG] : response: ['+CSCS: ("IRA","GSM","UCS2")', 'OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CNUM=?
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CGMI
[2022-11-09 18:36:49][DEBUG] : response: ['huawei', 'OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CGMI
[2022-11-09 18:36:49][DEBUG] : response: ['huawei', 'OK']
[2022-11-09 18:36:49][INFO] : Loading Huawei call state update table
[2022-11-09 18:36:49][DEBUG] : write: AT+COPS=3,0
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CMGF=0
[2022-11-09 18:36:49][DEBUG] : response: ['OK']
[2022-11-09 18:36:49][DEBUG] : write: AT+CSCA?
[2022-11-09 18:36:49][DEBUG] : response: ['+CME ERROR: 14']
[2022-11-09 18:36:49][DEBUG] : Device/SIM busy error detected; self._writeWait adjusted to 0.200000s
[2022-11-09 18:36:49][DEBUG] : write: AT+CSCA?
[2022-11-09 18:36:50][DEBUG] : response: ['+CME ERROR: 14']
[2022-11-09 18:36:50][DEBUG] : Device/SIM busy error detected; self._writeWait adjusted to 0.400000s
[2022-11-09 18:36:50][DEBUG] : write: AT+CSCA?
[2022-11-09 18:36:50][DEBUG] : response: ['+CME ERROR: 14']
[2022-11-09 18:36:51][DEBUG] : Device/SIM busy error detected; self._writeWait adjusted to 0.600000s
[2022-11-09 18:36:51][DEBUG] : write: AT+CSCA?
[2022-11-09 18:36:51][DEBUG] : response: ['+CSCA: "+33660003000",145', 'OK']
[2022-11-09 18:36:52][DEBUG] : self_writeWait set to 0.1 because of recovering from device busy (515) error
[2022-11-09 18:36:52][DEBUG] : self_writeWait set to 0.1 because of recovering from device busy (515) error
[2022-11-09 18:36:52][DEBUG] : self_writeWait set to 0.1 because of recovering from device busy (515) error
[2022-11-09 18:36:52][DEBUG] : write: AT+CSMP=49,167,0,0
[2022-11-09 18:36:52][DEBUG] : response: ['OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CSCA?
[2022-11-09 18:36:52][DEBUG] : response: ['+CSCA: "+33660003000",145', 'OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CPMS=?
[2022-11-09 18:36:52][DEBUG] : response: ['+CPMS: ("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","MT","SM","SR")', 'OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CPMS="ME","ME","ME"
[2022-11-09 18:36:52][DEBUG] : response: ['+CPMS: 0,255,0,255,0,255', 'OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CNMI=2,1,0,2
[2022-11-09 18:36:52][DEBUG] : response: ['OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CLIP=1
[2022-11-09 18:36:52][DEBUG] : response: ['OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CRC=1
[2022-11-09 18:36:52][DEBUG] : response: ['OK']
[2022-11-09 18:36:52][DEBUG] : write: AT+CVHU=0
[2022-11-09 18:36:52][DEBUG] : response: ['OK']
[2022-11-09 18:36:52][DEBUG] : Waiting for network...
[2022-11-09 18:36:52][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:52][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:53][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:53][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:54][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:54][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:55][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:55][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:56][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:56][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:57][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:57][DEBUG] : response: ['+CREG: 0,2', 'OK']
[2022-11-09 18:36:58][DEBUG] : write: AT+CREG?
[2022-11-09 18:36:58][ERROR] : Global listen exception of type PortNotOpenError occurred: Attempting to use a port that is not open
[2022-11-09 18:36:58][DEBUG] : Send to jeedom : {'number': 'none', 'message': 'Attempting to use a port that is not open'}
[2022-11-09 18:36:58][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-11-09 18:36:58][ERROR] : Exit 1 because this exeption is fatal
[2022-11-09 18:36:58][DEBUG] : Shutdown
[2022-11-09 18:36:58][DEBUG] : Removing PID file /tmp/jeedom/sms/deamon.pid
[2022-11-09 18:36:58][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey= xxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2022-11-09 18:36:58][DEBUG] : LoopNetServer Thread stopped
[2022-11-09 18:36:58][DEBUG] : Exit 0
Test avec une clé HUAWEI E3372 LTE avec ou sans hub : Je n’ai pas de port SMS