Hello,
j'ai lancé le plugin en mode debug pour savoir pourquoi je n'avais pas de réponses de ma clé.
J'ai cà :
DEBUG: write: AT+CREG?
DEBUG: response: ['+CREG: 0,1', 'OK']
DEBUG: write: AT+CSQ
DEBUG: response: ['+CSQ: 13,99', 'OK']
DEBUG: write: AT+CMGL=0
DEBUG: response: ['+CMS ERROR: 500']
J'ai trouve pour :
AT+CREG = registration status
AT+CSQ = Signal quality
Mais pas pour AT+CMGL
bien que j'ai vu ca :
Multiple SMS Messages in the Information Response
If there are multiple SMS messages to be returned, the information response of the +CMGL AT command will contain more than one "+CMGL: ...". Two characters, <CR><LF>, are used to delimit two "+CMGL: ...". Here is an example for illustration. Suppose the command line 'AT+CMGL="ALL"' is executed and three SMS messages are listed. If all characters are shown, the command line and the response returned will be displayed like this:
AT+CMGL="ALL"<CR>
<CR><LF>+CMGL: ...<CR><LF>+CMGL: ...<CR><LF>+CMGL: ...<CR><LF>
<CR><LF>OK<CR><LF>
Mais je ne comprends pas
Merci
EDIT :
Après un test de reception de sms "test" :
2015-03-04 12:22:20,684 - Thread-8 - smscmd:185 - DEBUG - Got SMS message : <gsmmodem.modem.ReceivedSms object at 0x7f3492b2e6d0>
DEBUG: Got SMS message : <gsmmodem.modem.ReceivedSms object at 0x7f3492b2e6d0>
2015-03-04 12:22:20,685 - Thread-8 - smscmd:188 - DEBUG - Execute shell : /usr/bin/php /usr/share/nginx/www/jeedom/plugins/sms/ressources/smscmd/../../core/php/jeeSMS.php number="+xxxxxxxx" message="test
"
DEBUG: Execute shell : /usr/bin/php /usr/share/nginx/www/jeedom/plugins/sms/ressources/smscmd/../../core/php/jeeSMS.php number="+xxxxxxxx" message="test
"
2015-03-04 12:22:20,685 - Thread-9 - smscmd:108 - DEBUG - Thread started, timeout = 10
DEBUG: Thread started, timeout = 10
PHP Warning: Illegal string offset 'message' in /usr/share/nginx/www/jeedom/plugins/sms/core/class/sms.class.php on line 223
PHP Warning: socket_connect(): unable to connect [111]: Connection refused in /usr/share/nginx/www/jeedom/plugins/sms/core/class/sms.class.php on line 225
PHP Warning: socket_write(): unable to write to socket [32]: Broken pipe in /usr/share/nginx/www/jeedom/plugins/sms/core/class/sms.class.php on line 226
2015-03-04 12:22:20,818 - Thread-4 - smscmd:137 - DEBUG - Client connected to [127.0.0.1:42267]
DEBUG: Client connected to [127.0.0.1:42267]
2015-03-04 12:22:20,819 - Thread-4 - smscmd:140 - DEBUG - Message read from socket: {"number":"+xxxxxxx","message":"Je ne comprends pas "}
DEBUG: Message read from socket: {"number":"+xxxxxx","message":"Je ne comprends pas "}
2015-03-04 12:22:20,819 - Thread-4 - smscmd:142 - DEBUG - Client disconnected from [127.0.0.1:42267]
DEBUG: Client disconnected from [127.0.0.1:42267]
2015-03-04 12:22:20,827 - Thread-9 - smscmd:111 - DEBUG - Return code: 0
DEBUG: Return code: 0
2015-03-04 12:22:20,827 - Thread-9 - smscmd:112 - DEBUG - Thread finished
DEBUG: Thread finished
DEBUG: write: AT+CSQ
DEBUG: response: ['+CSQ: 12,99', 'OK']
DEBUG: write: AT+CMGL=0
DEBUG: response: ['OK']
DEBUG: write: AT+CSQ
DEBUG: response: ['+CSQ: 12,99', 'OK']
2015-03-04 12:22:21,275 - MainThread - smscmd:363 - DEBUG - Message received in socket messageQueue
DEBUG: Message received in socket messageQueue
2015-03-04 12:22:21,275 - MainThread - smscmd:365 - DEBUG - Message : {"number":"+xxxxxxxx","message":"Je ne comprends pas "}
DEBUG: Message : {"number":"+xxxxxx","message":"Je ne comprends pas "}
Savez vous pourquoi ces warning ?