Matth wrote:Attached is a skin file with the complete code and also a few images. The "dev" is a version I am working on and might have some different code, but the HKGSat.ini should work. There are two times (10:50/22:50 HKG time 02:40/12:40 UTC) when there seems to be no image.
Neither this code doesn't work for me. I simply can't get it to work. I tried to use the values returned by the [MeasureNTHKG] and the [MeasureNTUTC] measures, to manually check the URL used by the [RadarMeasure] measure, but if I copy those values and put them manually into the Url variable (set by the IfTrueAction option of the [MeasureNTUTC] measure), then trying to open the location into my browser, I don't get anything, just an error message. Maybe the URL is inaccessible outside of HK? Not sure, but this is my impression. If I'm right, I can't help.
However, I saw one more thing: you should replace the names of the [MeasureNTHKG] and [MeasureNTUTC] measures, into the !SetVariable bang of the IfTrueAction option of the [MeasureNTUTC] measure: [!SetVariable rURL "http://www.weather.gov.hk/wxinfo/intersat/satellite/image/e_infrared/[[color=#FF0000]&[/color]MeasureNTHKG]+[[color=#FF0000]&[/color]MeasureNTUTC]H08.nb_x8M--L1B.H08_IR1_coast.png"] (read the last paragraph here).
So, not being sure why don't work, I have no idea what else to say.
Hmm, that's a shame. I would suspect, that it does not work as you are in a different time zone, although with the TimeZone=+8 option I would assume it should return the same time, no?
Just to make sure that you can get the image, here is a current image as of 21:40 HKG time (It is here 22:27 now). So rounded down to the previous 10 minutes that's 22:20, less the 40 minutes results in the latest image being available (21:40 on the 2017-05-28). That's the first part of the string that I insert into the URL. The second part seems to be the equivalent UTC time less 10 minutes. So it's an 8:10 hour difference resulting in the second string being 28th (date) at 13:30.
Maybe you can check with this if you get different values in the strings and that's why it doesn't work? If the two values don't correspond, I also get an error message an no image here.
I changed the measures into [&MeasureNTHKG] and [&MeasureNTUTC] though I'm not sure what that changes.
BTW, is it possible to have in the same Measure an IfMatch and an IfCondition at the same time?
To stop the animation for a few seconds at the current image, I had to introduce a second and identical Measure [MeaCIXX] for the File, so that I can set an IfMatch and the !SetVariable if it's true. Is there a way to avoid having an additional measure and do the IfMatch at the same time in the Measure [MeaCXX]?
[MeaC1]
Measure=Plugin
Plugin=FileView
Path=[MeaFolder]
Type=FileName
DynamicVariables=1
Index=1
Group=Images
Disabled=1
;Checks if the filename is empty, then set the variable to 0, otherwise to 1 (should the file/measure be shown or not)
IfMatch=^$
IfMatchAction=[!SetVariable MeaC1 "0"]
IfNotMatchAction=[!SetVariable MeaC1 "1"]
;This one checks if this image is the current image or not. If it is, it sets the variable so that the animation stops for a few seconds (Change TCounter=30 for longer or shorter stops)
[MeaCI1]
Measure=Plugin
Plugin=FileView
Path=[MeaFolder]
Type=FileName
DynamicVariables=1
Index=1
Group=Images
Disabled=1
;IfMatchMode=1
IfMatch=[MeasureBaseTime]
IfMatchAction=[!SetVariable CurImage "1"]
Still the same problem: the value of the rURL variable should be an URL of a downloadable image, but it isn't: the URL I get for example right now is http://www.weather.gov.hk/wxinfo/intersat/satellite/image/e_infrared/201705290240+281830H08.nb_x8M--L1B.H08_IR1_coast.png, but this doesn't get an image, just an error message.
balala wrote:Still the same problem: the value of the rURL variable should be an URL of a downloadable image, but it isn't: the URL I get for example right now is http://www.weather.gov.hk/wxinfo/intersat/satellite/image/e_infrared/201705290240+281830H08.nb_x8M--L1B.H08_IR1_coast.png, but this doesn't get an image, just an error message.
You posted this at 2:29 AM from what I can see here. The link is for a time at 02:40. That is 20 minutes ahead of time, when at that moment you should rather have the image of 01:40. Your generated link is one hour too early for some reason
Is it possible that your daylight savings time somehow messes with it? In HKG we do not have DST.
Last edited by Matth on May 29th, 2017, 12:59 am, edited 1 time in total.