If this is your first visit, be sure to check out the FAQ. You must register before you can post. Your first post will be checked for appropriate content
(SPAM) - please allow a bit of time for that. After that, you'll be able to post at will!
OK.
The first thing that I notice when I check this site:
[url]http://tbone.biol.sc.edu/tide/tideshow.cgi?site=Cotuit+Bay+entrance+%28Bluff+Point%29%2C+M assachusetts+Current&type=mobile
is that there's a space in "M assachusetts"
Try removing the space
The second thing I see is that your location does not describe tides, but instead Currents (which I find odd, as that location ought to be tidal). The script won't handle this at the moment. I'll look at doing something about it, but the data might look a bit different.
I'll need to trap that type of error as well.
This might also occur if you attempt to use the script for the first time before there has been at least one low or high tide during the day. This is because the script needs to look at the previous tide AND the next tide in order to calculate the current level.
I did include a caution to this effect in the documentation.
I will add a trap to log this as a warning with an explanation.
Last edited by Wadenut; February 2, 2013, 11:43 AM.
I saw that space too in Massachusetts, so I did go back and check the file and advanced through space by space. There isn't a space in my .ini file, even though it showed up that way in cut and paste, for some reason.
I did see your message about having to wait for a tide. But by 1pm I should have already seen a high and low tide today.
Please let me know what I might be able to test. I'm really excited to get this working. Thanks.
Jono
I'm dealing with the "Currents" issue right now. I just need to make sure my current formula will work there. I see no reason the flow rate shouldn't be sinusoidal as well.
That second site should work regardless.
The reason you still have no data is that the script thinks you've already downloaded the data today. It will only download once per day.
In the INI, blank out the date under [DATA], key LDL=, or just change it to yesterdays date.
I'll check this second location once I've determined the first issue is solved.
I changed the date to yesterday. Now getting a different error:
2/2/2013 1:29:51 PM - Error - Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style) at System.DateTime.ParseExact(String s, String format, IFormatProvider provider) at scriptcode5.scriptcode5.Daily(Object Parm) at scriptcode5.scriptcode5.Main(Object Parm) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)
So then I just eliminated the date and I go back to the original error:
String was not recognized as a valid DateTime.
so, aside from knowing that water will be in or out, what else can I use this for?
Just trying to see if this is something I want to get setup.
--Dan
Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
so, aside from knowing that water will be in or out, what else can I use this for?
Just trying to see if this is something I want to get setup.
--Dan
So you're not a fisherman then Dan.
I plan to use it to plan my fishing trips and perhaps have HS remind me when the tide will be high. The sea bass come up river on the tides during the summer. I plan to land a 20 pounder this year.
Other than that, it's just a neat thing to add to the HST Almanac screen.
@ Jon. I think your problem with the date conversion may likely have something to do with dot NET. I may have it solved. I've used both of your sites here successfully.
The flow type data will work now.
I've also added a fix for the initial "early in the day" installation restriction. I found some of these sites update the data throughout the day, dropping the most recent data, which is necessary for the 'current level' calculation. The script will just wait now until it has sufficient data to continue. After the initial data downloads, there shouldn't be a problem with that.
I'll run overnight then perhaps post an update in the morning.
Comment