j’ai essayé de reproduire la fonction disco (http://domo-attitude.fr/milight-domotic ... es-discos/) (en jouant un peu plus) malheuresement j’ai une erreur domoticz a l’execution :
Code : Tout sélectionner
Error: Error opening url: http://127.0.0.1/json.htm?param=switchlight&type=command&idx=25&switchcmd=OffCode : Tout sélectionner
https://127.0.0.1:443/json.htm?param=switchlight&type=command&idx=25&switchcmd=Offmais depuis domoticz ou depuis le shell avec curl, ca ne marche pas;
Shell avec curl :
Code : Tout sélectionner
pi@raspberrypi:~/domoticz $ curl -k -vvv https://127.0.0.1:443/json.htm?param=switchlight&type=command&idx=25&switchcmd=Off
[1] 11719
[2] 11720
[3] 11721
[2]- Done type=command
pi@raspberrypi:~/domoticz $ * Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: C=NL; ST=MyState; O=Domoticz; L=Domoticz; CN=*.domoticz.com; OU=Unit51; emailAddress=your@email.com
* start date: 2015-05-23 06:49:02 GMT
* expire date: 2025-05-20 06:49:02 GMT
* issuer: C=NL; ST=MyState; O=Domoticz; L=Domoticz; CN=*.domoticz.com; OU=Unit51; emailAddress=your@email.com
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /json.htm?param=switchlight HTTP/1.1
> User-Agent: curl/7.38.0
> Host: 127.0.0.1
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 91
< Content-Type: text/html
< Set-Cookie: SID=none; HttpOnly; path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT
<
* Connection #0 to host 127.0.0.1 left intact
<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
Avez-vous une idée ?