OpenSprinkler Forums OpenSprinkler Mobile and Web App OSPi Interval and Mobile WebApp Station names.

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

    djagerif
    Participant

    Guys,

    I just tested both the OSPi Interval program and the Mobile WebApp with some strange station names. It seems Ray allows the use of both the and the characters in the station names. Using either of these characters causes a bit of a problem in both your applications. It ranges from missing characters to names jumping from one station to the next.

    The problem is that the mentioned characters are used as delimeters. My suggestion is to limit the use of these as they cause issues even in the native OS Web Interface.

    Ingo

    #24814

    Ray
    Keymaster

    These characters work fine in the microcontroller-based OpenSprinkler. Just tested and it’s displayed correctly. I recall including code that converts special characters with their HTML code back and forth. For example, ‘space’ will be stored as ‘%20’ any so on. It’s possible that the OSPi’s interval program skipped this. I will do some testing later to check.

    #24815

    Samer
    Keymaster

    Apostrophe breaks the interval program and the Arduino firmware. The normal javascripts sanitize the input however my mobile app isn’t doing this. Probably why this problem is just now occurring. I will fix my code to bring it in line with what the firmware’s expect.

    Update: I actually don’t see any sanitization in Ray’s javascript’s (was a quick glance though). Do you want me to encode the strings using html codes?

    #24816

    djagerif
    Participant

    Unfortunately not on my IE 10 or Chrome browsers. I tested both OS and OSPI. See below for OS results:

    #24817

    Ray
    Keymaster

    I see, I forgot to test the apostrophe (single quotation mark). The issue is that since the station name is provided as a javascript array of strings, and I am using apostrophe for defining a string, if you include it in your station name, that will create Javascript error, such as this one:
    var snames=;
    (Uncaught syntax error…)
    the abc,`def’ string has a apostrophe at the end itself, so that will cause ambiguity with the apostrophe used to define a string.
    So yes, for now try to avoid using single quotation mark.

    #24818

    Ray
    Keymaster

    By the way, if the station name is messed up and you need to reset the station name without resetting the controller, you can use direct HTTP command, for example:
    http://x.x.x.x/cs?pw=opendoor&s0=abc
    will reset the first station name to abc.

    #24819

    Samer
    Keymaster

    Just to comment on the current state of this issue.

    Dan pushed an update to the interval program to support unicode characters, commas, etc. Afterwards, I pushed an update for my mobile app to handle all of the same issues. Therefore, this issue by and large should be solved.

    #24820

    Michael
    Member

    The new interval program now supports more than 16 characters for station names. Any chance of removing the limitation in the mobile app or is that for backwards comparability?

    #24821

    Samer
    Keymaster

    The problem lies in all the common firmwares (OS, OSPi interval program and OSBo interval program) not reporting which device/specific version they are. Therefore, I can’t tell between OS vs OSPi and I also can’t tell between OSPi old vs new (before and after large station name support).

    I can extend support universally however that will cause problems for some people on the more restricted firmwares. Each time I try to identify between the two I fail especially because the OSPi program is constantly changing so it’s hard to find a unique difference that persists through versions.

    #24822

    djagerif
    Participant

    Some time ago I’ve requested Dan to include a revision number in his code. Try the http://IP:port/rev page maybe it will help to keep track of which device you connect to.

    Ingo

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

OpenSprinkler Forums OpenSprinkler Mobile and Web App OSPi Interval and Mobile WebApp Station names.