This topic contains 1 reply, has 1 voice, and was last updated by  John 6 years, 6 months ago. This post has been viewed 1130 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20048

    John
    Keymaster

      $SMCommRoute doesnt seem to work very well for me on my iphone 4s.

      Im using scadamobile1, and even when i am in my home LAN, connected to wifi, $SMCommRoutedoesnt will return 3. I noticed in the connections tab that i am connected to my external IP, and not the lan IP.

      is there something I can do to make this work better?

      # %protocol modbus/tcp,
      coil3,BOOL,C3,”comment=”" “”;value=boolresult ;section=”" “”; label=”"Hall Lamp”"; local_ip=”"192.168.1.60″”; local_port=”"502″”; remote_host=”"reprisal.dyndns.biz”"; slave_id=”"0xFF”";write_access=0;”

      boolresult,BOOL,INTERNAL,”hidden=1;value= if (set_time.to_i < $SMAbsoluteTime.timeformatter(“”HHmmss”").to_i) 1 else 0;section=”"derp”"; label=”"After set time?”"; write_access=0; ”
      current_time,STRING,INTERNAL,”comment=”" “”;value=$SMAbsoluteTime.timeformatter(“”HH:mm:ss”");section=”"derp”"; label=”"The Time”"; ”
      set_time_as_string,STRING,INTERNAL, “comment=”" “”;value=[set_hours.to_s(""%02d""), set_minutes.to_s(""%02d""), set_seconds.to_s(""%02d"")].join(“”:”"); label=”"set time”"; style=”"bezel”"; ”
      set_time,STRING,INTERNAL, “hidden=1; value=[set_hours.to_s(""%02d""), set_minutes.to_s(""%02d""), set_seconds.to_s(""%02d"")].join; label=”"set time”"; style=”"bezel”"; ”

      set_hours,UINT,INTERNAL, “comment=”" “”;write_access=0; label=”"Set Hours”"; style=”"slider”"; bounds={0,23} ”
      set_minutes,UINT,INTERNAL, “comment=”" “”;write_access=0; label=”"Set Minutes”"; style=”"slider”"; bounds={0,59} ”
      set_seconds,UINT,INTERNAL, “comment=”" “”;write_access=0; label=”"Set Seconds”"; style=”"slider”"; bounds={0,59} ”

      home_away,STRING,INTERNAL, “comment=”" “”; value=$SMCommRoute.to_s ; label=”"At Home?”"; style=”"bezel”";”

      #20049

      John
      Keymaster

        The $SMCommRoute variable determines whether a connection is established on the IP given in the ‘local_ip’ setting or the ‘remote_host’ setting, but the app it can not determine anything beyond that. In your case you state that even when you are at home you see your external IP on the connections tab. This is because your router at home allows this by routing your external IP to your internal IP. As this may be useful in some cases, most routers do not allow this and just drop connections if attempted to connect to their internet IP from the Local side.

        ScadaMobile will use the last connection that worked, so if the ‘remote’ connection continues to be ok the app will not attempt to switch to the local one. In fact SM has no way to determine which one to use except by determining whether it works or not. So if you really need the SMCommRoute feature you must disable your router to accept connections to its own external IP from the LAN, so only real external connections are allowed on that IP.

        Thanks.

      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic.

      Copyright © SweetWilliam, S.L 2009-2013. All rights reserved.
      Science and Technology Park of the University of Girona, Emili Grahit, 91 (NarcĂ­s Monturiol building, Office P3-B03) 17003-Girona. Phone +34972183244