OpenSprinkler Forums OpenSprinkler Mobile and Web App Logging and weather updates?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22776

    gstar42
    Participant

    I would really like the logging and for the OpenSprinkler (OS) to respond to weather updates automatically. It sounds like this is additional functionality that requires a local web server running Apache.
    Must it be on Linux or RPi or could it be running on Windows? Also, I saw you are planning on incorporating this functionality into the base OS (I have 2.1 Arduino version). Is that true? Do you have an estimate as to when this will be done (I promise I won’t hold you to it, just looking for a ballpark) so perhaps I’ll skip the trouble of installing Apache (assuming the Windows version is ok).

    If this log is written to the SD card, how would I retrieve the log (on my PC)?

    Also, where are the settings stored when I export using your Android app? I couldn’t find the file.

    Thanks…

    Garry

    #26126

    Samer
    Keymaster

    Hello Gary,

    The logging feature currently is separate from the OpenSprinkler and thus handled externally. I chose to handle it with a PHP script on crontab logging the status. I then parse this log and render a graph for users via the mobile app. As for the firmware side of things, I can’t comment as I only develop the mobile application. As for the host it can be any OS however Windows seems to have the most issues (currently hammering them out). In regard to the log file, if that becomes something stored on the SD card then a simple HTTP request would retrieve it. Additionally, the mobile app would be able to parse it and graph it for you.

    I have basic weather checking to activate rain delay if raining however past that I currently do not have plans on making the system more robust (ex: precipitation, etc).

    For the backup and import functions on my mobile app, you will notice the button is split. Clicking the longer side saves it to your browser. The smaller button on the right with the icon does actual file export/import.

    Hope this helps!

    Update: Now that you mention it thought I suppose that export/import situation is a bit misleading. I will see what I can do to improve that.

    #26127

    gstar42
    Participant

    Hi salbahra

    I’m in the midst of installing the OS 2.1 (Arduino) – just need to swap it in for my old Irritrol.

    I’m a bit confused. I have the mobile app on Android. Very nice, although it would be nice if it would open even when it’s unable to connect to my OS.

    I don’t understand about the logging not being part of OS. Do you mean your mobile app just generates a log based on the schedule, without knowing if it is actually happening? (What if the power is off and it doesn’t run?) Or must the mobile app be running at all times and constantly checking the status? Or does the OS store it somewhere so the mobile app can retrieve it via the HTTP API? It’s not clear to me exactly where the line is between ‘native’ OS and the mobile app. Is it Ray that does the native OS changes?

    Can’t see the import button since my system is not up right now so I can’t use the mobile app.

    Can I please get a link to the most recent HTTP API?

    Thanks…
    garry

    #26128

    Samer
    Keymaster

    Hello Garry,

    Going to try to address your issues sequentially. First, the app doesn’t open because it’s code is on a web server. It is possible within a webapp to build a manifest list and force the phone to cache the code however the HTML files contain dynamic PHP code thus caching is somewhat difficult.

    As it stands, the OpenSprinkler does not log anything. My mobile app (the PHP version) polls the OpenSprinkler every minute and logs changes. When you open View Logs, that log is parsed for the selected date range and values are returned. This means the data is not interpreted but rather actual logged data. The data is therefore stored with the html/php files such as config.php (SprinklerChanges.txt). The watcher script can be found here: https://github.com/salbahra/OpenSprinkler-Controller/blob/master/watcher.php. The installer attempts to add the script to crontab otherwise alerts you it couldn’t.

    Which import button are you referring to because that is only used for the configuration. If the device is down what good what that do? Just curious here.

    The OpenSprinkler HTTP API is documented here: http://rayshobby.net/wordpress/wp-content/uploads/2011/10/Firmware1.8HTTPGETcommands.pdf. With a few exceptions of course.

    The following new options are available since 1.8:
    o2 – NTP On/Off
    o14 – Auto Reconnect On/Off
    o26 – Device ID (0-255)

    Hope this clears up some of the confusion.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Mobile and Web App Logging and weather updates?