So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By QuickFix
#93278 You could, in theory, create an easy solution by enabling FTP on your Linux box with ReadOnly access rights for a limited user (the ESP) to the files (or folder) in question and let the ESP poll their state every once in a while. Or you could use an HTTP server that only lists the files you want to know the state of.

Shouldn't be too difficult.
User avatar
By AE_Zero
#93279 Doing it over HTTP would be pretty easy. Make a PHP script that keeps an eye on the files you're interested in. Then have the ESP8266 pull up that page and fetch a value from it, then react accordingly.

For example, I have a remote sensor that works on variable deep sleep intervals. When the board uploads the current readings, the server stores them and returns it a value for when it wants the board to check in next. Example below.

Hope it helps!

Code: Select all    HTTPClient http;
    http.begin("http://192.168.210.5/collector.php?readings={\"air\":\"" + readingsAir + "\",\"light\":\"" + readingsLight + "\"}");
    int httpCode = http.GET();
    String payload = http.getString();
    http.end();

    naptime = naptime*1000000;
    Serial.println("Napping for " + String(naptime) + "us");
    ESP.deepSleep(naptime, WAKE_NO_RFCAL);