-
Compteur de contenus
14 385 -
Inscription
-
Dernière visite
-
Jours gagnés
249
Tout ce qui a été posté par mprinfo
-
Réorganisation arborescence
mprinfo a répondu à un(e) sujet de Moicphil dans Annonces et suggestions
@moicphil pour le moment je laisserai comme cela on verra bien ensuite enfin je suis comme toi je sais pas trop c'est vrai que si tu mets quick app dans HC3 il faudrait mettre aussi Scènes et déclencheur @jojo tu t’ennuie plus de mise a jour sur lifedomus -
@tonyc non sur HC2 tu peux retiré un module qui n'existe plus ou que tu ne veux plus alors si j'ai un module qui crame ou que je reset il reste a vie dans ma HC3 ? Pas besoin de support la HC3 c'est pour jouer. Et ma HC2 n'est pas encore prête a prendre ça retraite
-
C'est ce que je fais j'ai inclus un smoke est voila la résultat je l'ai exclus avec ma clef zwave je veux le supprimer je fais un ctrl+F5 il est toujours la NOP sending succeeded. The device has not been removed. Please use Learning Mode to remove it traduction L'envoi du NOP a réussi. L'appareil n'a pas été retiré. Veuillez utiliser le mode d'apprentissage pour le supprimer
-
petit bug ou plutôt manque une option pour supprimer un module z-wave il est impossible de supprimer un module sans devoir faire une exclusion Le soucis c'est que si j’exclus le module avec un autre controleur ou simple je fais un reset du module le module va rester a vie dans la HC3
-
C'est bien ce que je dis [emoji16] Envoyé de mon BLA-L29 en utilisant Tapatalk
- 499 réponses
-
- gen8
- microserveur
- (et 10 en plus)
-
Hello esxi 7 ne fonctionne pas sous gen8 Envoyé de mon BLA-L29 en utilisant Tapatalk
- 499 réponses
-
- gen8
- microserveur
- (et 10 en plus)
-
Sous debian c'est bon cela fonctionne a chaque fois j'ai pas mal chercher car je sais pas pourquoi il a fallu mettre un \n a la fin de $TOKEN mais cela fonctionne MODEM_IP="192.168.8.1" set echo off curl -s -X GET "http://$MODEM_IP/api/webserver/SesTokInfo" > ses_tok.xml COOKIE=`grep "SessionID=" ses_tok.xml | cut -b 10-147` TOKEN=`grep "TokInfo" ses_tok.xml | cut -b 10-41` # Login LOGIN_REQ="<request><Username>admin</Username><Password>YWRtaW4=</Password><password_type>3</password_type></request>" curl -X POST -d $LOGIN_REQ "http://$MODEM_IP/api/user/login" -H "Cookie: $COOKIE" -H "__RequestVerificationToken: $TOKEN" -H "Content-Type: text/xml" --dump-header login_resp_hdr.txt > /dev/null grep "SessionID=" login_resp_hdr.txt | cut -d ':' -f2 | cut -d ';' -f1 > session_id.txt grep "__RequestVerificationTokenone" login_resp_hdr.txt | cut -d ':' -f2 > token.txt SESSION_ID=`cat session_id.txt` TOKEN=`cat token.txt` echo "admin session_id\n$SESSION_ID\n" message_data='<request><Index>-1</Index><Phones><Phone>0637839778</Phone></Phones><Sca></Sca><Content>bonjour</Content><Length>7</Length><Reserved>1</Reserved><Date>1</Date></request>' echo $TOKEN sleep 1 curl -X POST -d $message_data "http://$MODEM_IP/api/sms/send-sms" -H "Cookie: $SESSION_ID" -H "__RequestVerificationToken: $TOKEN\n" -H "Content-Type: text/xml"
-
je viens de comprendre c'est la liste des tokens les 2 premiers sont extrait response.headers['__RequestVerificationToken'] response.headers['__RequestVerificationTokenone'] response.headers['__RequestVerificationTokentwo'] response.headers['__RequestVerificationToken'] f6Gn4H+VFLWH5rKs8GLAx0WPegbJexoy # tokenone ppvn+Gym61sZi1zHtS2OKqhsrkdtwmuX # tokentwo Sg8LpZVPmNxtVwGOz9zuJBdXgj6VIhGj # /oeu8bb0iW0y4ifyXB9CVpukytGLTMHF # slRpL9Y73aITYreHK2OmXGUlAgvj8PEE # eorIJQcLwc0bdoEIVtlI6doNs+Mxm5qi # p0GvRflZz1nDdfNKAjWi5ziUHCKZjyzG # v3M5a4Ru1lrK9jv4gbFsNexSIAd0kt8m # 3cVd+fi/bWfe6Cdt+ffI4AKLWeGtATz5 # iaOa4xM7tr9lx55h6yDZco8kqRA6JSih # UjHbwgVjtBeFkSG8bGrnkxsnxx1stef0 # 4VymZPatzVsILsLxehqJMjmJJT4C8i2z # Nd1UdIGqlAg2mv57L9hpi4s2ASXPV/TG # sUnsfmik7JCuSJzJ7umIRGmcICNKKE4W # pk93h+F7i3UFJaydUIpeucIags75vZED # 1Oei3S/dnnTkFl3RoFrO+XoA/TD7/xkY # /tw2KJ6FHIvBog54CGKKRcUGbHA4CH1r # TU7ksjRG/5Yv/CLnuhUr9BWD99KvK8gd # 2ZcTOCJNY5P0JgHEsfnEE74c1F4FmQmM # bew3Sj2gKUCOM8rvRbEbEC/bkrXe0vlw # j1rRclNKb2QzAW7jWb8sOaRoKr5yXPCH # U5ntsyW6iGKwonoGwgu6PFIewdnvuU1/ # Bfhxtng78qiGJ9HX8lXqaj4IQGWD80sk # 6meOxzmGsGdh+9HCw7f3uCYilHucx/sM # CIUdMCTf8R85IiJWLmKIEueu/Bpj625b # 63S3dvr6nqnI8P4BVf5+SHWmiQdD0xu8 # ckMs1qfSTxLgnM9FBAxkJ+BZ9XBOvZun # Udkw+97IC1DvaMwIa8s7vp0sxV3mRS0r # +sERIEUctQx7Lf9t7QOaZLWgeNdAgK9X # L0RmzlSV/yx9gfbFnNE8Z1T5LaqrtSZi # Cm9NFeAzJvyu5VuvpdtBYPE++gkwKkNH # XXFe4uWR8OWSKQYK/2nwjU0pZY4xxnsV #
-
Ca avance plutôt bien via l'api le password et de type 4 donc base64 + SHA256 Je sais pas pourquoi mais cela tombe bien j'arrive a me connecté avec un password type 3 juste le mot de passe en base 64 Je récupère le cookie (SessionID=xxxxxxxxxxxxxxxxxxxxxxxxxxx) et le token comme cela print("/api/webserver/SesTokInfo") self.http:request(self.controller .. "api/webserver/SesTokInfo", { options = { checkCertificate = false, method = 'GET', }, success = function(response) --print(json.encode(response.data)) if response.status == 200 then self.cookie = response.data local len = string.len(self.cookie) print(len) --277 self.Token = string.sub(self.cookie, 221, 252)--SesInfo self.cookie = string.sub(self.cookie, 62, 199)--TokInfo --self.cookie = string.sub(self.cookie, 72, 199) print("Cookie : ",self.cookie) print("Token : ",self.Token) self:loginUnifi(self.cookie) --self:test(self.cookie) end end, error = function(error) self.cookie = nil self:error("checkTitreUnifi() échoué: ", json.encode(error)) self:updateView("Titre", "text", "Controleur UNIFi - checkVersionUnifi() échoué: "..json.encode(error)) end }) pour me connecté avec le mot de passe local LOGIN_REQ = "<request><Username>admin</Username><Password>YWRtaW4=</Password><password_type>3</password_type></request>" self.http:request(self.controller .. "api/user/login", { options = { checkCertificate = false, method = 'POST', headers = { ['Cookie'] = self.cookie , ["content-type"] = "text/xml", ['__RequestVerificationToken'] = self.Token }, data = LOGIN_REQ }, success = function(response) print("*********************************************************************************************************************") print(response.status) print("DATA ---------------------------------------------------------------------------------------------------------------------") print(response.data) if response.status == 200 then --print("response---------------------------------------------------------------------------------------------------------------") --print (json.encode(response)) print("response.headers ------------------------------------------------------------------------------------------------------") for k, v in pairs (response.headers) do print( k.." = "..v ) end print("-----------------------------------") print(response.headers['Set-Cookie']) self.NEWCookie = response.headers['Set-Cookie'] self.RequestVerificationTokenone = response.headers['__RequestVerificationTokenone'] self.RequestVerificationTokentwo = response.headers['__RequestVerificationTokentwo'] self.RequestVerificationToken = response.headers['__RequestVerificationToken'] print(self.NEWCookie) print(self.RequestVerificationTokenone) print(self.RequestVerificationTokentwo) print (self.RequestVerificationToken) --self.cookie = response.headers['Set-Cookie'] --self:debug("loginUnifi() Connecté") self:updateView("Titre", "text", "Routeur 4G (Connecté)") end end, error = function(error) self:updateView("Titre", "text", "Controleur UNIFi - loginUnifi() Erreur: "..json.encode(error)) self:error("loginUnifi() Erreur: ", json.encode(error)) end }) resultat [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: /api/webserver/SesTokInfo [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: 277 [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Cookie : SessionID=7ABN3zTcqPyMUQcdRbY1vxvNhnw5fJLgbr4cLjVlzjeQiMoGDvYIgPHRcoHTfKH2PYgSWi/KVx4u9cbmXzNbzu/jmkcy39zxFFWplmP58kV3cdbgm9mdXnUvqgT0KK2W [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Token : jeZbl+GQq7B/yCWLsNBpss7PPZg/tSRJ [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: ********************************************************************************************************************* [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: 200 [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: DATA --------------------------------------------------------------------------------------------------------------------- [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: OK [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: response.headers ------------------------------------------------------------------------------------------------------ [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Content-Type = text/html [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Server = mini_httpd/1.19 19dec2003 [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Cache-Control = no-cache, no-store [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: __RequestVerificationTokentwo = ppvn+Gym61sZi1zHtS2OKqhsrkdtwmuX [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Date = Thu, 01 Jan 1970 00:00:00 GMT [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Pragma = no-cache [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Connection = close [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Set-Cookie = SessionID=kTSE88RERyta8gOU6dTws/t+PMs88QExc3Av2VyF6lz0E/t6kdm2Shzivb7p3WYo1oZMgfHEKNcaXh874t4V7LFC2UpASG8aSg7cAXWxGbvn8QsynJ8z6ZpnH/q+uAMu;path =/;HttpOnly; [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Content-Length = 61 [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: X-Frame-Options = deny [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: X-Download-Options = noopen [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: Strict-Transport-Security = max-age=31536000; includeSubdomains [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: X-XSS-Protection = 1; mode=block [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: __RequestVerificationTokenone = f6Gn4H+VFLWH5rKs8GLAx0WPegbJexoy [06.06.2020] [08:01:32] [DEBUG] [QUICKAPP30]: __RequestVerificationToken = f6Gn4H+VFLWH5rKs8GLAx0WPegbJexoy#ppvn+Gym61sZi1zHtS2OKqhsrkdtwmuX#Sg8LpZVPmNxtVwGOz9zuJBdXgj6VIhGj#/oeu8bb0iW0y4ifyXB9CVpukytGLTMHF#slRpL9Y73aITYreHK2OmXGUlAgvj8PEE#eorIJQcLwc0bdoEIVtlI6doNs+Mxm5qi#p0GvRflZz1nDdfNKAjWi5ziUHCKZjyzG#v3M5a4Ru1lrK9jv4gbFsNexSIAd0kt8m#3cVd+fi/bWfe6Cdt+ffI4AKLWeGtATz5#iaOa4xM7tr9lx55h6yDZco8kqRA6JSih#UjHbwgVjtBeFkSG8bGrnkxsnxx1stef0#4VymZPatzVsILsLxehqJMjmJJT4C8i2z#Nd1UdIGqlAg2mv57L9hpi4s2ASXPV/TG#sUnsfmik7JCuSJzJ7umIRGmcICNKKE4W#pk93h+F7i3UFJaydUIpeucIags75vZED#1Oei3S/dnnTkFl3RoFrO+XoA/TD7/xkY#/tw2KJ6FHIvBog54CGKKRcUGbHA4CH1r#TU7ksjRG/5Yv/CLnuhUr9BWD99KvK8gd#2ZcTOCJNY5P0JgHEsfnEE74c1F4FmQmM#bew3Sj2gKUCOM8rvRbEbEC/bkrXe0vlw#j1rRclNKb2QzAW7jWb8sOaRoKr5yXPCH#U5ntsyW6iGKwonoGwgu6PFIewdnvuU1/#Bfhxtng78qiGJ9HX8lXqaj4IQGWD80sk#6meOxzmGsGdh+9HCw7f3uCYilHucx/sM#CIUdMCTf8R85IiJWLmKIEueu/Bpj625b#63S3dvr6nqnI8P4BVf5+SHWmiQdD0xu8#ckMs1qfSTxLgnM9FBAxkJ+BZ9XBOvZun#Udkw+97IC1DvaMwIa8s7vp0sxV3mRS0r#+sERIEUctQx7Lf9t7QOaZLWgeNdAgK9X#L0RmzlSV/yx9gfbFnNE8Z1T5LaqrtSZi#Cm9NFeAzJvyu5VuvpdtBYPE++gkwKkNH#XXFe4uWR8OWSKQYK/2nwjU0pZY4xxnsV# si je regarde de plus prêt __RequestVerificationToken f6Gn4H+VFLWH5rKs8GLAx0WPegbJexoy # tokenone ppvn+Gym61sZi1zHtS2OKqhsrkdtwmuX # tokentwo Sg8LpZVPmNxtVwGOz9zuJBdXgj6VIhGj # /oeu8bb0iW0y4ifyXB9CVpukytGLTMHF # slRpL9Y73aITYreHK2OmXGUlAgvj8PEE # eorIJQcLwc0bdoEIVtlI6doNs+Mxm5qi # p0GvRflZz1nDdfNKAjWi5ziUHCKZjyzG # v3M5a4Ru1lrK9jv4gbFsNexSIAd0kt8m # 3cVd+fi/bWfe6Cdt+ffI4AKLWeGtATz5 # iaOa4xM7tr9lx55h6yDZco8kqRA6JSih # UjHbwgVjtBeFkSG8bGrnkxsnxx1stef0 # 4VymZPatzVsILsLxehqJMjmJJT4C8i2z # Nd1UdIGqlAg2mv57L9hpi4s2ASXPV/TG # sUnsfmik7JCuSJzJ7umIRGmcICNKKE4W # pk93h+F7i3UFJaydUIpeucIags75vZED # 1Oei3S/dnnTkFl3RoFrO+XoA/TD7/xkY # /tw2KJ6FHIvBog54CGKKRcUGbHA4CH1r # TU7ksjRG/5Yv/CLnuhUr9BWD99KvK8gd # 2ZcTOCJNY5P0JgHEsfnEE74c1F4FmQmM # bew3Sj2gKUCOM8rvRbEbEC/bkrXe0vlw # j1rRclNKb2QzAW7jWb8sOaRoKr5yXPCH # U5ntsyW6iGKwonoGwgu6PFIewdnvuU1/ # Bfhxtng78qiGJ9HX8lXqaj4IQGWD80sk # 6meOxzmGsGdh+9HCw7f3uCYilHucx/sM # CIUdMCTf8R85IiJWLmKIEueu/Bpj625b # 63S3dvr6nqnI8P4BVf5+SHWmiQdD0xu8 # ckMs1qfSTxLgnM9FBAxkJ+BZ9XBOvZun # Udkw+97IC1DvaMwIa8s7vp0sxV3mRS0r # +sERIEUctQx7Lf9t7QOaZLWgeNdAgK9X # L0RmzlSV/yx9gfbFnNE8Z1T5LaqrtSZi # Cm9NFeAzJvyu5VuvpdtBYPE++gkwKkNH # XXFe4uWR8OWSKQYK/2nwjU0pZY4xxnsV #
-
Numéro de série / Date d'Achat des box HC3, HC2 et HCL
mprinfo a répondu à un(e) sujet de Lazer dans HC 2 & Lite
La on risque de rigoler même si tu t'appelles jc [emoji1787] Déjà un soucis zwave avec modules en 3.52 tu dois en avoir pas mal je pense Envoyé de mon BLA-L29 en utilisant Tapatalk- 265 réponses
-
- numéro de série
- hc2
-
(et 1 en plus)
Étiqueté avec :
-
Oui je sais pour le script c'est pour montrer comment fonctionne la recherche d'encodage du password bon en curl je viens d'envoyer mes premiers sms Alors j'ai utilisé la méthode pour passord type 3 cela fonctionne avec une erreur merci pour le Base64 MODEM_IP="192.168.8.1"ROUTER_USERNAME="admin"ROUTER_PASSWORD="admin"curl -s -X GET "http://$MODEM_IP/api/webserver/SesTokInfo" > ses_tok.xmlCOOKIE=`grep "SessionID=" ses_tok.xml | cut -b 10-147`TOKEN=`grep "TokInfo" ses_tok.xml | cut -b 10-41`# LoginLOGIN_REQ="adminYWRtaW4=3"curl -X POST -d $LOGIN_REQ "http://$MODEM_IP/api/user/login" -H "Cookie: $COOKIE" -H "__RequestVerificationToken: $TOKEN" "Content-Type: text/xml" --dump-header login_resp_hdr.txt > /dev/nullgrep "SessionID=" login_resp_hdr.txt | cut -d ':' -f2 | cut -d ';' -f1 > session_id.txtgrep "__RequestVerificationTokenone" login_resp_hdr.txt | cut -d ':' -f2 > token.txtSESSION_ID=`cat session_id.txt`TOKEN=`cat token.txt`echo $TOKENecho "admin session_id\n$SESSION_ID\n"message_data="-10600000000"hello"511" #--compressedcurl -X POST -d $message_data "http://$MODEM_IP/api/sms/send-sms" -H "Cookie: $SESSION_ID" -H "__RequestVerificationToken: $TOKEN"
-
besoin aide connection routeur 4g Huawei Je viens enfin de réussir a me connecté a l'api de mon routeur E5186 je récupère la SessionID et le Token :http://192.168.8.1/api/webserver/SesTokInfo <?xml version="1.0" encoding="UTF-8"?> <response> <SesInfo>SessionID=JeKxkiXRYojMr/K+dxK0fRL0s+weG1v2wAm79swD1JFv/Ne+1hW3EQCGaJAJf8RGnmqbo7Ij6doAmKzzEzaSS3PqY2suMcucysr2ZpWQanvGcojzA/GEhZEskYdgQL+g</SesInfo> <TokInfo>y3o/pi/wOJrPC75N59B44OiUwRf+QJL9</TokInfo> </response> voici le code pour la home center 3 function QuickApp:SessionID() if self.cookie == nil then print("/api/webserver/SesTokInfo") self.http:request(self.controller .. "api/webserver/SesTokInfo", { options = { checkCertificate = false, method = 'GET', }, success = function(response) --print(json.encode(response.data)) if response.status == 200 then self.cookie = response.data local len = string.len(self.cookie) print(len) --277 self.Token = string.sub(self.cookie, 221, 252)--SesInfo self.cookie = string.sub(self.cookie, 62, 199)--TokInfo --self.cookie = string.sub(self.cookie, 72, 199) print("Cookie : ",self.cookie) print("Token : ",self.Token) --self:loginUnifi(self.cookie) --self:test(self.cookie) end end, error = function(error) self.cookie = nil self:error("checkTitreUnifi() échoué: ", json.encode(error)) self:updateView("Titre", "text", "Controleur UNIFi - checkVersionUnifi() échoué: "..json.encode(error)) end }) end end j'ai 2 variables : self.cookie (SessionID) self.Token (TOKEN) Avec ces 2 variables j'arrive a faire des GET pour récupérer les infos qui n'ont pas besoin d'authentification function QuickApp:API(adresse) if self.cookie ~= nil then print("/device/basic_information", self.cookie ) self.http:request(self.controller..adresse, { options = { checkCertificate = false, method = 'GET', headers = { ['Cookie'] = self.cookie , ["content-type"] = "text/xml", ['__RequestVerificationToken'] = self.Token } }, success = function(response) print(json.encode(response.data)) if response.status == 200 then print(response.data) end end, error = function(error) self.cookie = nil self:error("checkTitreUnifi() échoué: ", json.encode(error)) self:updateView("Titre", "text", "Controleur UNIFi - checkVersionUnifi() échoué: "..json.encode(error)) end }) end end j'appele ces fonctions comme ceci self:SessionID() fibaro.setTimeout(2 * 1000, function() print("-----------------------------------cradle") self:API("api/cradle/status-info") -- adresse mac "1 901 5 0 BC:25:E0:FA:C6:E5" print("-----------------------------------device") self:API("api/device/autorun-version") -- "22.001.07.00.03" self:API("api/device/basic_information") -- version IU web + logiciel "LTE cpe 0 16.100.02.00.03 21.316.01.00.00" self:API("api/device/device-feature-switch") -- 0 1 self:API("api/device/information") ---100003 -- il faut une authentification print("-----------------------------------dialup") self:API("api/dialup/connection")- -- 0600015001 self:API("api/dialup/mobile-dataswitch") -- 1 print("-----------------------------------global") self:API("api/global/module-switch") -- 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 print("-----------------------------------language") self:API("api/language/current-language") -- fr print("-----------------------------------monitoring") self:API("api/monitoring/check-notifications") -- UnreadMessage = 0 SmsStorageFull = 0 OnlineUpdateStatus = 14 self:API("api/monitoring/converged-status") -- SimState = 257 SimLockEnable = 0 CurrentLanguage = fr-fr self:API("api/monitoring/status") -- 901 2 101 3 0 0 '10.229.66.187' '172.20.2.39' '172.20.2.10' 0 64 64 2 1 1 101 5 0 1 cpe 0 1 self:API("api/monitoring/traffic-statistics") -- 8743 1637862 79800 0 0 1637862 79800 8743 1 print("-----------------------------------net") self:API("api/net/current-plmn") -- 0 F SFR SFR 20810 7 self:API("api/online-update/upgrade-messagebox") -- 1 self:API("api/pin/status") -- 257 258 3 10 self:API("api/redirection/homepage") -- 0 self:API("api/security/upnp") ---100003 il faut une authentification self:API("api/sms/sms-list") ---100005 self:API("api/user/login") ---100006 self:API("api/user/remind") -- 1 self:API("api/user/session") -- ok self:API("api/user/state-login") -- State = -1 Username = "admin" password_type = 4 self:API("api/wlan/basic-settings") -- Routeur2G 0 0 ALL b/g/n 0 100 32 1 2346 2347 1 100 1 0 0 1 1 600 0 0 0 self:API("api/wlan/multi-switch-settings") self:API("api/wlan/wifi-feature-switch") self:API("api/net/net-mode") self:API("config/lan/config.xml") -- config lan self:API("config/global/config.xml") self:API("config/global/net-type.xml") self:API("config/pcassistant/config.xml") self:API("config/deviceinformation/config.xml") end) On voit que j'arrive a récuperer une grande partie des infos sauf celle qui on besoin d'une authentification Le mot de passe et de type 4 donc il faut base64 et SHA256 j'ai trouver cela mais ca fonctionne pas ROUTER_IP=$1 ROUTER_USERNAME=$2 ROUTER_PASSWORD=$3 # Login CREDENTIALS=`printf $ROUTER_PASSWORD | sha256sum | head -c64 | base64 -w0` echo $CREDENTIALS #CREDENTIALS=`printf "%s%s%s" $ROUTER_USERNAME $CREDENTIALS $TOKEN | sha256sum | head -c64 | base64 -w0` echo $CREDENTIALS DATA=`printf "<request><Username>%s</Username><Password>%s</Password><password_type>4</password_type></request>" $ROUTER_USERNAME $CREDENTIALS` echo $DATA PostRouterData "/api/user/login" "$DATA" voici le script complet #!/bin/sh # Written by oga83 # Check command line parameters if [ "$#" -ne 5 ]; then printf "Syntax: %s <IP> <Username> <Password> <PhoneNumber> <Message>\n" $0 exit 0 fi ROUTER_IP=$1 ROUTER_USERNAME=$2 ROUTER_PASSWORD=$3 SMS_NUMBER=$4 SMS_TEXT=$5 TMP_HEADER_FILE=/tmp/headers.tmp CURL_OPT=--silent ProcessRouterResponseHeader() { # Get token from header NEWTOKEN=`cat $TMP_HEADER_FILE | grep "__RequestVerificationTokenone: " | awk -F' ' '{print $2}'` if [ ! -z "$NEWTOKEN" ]; then TOKEN=$NEWTOKEN; fi NEWTOKEN=`cat $TMP_HEADER_FILE | grep "__RequestVerificationToken: " | awk -F' ' '{print $2}'` if [ ! -z "$NEWTOKEN" ]; then TOKEN=$NEWTOKEN; fi NEWSESSIONID=`cat $TMP_HEADER_FILE | grep "Set-Cookie: SessionID=" | awk -F' ' '{print $2}' | cut -b 1-138` if [ ! -z "$NEWSESSIONID" ]; then SESSIONID=$NEWSESSIONID; fi echo $NEWTOKEN } GetRouterData() # Param1: Relative URL { #echo "GET on http://$ROUTER_IP$1" RESPONSE=`curl $CURL_OPT --request GET http://$ROUTER_IP$1 \ --dump-header $TMP_HEADER_FILE \ -H "Cookie: $SESSIONID" -H "__RequestVerificationToken: $TOKEN" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \ ` ProcessRouterResponseHeader } GetSessionToken() # No parameters { # Get SessionID and RequestVerificationToken GetRouterData '/api/webserver/SesTokInfo' SESSIONID="SessionID="`echo "$RESPONSE"| grep -oPm1 "(?<=<SesInfo>)[^<]+"` TOKEN=`echo "$RESPONSE"| grep -oPm1 "(?<=<TokInfo>)[^<]+"` } PostRouterData() # Param1: RelativeUrl, Param2: Data, Param3:bAskNewToken { # Get new token if necessary if [ ! -z $3 ]; then GetSessionToken fi #echo "POST on http://$ROUTER_IP$1 :" $2 RESPONSE=`curl $CURL_OPT --request POST http://$ROUTER_IP$1 \ --dump-header $TMP_HEADER_FILE \ -H "Cookie: $SESSIONID" -H "__RequestVerificationToken: $TOKEN" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \ --data "$2"` ProcessRouterResponseHeader } # Get initial SessionID and RequestVerificationToken GetSessionToken # Login CREDENTIALS=`printf $ROUTER_PASSWORD | sha256sum | head -c64 | base64 -w0` CREDENTIALS=`printf "%s%s%s" $ROUTER_USERNAME $CREDENTIALS $TOKEN | sha256sum | head -c64 | base64 -w0` DATA=`printf "<request><Username>%s</Username><Password>%s</Password><password_type>4</password_type></request>" $ROUTER_USERNAME $CREDENTIALS` PostRouterData "/api/user/login" "$DATA" # Send SMS DATA="<?xml version='1.0' encoding='UTF-8'?><request><Index>-1</Index><Phones><Phone>$SMS_NUMBER</Phone></Phones><Sca></Sca><Content>$SMS_TEXT</Content><Length>${#SMS_TEXT}</Length><Reserved>1</Reserved><Date>`date +'%F %T'`</Date></request>" PostRouterData "/api/sms/send-sms" "$DATA" 1 # Logout PostRouterData "/api/user/logout" "<request><Logout>1</Logout></request>" Merci d'avance pour votre aide
-
Scene HC3 - sourceTrigger Comment connaitre la source du déclenchement d'une scène Le déclenchement d'une scène est stocker sous forme de table dans sourceTrigger Pour connaitre la source tu déclenchement -- ACTIONS local trigger = sourceTrigger print(json.encode(trigger)) Sauvegarder et lancer l'action resultat : {"property":"execute","id":2,"type":"user"} On voit : property = "execute" -- string id = 2 (2 = compte admin) -- numerique type = "user" --string Comment Utiliser cette table ? Exemple : je veux savoir si la scène est lancer par l'utilisateur local trigger = sourceTrigger if (trigger.property == "execute") then -- declechement manuel print("Scene lancer manuellement par l'utilisateur)") end Exemple : Je veux soir quel utilisateur a lancer la scéne local trigger = sourceTrigger if (trigger.property == "execute") then -- declechement manuel print("Scene lancer manuellement par l'utilisateur) ", trigger.id) end Maintenant que nous savons comment fonction sourceTrigger nous allons voir comment cela fonctionne avec des déclarations Exemple : j'ai un cron qui déclenche la scène toutes les 10 mn je veux connaitre le jour date heure minute de chaque déclenchement --DÉCLARATIONS (Conditions/Déclencheurs) { type = "date", property = "cron", operator = "match", value = {"10,20,20,30,40,50,0", "*", "*", "*", "*","*"} } -- ACTIONS local trigger = sourceTrigger if (trigger.property == "cron") then if (trigger.type=="date") then local Minutes = trigger.value[1] local Heure = trigger.value[2] local Jour = trigger.value[3] local Mois = trigger.value[4] local NomJourNumerique = tonumber(trigger.value[5]) local JourString = {"Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"} local NonJourString = JourString[NomJourNumerique] local Annee = trigger.value[6] print (string.format("%s %s/%s/%s à %s h %s mn", NonJourString,Jour,Mois,Annee,Minutes,Heure)) end end resultat : Vendredi 5/6/2020 à 20 h 10 mn
-
Numéro de série / Date d'Achat des box HC3, HC2 et HCL
mprinfo a répondu à un(e) sujet de Lazer dans HC 2 & Lite
J'espère qu'elle fonctionne [emoji16]@lazer un peu de travail pour toi un nouveau serial à saisir Envoyé de mon BLA-L29 en utilisant Tapatalk- 265 réponses
-
- numéro de série
- hc2
-
(et 1 en plus)
Étiqueté avec :
-
Il suffit de créer un fibaro id avec l'adresse mail est d'y attaché ta box Si elle appartient à un fibaro id il faut demander le transfert Envoyé de mon BLA-L29 en utilisant Tapatalk
-
Nvidia pas classe [emoji1787] Envoyé de mon BLA-L29 en utilisant Tapatalk
- 15 réponses
-
- 1
-
-
- plex
- multimedia
-
(et 2 en plus)
Étiqueté avec :
-
La hc2 que tu as acheté d'occasion était aussi hs ? Envoyé de mon BLA-L29 en utilisant Tapatalk
-
Tu as vraiment mauvais goût [emoji23] Apple tv ça ce vend encore [emoji16] La shield est mieux en plus on peut mettre kodi ou plex Envoyé de mon BLA-L29 en utilisant Tapatalk
- 15 réponses
-
- 1
-
-
- plex
- multimedia
-
(et 2 en plus)
Étiqueté avec :
-
c'est parentId == 1 est non parentIid == 1 local TousLesModules = api.get("/devices/") local IdEnd = TousLesModules[#TousLesModules].id print ("Nombres de modules : " ..#TousLesModules) print ("Dernier ID : "..IdEnd) print ("-----------------------------------------------------------") print ("------- Listes de modules version 3,3,52") print ("-----------------------------------------------------------") local cpte = 0 for i,v in ipairs(TousLesModules) do --local id = TousLesModules[i].id local Nom = TousLesModules[i].name local parentId = TousLesModules[i].parentId local modifier = TousLesModules[i].modified local Valeur = TousLesModules[i].properties.value local zwaveInfo = TousLesModules[i].properties.zwaveInfo local theType = TousLesModules[i].type if parentId == 1 and zwaveInfo ~= nil then if zwaveInfo == "3,3,52" then cpte = cpte + 1 local id = TousLesModules[i].id print (cpte.." - "..zwaveInfo.." - Type = "..theType.." Id = "..id.." - Nom = "..Nom) end end end 22 chez moi
-
@lazer moi c'est pas mieux donc HC3 = console de QA (Jeux)
-
dommage moi j'utilise KODI super travail
- 15 réponses
-
- plex
- multimedia
-
(et 2 en plus)
Étiqueté avec :
-
voila une scène pour voir la version des modules en 3,3,52 fonctionne sur HC2 local TousLesModules = api.get("/devices/") local IdEnd = TousLesModules[#TousLesModules].id print ("Nombres de modules : " ..#TousLesModules) print ("Dernier ID : "..IdEnd) print ("-----------------------------------------------------------") print ("------- Listes de modules version 3,3,52") print ("-----------------------------------------------------------") for i,v in ipairs(TousLesModules) do --local id = TousLesModules[i].id local Nom = TousLesModules[i].name local visible = TousLesModules[i].visible local modifier = TousLesModules[i].modified local Valeur = TousLesModules[i].properties.value local zwaveInfo = TousLesModules[i].properties.zwaveInfo local theType = TousLesModules[i].type if visible == true and zwaveInfo ~= nil then if zwaveInfo == "3,3,52" then local id = TousLesModules[i].id print (zwaveInfo.." - Type = "..theType.." Id = "..id.." - Nom = "..Nom) end end end
-
Moi j'utilise toujours des valeurs pour les volets de 0 à 99 Pour le moment j'ai pas de modules fgr sur ma hc3 tout est resté sur ma hc2 Envoyé de mon BLA-L29 en utilisant Tapatalk
-
Numéro de série / Date d'Achat des box HC3, HC2 et HCL
mprinfo a répondu à un(e) sujet de Lazer dans HC 2 & Lite
Ça c'est une erreur du vendeur Il faut acheter français [emoji1787] J'ai eu le même soucis avec un colis aliexpress Livré à une autre adresse J'ai été remboursé par le vendeur C'est chiant j'ai des pile rcr123 et pas de chargeur [emoji22] Envoyé de mon BLA-L29 en utilisant Tapatalk- 265 réponses
-
- numéro de série
- hc2
-
(et 1 en plus)
Étiqueté avec :
-
quick app Quick App - Vacances scolaires
mprinfo a répondu à un(e) sujet de mprinfo dans Quick App Developpeur
@benjynet c'est spécialement pour toi