Aller au contenu

Lau332

Membres confirmés
  • Compteur de contenus

    4
  • Inscription

  • Dernière visite

  • Jours gagnés

    1

Tout ce qui a été posté par Lau332

  1. Bonjour, il faut prendre le block "Toutes/quelconques en haut à droite et le glisser sous le block de conditions déjà listées :
  2. je viens enfin de trouver la réponse ici : https://forum.fibaro.com/topic/51248-communication-between-hc2-and-hc3/ Code Button 1, to switch Fibaro Double switch On: httpRequest = Net.FHttp('192.168.178.1', 80); httpRequest:setBasicAuthentication('admin', 'admin'); httpRequest:GET("/api/callAction?deviceID=84&name=turnOn"); fibaro:debug('done'); Code switch 2, to switch Fibaro Double switch Off: httpRequest = Net.FHttp('192.168.178.1', 80); httpRequest:setBasicAuthentication('admin', 'admin'); httpRequest:GET("/api/callAction?deviceID=84&name=turnOff"); fibaro:debug('done'); Button 3, First create a Global Varaible on the HC2 and on the HC3 with the name: MyGlobalValue in this example I use Authentication (user;password) admin;admin In the push button of the HC2 VD you program: local MyGlobalValue = fibaro:getGlobalValue("MyGlobalValue"); jsonTable = {value = MyGlobalValue }; jsonString = json.encode(jsonTable); httpRequest = Net.FHttp('192.168.178.1', 80); httpRequest:setBasicAuthentication('admin', 'admin'); response, status, errorcode = httpRequest:PUT("/api/globalVariables/MyGlobalValue", jsonString); fibaro:debug(response); fibaro:debug(status); fibaro:debug(errorcode); fibaro:debug('Done'); By pressing button 1, 2 or 3 of your new VD, your double switch must be switched on or off, or the value of MyGlobalValue must be taken from your HC2 in the HC3.
  3. Bonjour, HC2 depuis 2015 je viens d'acquérir une HC3. Je migre peu à peu les modules et j'aurai besoin d'actionné à partir de la HC2 un module (ouverture de portail) qui est associé à la HC3. Je viens de passer de très longues heures sur tous les forum sans rien trouver La ligne de commande dans Firefox fonctionne parfaitement : http://xxx@yyy.fr:pwd@192.168.1.x/api/callAction?deviceID=61&name=turnOn En revanche le VD suivant ne produit rien : HC2 = Net.FHttp("") local lignecde="http://xxx@yyy.fr:pwd@192.168.1.x/api/callAction?deviceID=61&name=turnOn" fibaro:debug(lignecde) response = HC2:GET(lignecde) fibaro:debug(response) response est vide. Si quelqu'un peu m'aider svp
×
×
  • Créer...