[RESOLU]Erreur utilisation gammu-smsd et run on receive.py
Publié : 13 oct. 2021, 21:41
Bonjour,
J'aurai besoin d'aide pour résoudre cette erreur, j'utilise gammu-smsd depuis plusieurs semaines sur un pc -Debian buster.
A priori depuis une mise à jour de DEBIAN, plus moyen d'utiliser le script de DEENNOO dans ce tuto (Il Fonctionnait parfaitement auparavant)
http://domo-attitude.fr/communiquer-sms ... em-usb-3g/
Le script d'origine (Je l'ai modifié avec le bon port chez moi et modifié le numéro de tel dans la partie "erreur")
receivesms.py:
L'erreur que je rencontre maintenant:
Une aide serait Précieuse ,
Merci par avance
Cdt
Bertrand
J'aurai besoin d'aide pour résoudre cette erreur, j'utilise gammu-smsd depuis plusieurs semaines sur un pc -Debian buster.
A priori depuis une mise à jour de DEBIAN, plus moyen d'utiliser le script de DEENNOO dans ce tuto (Il Fonctionnait parfaitement auparavant)
http://domo-attitude.fr/communiquer-sms ... em-usb-3g/
Le script d'origine (Je l'ai modifié avec le bon port chez moi et modifié le numéro de tel dans la partie "erreur")
receivesms.py:
Code : Tout sélectionner
#!/usr/bin/python
import os
import sys
import urllib
#Mise a jour dans Domoticz
DOMO_IP="127.0.0.1" # Addresse IP de Domoticz
DOMO_PORT="8080" # Port de Domoticz
IDX="11" # Index de la variable "sms"
urllib.urlopen("http://"+DOMO_IP+":"+DOMO_PORT+"/json.htm?type=command¶m=updateuservariable&idx="+IDX+"&vname=sms&vtype=2&vvalue="+urllib.quote(os.environ['SMS_1_TEXT'])+";"+urllib.quote(os.environ['SMS_1_NUMBER']))
L'erreur que je rencontre maintenant:
Code : Tout sélectionner
gammu-smsd.service - SMS daemon for Gammu
Loaded: loaded (/lib/systemd/system/gammu-smsd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-10-13 20:42:53 CEST; 1min 59s ago
Docs: man:gammu-smsd(1)
Process: 1799 ExecStart=/usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon (code=exited, status=0/SUCCESS)
Main PID: 1800 (gammu-smsd)
Tasks: 1 (limit: 4440)
Memory: 5.0M
CGroup: /system.slice/gammu-smsd.service
└─1800 /usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon
oct. 13 20:42:53 debian2540p systemd[1]: gammu-smsd.service: Failed to parse PID from file /run/gammu-smsd.pid: Invalid argument
oct. 13 20:42:53 debian2540p gammu-smsd[1800]: Created POSIX RW shared memory at 0x7ffa3639c000
oct. 13 20:42:53 debian2540p gammu-smsd[1800]: Starting phone communication...
oct. 13 20:42:53 debian2540p systemd[1]: Started SMS daemon for Gammu.
oct. 13 20:44:12 debian2540p gammu-smsd[1800]: Ignoring incoming SMS info as not a Status Report in SR memory.
oct. 13 20:44:13 debian2540p gammu-smsd[1800]: Read 1 messages
oct. 13 20:44:13 debian2540p gammu-smsd[1800]: Received IN20211013_204359_00_+33xxxxxxxxx_00.txt
oct. 13 20:44:13 debian2540p gammu-smsd[1835]: Starting run on receive: /root/gammu/receivesms.py IN20211013_204359_00_+33xxxxxxxxx_00.txt
oct. 13 20:44:13 debian2540p gammu-smsd[1800]: Process failed with exit status 1
oct. 13 20:44:13 debian2540p gammu-smsd[1800]: Subprocess output: /usr/lib/python2.7/getpass.py:83: GetPassWarning: Can not control echo on
passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Enter password for <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</
File "/root/gammu/receivesms.py", line 11, in <module>
urllib.urlopen("http://"+DOMO_IP+":"+DOMO_PORT+"/json.htm?type=command¶m=updateuserva
File "/usr/lib/python2.7/urllib.py", line 87, in urlopen
return opener.open(url)
File "/usr/lib/python2.7/urllib.py", line 216, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 367, in open_http
return self.http_error(url, fp, errcode, errmsg, headers)
File "/usr/lib/python2.7/urllib.py", line 380, in http_error
result = method(url, fp, errcode, errmsg, headers)
File "/usr/lib/python2.7/urllib.py", line 707, in http_error_401
return getattr(self,name)(url, realm)
File "/usr/lib/python2.7/urllib.py", line 771, in retry_http_basic_auth
user, passwd = self.get_user_passwd(host, realm, i)
lines 1-38
Une aide serait Précieuse ,
Merci par avance
Cdt
Bertrand