• small syncWXremix update

    From KenDB3@1:103/705 to All on Fri Mar 23 04:48:11 2018
    Hello folks,

    So I made some changes to syncWXremix on the Github project page: https://github.com/KenDB3/syncWXremix

    Wunderground has had odd problems lately, very specifically with GeoIP lookups. However, it appears that while GeoIP lookups are sometimes returning "querynotfound", if you do a lookup by ZIP, Airport Code, City/State, or Latitude/Longitude, it gives you good results. So, due to a lengthy period of time where I have been seeing intermittent results for IP lookups with api.wunderground.com, I attempted to add a backup GeoIP lookup.

    If the script encounters "querynotfound", it will attempt to use: http://geoip.nekudo.com/api/[ip-address] as a lookup for Geolocating the IP. As this site does not require someone to get an API Key and it is free to use, it looks like it is a good addition.

    The usable results from nekudo are the Latitude and Longitude coordinates (it also gives City, but not State). Lat/Lon has a good success rate with Wunderground even when the API is having a hard time with GeoIP lookups. Hopefully I didn't break anything while trying to add this backup functionality. And of course, now that I added this functionality, I am seeing much less flakiness from the Wunderground API with GeoIP lookups (isn't that always the way?).

    Lastly, the script shouldn't tell the user if it fails at all now. Earlier I had changed it to fail silently when Wunderground would fail to respond with JSON output thanks to a suggestion from echicken, but now it will fail silently if it gets an error in JSON format. Either way it should log something for the Sysop to see it had failed but hide it from the user.

    I don't have any ZIP download on my site yet, so download the updated files from Github (link above).

    If anyone sees problems with the recent changes, feel free to let me know.

    ~KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Fri Mar 23 20:10:43 2018
    Re: small syncWXremix update
    By: KenDB3 to All on Fri Mar 23 2018 04:48:11

    Wunderground has had odd problems lately, very specifically with GeoIP lookups. However, it appears that while GeoIP lookups are sometimes returning "querynotfound", if you do a lookup by ZIP, Airport Code, City/State, or Latitude/Longitude, it gives you good results. So, due to a

    and all this time I thought it was just me.. lol :)

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Daryl Stout@1:103/705 to KENDB3 on Fri Mar 23 21:23:00 2018
    Hello folks,

    So I made some changes to syncWXremix on the Github project page: K>https://github.com/KenDB3/syncWXremix

    Ken,

    I had disabled SyncWx, as I was getting "query not found" with every
    logon of every caller.

    I don't have any ZIP download on my site yet, so download the updated files K>from Github (link above).

    I'll make a note of that, and get it sometime this weekend.

    Daryl

    ---
    * OLX 1.53 * According to the Weather Channel, Hell just froze over.
    * Synchronet * DoveNet: The Thunderbolt BBS - wx1der.dyndns.org
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to KK4QBN on Sat Mar 24 01:26:51 2018
    Re: small syncWXremix update
    By: KenDB3 to All on Fri Mar 23 2018 04:48:11

    Wunderground has had odd problems lately, very specifically with GeoIP lookups. However, it appears that while GeoIP lookups are sometimes returning "querynotfound", if you do a lookup by ZIP, Airport Code, City/State, or Latitude/Longitude, it gives you good results. So, due to a

    and all this time I thought it was just me.. lol :)

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    I had been seeing it for a few months, and sometimes it was bad, sometimes it was rare. But, it had gotten really annoying and I had been mulling over a solution for a little while. I just needed to dedicate some time to working it out.

    Hopefully the fix is a good one and doesn't cause more problems than it fixes.

    ~KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to Daryl Stout on Sat Mar 24 01:29:43 2018
    Hello folks,

    So I made some changes to syncWXremix on the Github project page: K>https://github.com/KenDB3/syncWXremix

    Ken,

    I had disabled SyncWx, as I was getting "query not found" with every
    logon of every caller.

    I don't have any ZIP download on my site yet, so download the updated files K>from Github (link above).

    I'll make a note of that, and get it sometime this weekend.

    Daryl

    It was bad there for a few weeks where it was happening all the time. It has gotten better, but I knew if it got bad again I would be super annoyed. Again, I hope the fix works out well.

    ~KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Sat Mar 24 07:51:19 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Sat Mar 24 2018 01:26:51

    I had been seeing it for a few months, and sometimes it was bad, sometimes it was rare. But, it had gotten really annoying and I had been mulling over a solution for a little while. I just needed to dedicate some time to working it out.

    Yes \, Same here. I just thought it was something I had done to screw it up or the reason it did'nt work for *me* was that I was behind my router until I called the BBS from my sisters computer and it worked. and then did'nt work next time.


    Hopefully the fix is a good one and doesn't cause more problems than it fixes.

    Thanks so much, I will be getting that updated soon.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Sat Mar 24 08:42:02 2018
    Re: small syncWXremix update
    By: KenDB3 to All on Fri Mar 23 2018 04:48:11

    If anyone sees problems with the recent changes, feel free to let me know.

    Just updated directly from your github and getting this error:

    3/24 08:36:01 term Node 1 !JavaScript /sbbs/xtrn/syncwx/wxlanguage.js line 9: TypeError: opts is null
    3/24 08:36:01 term Node 1 TypeError: options is null

    I downloaded the whole source tarball/zip whatever and extracted it did'nt appear that wxlanguage.js has been touched in 2 years.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mojo@1:103/705 to KenDB3 on Sat Mar 24 14:25:15 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to Daryl Stout on Sat Mar 24 2018 01:29 am

    It was bad there for a few weeks where it was happening all the time. It has gotten better, but I knew if it got bad again I would be super annoyed. Again, I hope the fix works out well.


    Well I got the update you posted on github and it did not work for my system ti made everything quit working. So I had to put it back to the way it was before the update to get it to return to working.


    Mojo

    ---
    * Synchronet * Mojo's World BBS - mojo.synchro.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to KK4QBN on Sat Mar 24 20:33:27 2018
    Re: small syncWXremix update
    By: KenDB3 to All on Fri Mar 23 2018 04:48:11

    If anyone sees problems with the recent changes, feel free to let me know.

    Just updated directly from your github and getting this error:

    3/24 08:36:01 term Node 1 !JavaScript /sbbs/xtrn/syncwx/wxlanguage.js line 9: TypeError: opts is null
    3/24 08:36:01 term Node 1 TypeError: options is null

    I downloaded the whole source tarball/zip whatever and extracted it did'nt appear that wxlanguage.js has been touched in 2 years.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    OK, interesting. On Github (and not anywhere else, really) I had half implemented alternate language support. It still needs work, but it shouldn't be kicking back that error.

    From the sound of it, you have wxlanguage.js in the same folder as weather.js, so that should be fine.

    In your modopts.ini file, do you have a line for 'language' that looks like this?
    [SyncWX]
    wungrndAPIkey = (some long string yada yada)
    weathericon_ext = .asc
    fallback_type = bbsip
    fallback = 02865
    language = en

    That might be what's missing. However, it really should have defaulted to English for the language even if it is missing or blank (I tested both scenarios). But, add it and let me know if that fixes it.

    Otherwise, I may be changing lines 9 thru 13 on that wxlanguage.js file from this:

    if (typeof opts.language === 'undefined') {
    .var language = 'en'; //Default to English if this field is left blank
    or does
    not exist in modopts.ini
    } else {
    .var language = opts.language //otherwise, load the chosen language
    }

    to this:

    if (typeof opts.language === 'undefined') {
    .var language = 'en'; //Default to English if this field is left blank
    in
    modopts.ini
    } else if (opts.language == null) {
    .var language = 'en'; //Default to English if this field does not exist
    in
    modopts.ini
    } else {
    .var language = opts.language //otherwise, load the chosen language
    }

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Sun Mar 25 09:59:03 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Sat Mar 24 2018 20:33:27

    In your modopts.ini file, do you have a line for 'language' that looks like this?
    [SyncWX]
    wungrndAPIkey = (some long string yada yada)
    weathericon_ext = .asc
    fallback_type = bbsip
    fallback = 02865
    language = en

    That might be what's missing. However, it really should have defaulted to English for the language even if it is missing or blank (I tested both scenarios). But, add it and let me know if that fixes it.

    I'm sorry man, I really should have checked that, some update or somethin has ripped all the SyncWX stuff out of my modops.ini, I don't know if I overwrote it accidently in an update or what happened but its not there anymore..

    I've updated my CVS tree in a completely different directory to stop this from happening and somehow manage anyway. let me fix that and get back to you.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Sun Mar 25 10:11:32 2018
    Re: Re: small syncWXremix update
    By: KK4QBN to KenDB3 on Sun Mar 25 2018 09:59:03

    In your modopts.ini file, do you have a line for 'language' that
    looks like this?
    [SyncWX]
    wungrndAPIkey = (some long string yada yada)
    weathericon_ext = .asc
    fallback_type = bbsip
    fallback = 02865
    language = en


    Ok, I've got the correct info back in there and came up with this mess:

    /25 10:07:03 term Node 1 KK4QBN running external program: SyncWXRemix (Weather) 3/25 10:07:03 term Node 1 192.168.254.2 3/25 10:07:04 term Node 1 sending telnet cmd: DO Terminal Location Number 3/25 10:07:05 term Node 1 Invalid reply to TTYLOC command. 3/25 10:07:05 term Node 1 ERROR in weather.js: api.wunderground.com returned a 'querynotfound' error with this description: 'No cities match your search query'.
    3/25 10:07:05 term Node 1 DEBUG for weather.js. API call looked like this at time of error: http://api.wunderground.com/api/**********/conditions/forecast/astronomy/ alerts/lang:EN/q/autoip.json?geo_ip=192.168.254.3
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The user.connection object looked like this at the time of error: Telnet
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The dialup variable looked like this at the time of error: false
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The language defined in /ctrl/modopts.ini is: undefined

    I presume it's because it's passing my local ip off, so anything outside my router should work..

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to KK4QBN on Tue Mar 27 09:57:32 2018
    Re: Re: small syncWXremix update
    By: KK4QBN to KenDB3 on Sun Mar 25 2018 09:59:03

    In your modopts.ini file, do you have a line for 'language' that
    looks like this?
    [SyncWX]
    wungrndAPIkey = (some long string yada yada)
    weathericon_ext = .asc
    fallback_type = bbsip
    fallback = 02865
    language = en


    Ok, I've got the correct info back in there and came up with this mess:

    /25 10:07:03 term Node 1 KK4QBN running external program: SyncWXRemix (Weather) 3/25 10:07:03 term Node 1 192.168.254.2
    3/25 10:07:04 term Node 1 sending telnet cmd: DO Terminal Location Number 3/25 10:07:05 term Node 1 Invalid reply to TTYLOC command.
    3/25 10:07:05 term Node 1 ERROR in weather.js: api.wunderground.com returned a 'querynotfound' error with this description: 'No cities match your search query'.
    3/25 10:07:05 term Node 1 DEBUG for weather.js. API call looked like this at time of error: http://api.wunderground.com/api/**********/conditions/forecast/astronomy/ alerts/lang:EN/q/autoip.json?geo_ip=192.168.254.3
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The user.connection object looked like this at the time of error: Telnet
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The dialup variable looked like this at the time of error: false
    3/25 10:07:05 term Node 1 DEBUG for weather.js. The language defined in /ctrl/modopts.ini is: undefined

    I presume it's because it's passing my local ip off, so anything outside my router should work..

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    Tim,

    There should be some logic that catches private IP addresses and instead decides to run the query will a fallback of some sort. echicken helped me write it and I have more faith in him that I do in my own coding skills, lol.

    Could you do a copy/paste of your [SyncWX] section from modopts.ini? Of course remove/mask out the Wunderground Key :-D

    Also, to test externally from your network, you might want to try one of the ftelnet proxies http://my.ftelnet.ca/. I do that quite a bit when testing syncWXremix. Just make sure to use one of Ree's built-in Proxies (ie. New Jersey, Atlanta, etc..., which can be found here: http://my.ftelnet.ca/settings/).

    ~KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Tue Mar 27 14:23:01 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Tue Mar 27 2018 09:57:32

    Tim,

    There should be some logic that catches private IP addresses and instead decides to run the query will a fallback of some sort. echicken helped me write it and I have more faith in him that I do in my own coding skills, lol.

    Could you do a copy/paste of your [SyncWX] section from modopts.ini? Of course remove/mask out the Wunderground Key :-D

    [syncWX]
    wungrndAPIkey = WouldNtULikeToKnow
    weathericon_ext = .asc
    fallback_type = noip
    fallback = 30705

    Also, to test externally from your network, you might want to try one of the ftelnet proxies http://my.ftelnet.ca/. I do that quite a bit when testing syncWXremix. Just make sure to use one of Ree's built-in Proxies (ie. New Jersey, Atlanta, etc..., which can be found here: http://my.ftelnet.ca/settings/).

    It works from outside the router.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to KK4QBN on Tue Mar 27 19:59:38 2018
    Re: Re: small syncWXremix update
    By: KK4QBN to KenDB3 on Tue Mar 27 2018 02:23 pm

    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Tue Mar 27 2018 09:57:32

    Tim,

    There should be some logic that catches private IP addresses and
    instead decides to run the query will a fallback of some sort.
    echicken helped me write it and I have more faith in him that I do
    in my own coding skills, lol.

    Could you do a copy/paste of your [SyncWX] section from modopts.ini?
    Of course remove/mask out the Wunderground Key :-D

    [syncWX]
    wungrndAPIkey = WouldNtULikeToKnow
    weathericon_ext = .asc
    fallback_type = noip
    fallback = 30705

    OK, I think I see it. Change the fallback_type line to this:

    fallback_type = nonip

    Then give it a try from within your network.

    Also, to test externally from your network, you might want to try
    one of the ftelnet proxies http://my.ftelnet.ca/. I do that quite a
    bit when testing syncWXremix. Just make sure to use one of Ree's
    built-in Proxies (ie. New Jersey, Atlanta, etc..., which can be
    found here: http://my.ftelnet.ca/settings/).

    It works from outside the router.

    Cool, so the rest is working as intended.

    Let me know how it goes. :-)

    ~KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to KenDB3 on Wed Mar 28 08:33:04 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Tue Mar 27 2018 19:59:38

    OK, I think I see it. Change the fallback_type line to this:

    fallback_type = nonip

    Ooop, see what I did there.. Ok thanks much.

    Cool, so the rest is working as intended.

    Let me know how it goes. :-)

    and that did do the trick, thanks again!

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KenDB3@1:103/705 to KK4QBN on Wed Mar 28 14:39:25 2018
    Re: Re: small syncWXremix update
    By: KenDB3 to KK4QBN on Tue Mar 27 2018 19:59:38

    OK, I think I see it. Change the fallback_type line to this: fallback_type = nonip

    Ooop, see what I did there.. Ok thanks much.

    Cool, so the rest is working as intended.
    Let me know how it goes. :-)

    and that did do the trick, thanks again!

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    Awesome, Tim, glad we got it solved! No problem man :-)

    -KenDB3

    ---
    * Synchronet * KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)