ljalves / hfeasy

HFeasy - firmware for HF-LPx100/LPx30 based devices
45 stars 14 forks source link

JSON Arduino ESP8266 #6

Closed chris83-dev closed 4 years ago

chris83-dev commented 4 years ago

Bonjour et merci bien pour ce formidable projet, je pilote les prises chacon avec un esp8266 via une esquisse de ce style grace à la librairie httpclient :

void chacon(String chacon_state, String chacon_ip) { WiFiClient client = server.available(); HTTPClient http; String url = chacon_ip+"state?sw="+chacon_state; http.begin(url); //GET method int httpCode = http.GET(); //String payload = http.getString(); //Serial.println(url); //Serial.println(payload); http.end(); }

je viens à vous pour savoir si vous savez comment récupérer le status de la prise avec un arduino, et si éventuellement vous pourriez intégrer le moyen de récupérer le status de la prise via une page web en JSON, merci bien, bonne soirée

Chris-M

ljalves commented 4 years ago

English please.

ljalves commented 4 years ago

Google translate tells me that you would like to receive the switch status in JSON format. Let me see what I can do...

ljalves commented 4 years ago

Webpage /state was changed to output json format. Release 0v5