Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #45733

    Csaba Toth
    Participant

    Sniffing the http traffic I realized the “GET /ja?pw=….” http request sending interval of an UI running in Chrome browser & Win7 is 5 sec.
    Is it possible to change the interval, or it is “hardwired” in the application?

    The other question: at the end of the GET call there is a number what looks like a msec based epoch time, but this is incremented by 1 at each call.
    So it should be something else.
    What represents that number?

    Thanks.

    #45734

    Samer
    Keymaster

    The refresh interval is currently hardcoded and cannot be adjusted.

    The epoch time added is done by jQuery library when using cache: false option. This should represent the unix time stamp in milliseconds.

    #45735

    Csaba Toth
    Participant

    Thanks Samer!

    The attachment at the end of GET request is something different.
    Look took the sequence of calls on the picture.

    Csaba

    Attachments:
    #45737

    Samer
    Keymaster

    It’s possible the jQuery library generates the first unique token based on the time then increments it to avoid collision since it’s possible two Ajax queries fire at the same time.

    Sent from my iPhone using Tapatalk

    #45739

    Csaba Toth
    Participant

    Hi Samer,

    It looks to increase the epoch timer value by 1 msec at every 5 seconds.
    So it is something different.

    Anyway our small team is on the way to add sensors to the OS system. The present config will upgrade from one sensor input to 4 inputs.
    Rainsensor, Flowsensor, 2 soil sensors (one for sunny one for shaded areas).
    Plus current sensor of the valve load.

    Based on sensor measurement we are adding diagnostic & alarming features too.

    I have made the hw design, tests, and the firmware is under coding.
    It can be added to any existing OS systems (not OSPi at the moment) using the PT2 connector.
    I will post it for the community after the appropriate test cycle to recive the more extensive field test of the contributors.

    This will need to change the UI.
    I will make a very straightforward description about the changes we need for above features.
    At the moment our team is lack of javascript developers.
    Can you make the coding of the required changes in the UI?

    Thanks, Csaba

    #45741

    Csaba Toth
    Participant

    I haven’t seen you post when I was edited my previous post. I don’t have any clue about Ajax at the moment.
    The epoch time in the GET command could be used for time synchronization if it would be precise, for example.
    In this form it is only increasing the the load of the communication line.

    Best regards.

    #45863

    Ray
    Keymaster

    @tcsaba101: sorry about my late response. At the moment both Samer and I are overloaded with work so I don’t think we will have time to help with the required changes in the UI. The entire project is open-source, so hopefully you can find someone to help you with the code changes.

    Regarding the earlier posts, I may not be following all the details accurately, but here are two notes:
    – the refresh interval (5 seconds) is hardcoded in the app / web interface. You can change that if you are customizing the UI. It of course has nothing to do with the firmware — once the app / browser is closed, it won’t poll the controller any further.
    – the added time stamp (epoch time in msec) is for caching purpose (if I understand correctly from Samer’s post) — it’s for keep track of each unique call.
    – The controller’s /jc (or more generally /ja) API returns the device’s epoch time (in seconds).

    #46101

    Csaba Toth
    Participant

    Hi Ray and Samer,

    Thanks for the answer, I am working on the changes with colleagues, just the learning curve could have been saved, if…
    The Hw, Firmware adjustment to sensors handling is in good shape, the cloud server connection is under test, the Ui questions are on debate.

    Some tech questions:
    According to my observation the UI calls increasing the epoch time field by 1 at each calls (what takes place in every 5 seconds).

    At starting the UI, there are 3 ssh calls established:
    api.github.com:443
    api.wunderground.com:443
    ui.opensprinkler.com:443
    All looks ssh calls, but only opensprinkler and wunderground have data transfer in my monitor.
    Can you tell some words about the content?

    At start /jp, /jn, /jo, /js, /jc queries are requested separately, then /ja is requested in every 5 secs.
    Does it have some practical sense?

    Security is becoming more and more important. From this point the plain http data transfer is not safe.
    Although the password MD5 hashed, but this is paperweight security.

    The AVR8 structure does not gives a wide encoding selection, but have you got any idea to increase the data security in the transfer?

    Thanks.

    #46128

    Ray
    Keymaster

    “At start /jp, /jn, /jo, /js, /jc queries are requested separately, then /ja is requested in every 5 secs.
    Does it have some practical sense?” –> this is for backward compatibility: not all hardware supports the /ja command, due to the limit of the microcontroller capability. For that reason, it needs to check whether /ja is supported or not, if not, it needs to send separate queries.

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