Announcement

Collapse
No announcement yet.

Snevl Latitude Version 2 Discussion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Two problems: one weird and one "old"

    I have installed both the SNEVL Latitude scripts on my HS computer (a HomeTroller 2) and Btraced on my Iphone 5 (ios6).

    The weird problem:

    If I have UltraWeatherbug enabled then SnevlLatitude.vb will not run. When I envoke SnevelLatitude.vb the following error is returned:

    "An unexpected error occured in the ActionUIFormat() function/subroutine: [System.IndexOutOfRangeException: Index was outside the bounds of the array, at HSPI_ULTRAWEATHERBUG.HSPI.ActionUIFormat(String Action)]

    It looks to me that SNEVL is somehow invoking UltraWeatherbug - which then encounters an error.

    My "old" problem:

    Eventhough I have installed Btraced 1.1.1 the Iphone seems to go to sleep and will not upload trip data in real time. HS will have the following error in its log:

    Web Server login failed from xx.xxx.xxx.xx User: Btraced

    and then block Btraced from further access for a period. When I turn Tracking Off on the Iphone (and not changing anything on the HS side) it will uipload the trip data points.

    I would really like to get this application working - any suggestions?

    JimO.

    Leave a comment:


  • jayman13
    replied
    Snevl Latitude Version 2 Discussion

    I cleaned it up a little but really cool. I have to figure a way to repeat the script every time there is a change in the position device just so the position keeps changing in real time if you kept it on the screen.Click image for larger version

Name:	ImageUploadedByTapatalk1359557039.097335.jpg
Views:	1
Size:	51.7 KB
ID:	1167817

    Leave a comment:


  • jayman13
    replied
    Snevl Latitude Version 2 Discussion

    Originally posted by stevea View Post
    Oh I get what you mean. I thought you meant the track map with the animation.

    You may be able to do what you are talking about. You need to take the device string for the position, and extract the link address. Right now it is a hyperlink to take you to the map. You don't want the hyperlink, you just want the place the link would take you. Right now, the device string is something like this:
    PHP Code:
    <a href='http://maps.google.com/?q=12.345678,-123.456789' target='_blank'>Address of the place</a
    Without actually trying it, I think you could do something like this:

    Code:
    Sub Main(ByVal param as Object)
            Dim orig as String = hs.DeviceString("G40") 'The 'position' device
            Dim origs as String() = orig.Split("'"c)
            hs.SetDeviceString("X10",origs(1)) 'The device you want to use
    End Sub
    Save that as a .VB file, and run it whenever you want to update the location for that phone. I'm not a wizard at HSTouch Designer, so I'm not sure what you do with it to display HTML, but someone here will know.

    Steve
    Works put great! Didn't post my location as I owe someone a lot of money but you get the drift. Just associate the text box with the virtual device and I have the script run when one goes to that screen is hstouch.Click image for larger version

Name:	ImageUploadedByTapatalk1359510676.025309.jpg
Views:	1
Size:	87.8 KB
ID:	1167813Click image for larger version

Name:	ImageUploadedByTapatalk1359510689.939389.jpg
Views:	1
Size:	55.7 KB
ID:	1167814

    Leave a comment:


  • stevea
    replied
    Originally posted by jayman13 View Post
    Will try and figure something out. Thanks! I do like your device images but I have noticed since I have been using btraced the images often don't load at all. Perhaps its the frequency of changing data points?
    Well, the maps should be updating. That is probably worth us trying to debug, as I don't use Btraced myself (only Android devices here). If you want to turn on the debug and send me a debug file (snevl at msn dot com) I can take a look. In the meantime, you've got me curious about embedding the direct link to a google map. Let me (and everyone else here) know how it works out.

    Steve

    Leave a comment:


  • jayman13
    replied
    Snevl Latitude Version 2 Discussion

    Will try and figure something out. Thanks! I do like your device images but I have noticed since I have been using btraced the images often don't load at all. Perhaps its the frequency of changing data points?

    Leave a comment:


  • stevea
    replied
    Originally posted by jayman13 View Post
    Thanks. But how about the ability to put html in hstouch. I know your active map from Snevl would be hard to get in there but on the iphone it looks like you can go to "http://maps.google.com/?q=" and then add the string of the device for position or location and it will open up html interface for google maps so you can scroll around, etc... Anyway to do this?
    Oh I get what you mean. I thought you meant the track map with the animation.

    You may be able to do what you are talking about. You need to take the device string for the position, and extract the link address. Right now it is a hyperlink to take you to the map. You don't want the hyperlink, you just want the place the link would take you. Right now, the device string is something like this:
    PHP Code:
    <a href='http://maps.google.com/?q=12.345678,-123.456789' target='_blank'>Address of the place</a
    Without actually trying it, I think you could do something like this:

    Code:
    Sub Main(ByVal param as Object)
            Dim orig as String = hs.DeviceString("G40") 'The 'position' device
            Dim origs as String() = orig.Split("'"c)
            hs.SetDeviceString("X10",origs(1)) 'The device you want to use
    End Sub
    Save that as a .VB file, and run it whenever you want to update the location for that phone. I'm not a wizard at HSTouch Designer, so I'm not sure what you do with it to display HTML, but someone here will know.

    Steve

    Leave a comment:


  • jayman13
    replied
    Thanks. But how about the ability to put html in hstouch. I know your active map from Snevl would be hard to get in there but on the iphone it looks like you can go to "http://maps.google.com/?q=" and then add the string of the device for position or location and it will open up html interface for google maps so you can scroll around, etc... Anyway to do this?

    Leave a comment:


  • stevea
    replied
    Originally posted by jayman13 View Post
    Hey Steve. I am trying to get me and my wife's location on Hstouch using the maps.google website. I see that on the computer I can go under status and click on the device called position or location and it will take me to the maps.google page. Do you know how I can implement this into hstouch? I was hoping to use that instead of the track map.
    Jay,

    I'm afraid the "active" map (the one you get when you click on the "Latitude on Map" link) is not something you can easily put into HSTouch. The static map images (created and placed in devices you define on the "People" tab for each user) were put into Snevl Latitude specifically for HSTouch. Each time one of the people you are tracking has moved, Snevl Latitude will create a new static map (or multiple static maps) and put the image in the device string. Then you can include the device on one of your HSTouch screens.

    For each person in our family I create two maps: One that is a roadmap track of the last 20 locations, and one that is a satellite view of the latest position. I then have a series of location screens where I can see both the track history and the current location for myself, my wife, and both daughters. (The daughters are in college, and are not really happy I do this, but they humor me)

    Steve

    Leave a comment:


  • jayman13
    replied
    Using google maps

    Hey Steve. I am trying to get me and my wife's location on Hstouch using the maps.google website. I see that on the computer I can go under status and click on the device called position or location and it will take me to the maps.google page. Do you know how I can implement this into hstouch? I was hoping to use that instead of the track map.

    Leave a comment:


  • stevea
    replied
    Originally posted by simonog View Post
    Steve: I am getting a file called snevlBTraced debug file created which contains a line about a file being passed to snevllatitude for processing.

    Is an xml file created every time a reading comes in from BTraced, passed to Snevl Latitude, and then deleted?

    simon
    Yes, exactly.

    Leave a comment:


  • simonog
    replied
    Steve: I am getting a file called snevlBTraced debug file created which contains a line about a file being passed to snevllatitude for processing.

    Is an xml file created every time a reading comes in from BTraced, passed to Snevl Latitude, and then deleted?

    simon
    Last edited by simonog; January 15th, 2013, 01:35 PM.

    Leave a comment:


  • stevea
    replied
    Simon,

    One way to see when the phone is sending data is to turn on debug in Snevl Latitude. It will write something to the debug log file (in the logs directory) each time the phone contacts your server. That may not be what you are looking for, but it is an option to help track down the issue.

    Steve

    Leave a comment:


  • simonog
    replied
    Gogs

    One question before I contact the BTraced developers - do you know when your phone is sending data, or just when the readings change? I can't see an easy way to check that in HS which is why I was looking at the Track Map device Time Last Change on the HS status page - an easy field to monitor (which Steve updates on receipt of every set of readings).

    with my phone unmoved for 12 hours, data has been received recently at:
    5:36:49
    6:37:16
    7:09:06
    7:10:39
    7:11:06
    7:11:33
    7:13:06
    7:14:10
    7:48:56
    8:17:48
    8:18:22

    which is enough to show how it varies from around 30 seconds to one gap of an hour! completely correctly, none of them shows a movement.

    Do you know a way independently to monitor what's coming in? if so, I can try that just to double check.

    Simon

    Leave a comment:


  • stevea
    replied
    Simon,

    I looked at the code. It seems that I re-set the device string on the devices even if the position doesn't change. If you are using Latitude, the logic would not actually try and update the devices. However, for Btraced I ended up updating at the end of every download, even if I don't generate a new map. The reasoning is kinda complicated and a little fuzzy to me now, but it was to deal with the fact that data from Btraced might not be in time order.

    So, I think the times you see are tied to when a set of data got downloaded from Btraced to Snevl Latitude.

    Steve

    Leave a comment:


  • simonog
    replied
    Originally posted by stevea View Post
    You're pretty close to right. Actually, each obs has a "First heard" and "Last heard" for a given point in the track history. If a point is determined to be at the same location as the previous report (based on the "Minimum Chage Distance" in the config), the then "Last Heard" is updated and the number of observations is bumped.

    Steve
    Steve
    if there is a track map device, when does its Time Changed field get updated?
    I find my Position device Last Change does not get updated yet the Track Map Last Change is being updated at apparently random intervals (it is set to 30 minutes and 300 metres in btraced so should be getting at most one reading per half hour as the phone is stationary).

    here is a sample of change times:
    21:19:38
    21:20:03
    21:24:08
    21:24:30
    21:25:13
    21:25:34
    21:25:49
    21:26:02
    21:26:38
    21:26:56
    21:27:39
    21:27:56
    21:29:39

    these times seem quite irregular to me. (Times are obtained by a simple script which reports when the Last Change field changes on the Track Map for that particular phone.)
    Simon

    Leave a comment:

Working...
X