• weather irc bot

    From MRO@VERT/BBSESINF to echicken on Friday, August 23, 2019 10:24:09
    so i was playing around with the weather irc bot and i got this error.

    no openweathermap API key found in modopts.ini



    i dont see a section for that in my modopts.ini and i grabbed a tarball from the cvs.

    are there any docs for setting this up?
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From echicken@VERT/ECBBS to MRO on Friday, August 23, 2019 11:53:45
    Re: weather irc bot
    By: MRO to echicken on Fri Aug 23 2019 10:24:09

    so i was playing around with the weather irc bot and i got this error.

    no openweathermap API key found in modopts.ini

    i dont see a section for that in my modopts.ini and i grabbed a tarball from
    the cvs.

    are there any docs for setting this up?

    I haven't documented it anywhere yet, except for some comments in a script.

    You can sign up here:

    https://home.openweathermap.org/users/sign_up

    Then add this to ctrl/modopts.ini:

    [openweathermap]
    api_key = your_api_key

    I think the IRC bot's output is intentionally ugly right now, unless someone has cleaned it up.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From MRO@VERT/BBSESINF to echicken on Friday, August 23, 2019 16:42:00
    Re: weather irc bot
    By: echicken to MRO on Fri Aug 23 2019 11:53 am

    Re: weather irc bot
    By: MRO to echicken on Fri Aug 23 2019 10:24:09

    so i was playing around with the weather irc bot and i got this error.

    no openweathermap API key found in modopts.ini

    i dont see a section for that in my modopts.ini and i grabbed a tarball from
    the cvs.

    are there any docs for setting this up?

    I haven't documented it anywhere yet, except for some comments in a script.

    You can sign up here:

    https://home.openweathermap.org/users/sign_up

    Then add this to ctrl/modopts.ini:

    [openweathermap]
    api_key = your_api_key


    i signed up for them last week for another script and got my api key.

    i did what you said and the bot runs but doesnt provide any weather.
    it answers to the help command. no error msgs
    is it working for you right now?
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From echicken@VERT/ECBBS to MRO on Friday, August 23, 2019 23:11:50
    Re: weather irc bot
    By: MRO to echicken on Fri Aug 23 2019 16:42:00

    [openweathermap]

    is it working for you right now?

    Yep, it just worked for me. Sometimes it's a bit slow.

    It's possible that the geoip lookup is failing silently or something - I can't remember what it does and doesn't log. Will see if I can take a look at it later.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From MRO@VERT/BBSESINF to echicken on Saturday, August 24, 2019 20:33:52
    Re: weather irc bot
    By: echicken to MRO on Fri Aug 23 2019 11:11 pm

    Re: weather irc bot
    By: MRO to echicken on Fri Aug 23 2019 16:42:00

    [openweathermap]

    is it working for you right now?

    Yep, it just worked for me. Sometimes it's a bit slow.

    It's possible that the geoip lookup is failing silently or something - I can remember what it does and doesn't log. Will see if I can take a look at it later.

    it wasnt working or giving errors. btw, i think if there are too many lookups they suspend your account and tell you go get a subscription so you might want to go with another api.

    i think i'm using apixu now.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From echicken@VERT/ECBBS to MRO on Sunday, August 25, 2019 00:23:30
    Re: weather irc bot
    By: MRO to echicken on Sat Aug 24 2019 20:33:52

    it wasnt working or giving errors. btw, i think if there are too many lookups
    they suspend your account and tell you go get a subscription so you might want
    to go with another api.

    OpenWeatherMap's only stated limit for the free tier is 60 requests per minute. The library takes that into account, throttles requests, and maintains a cache. I haven't heard of them suspending accounts, but maybe they temporarily disable them. I'll switch APIs if necessary, but they all have some kind of limit (apixu's is 10,000 requests/month).

    You could try updating exec/load/geoip.js. I made a change last night to make it easier for people to use their own API key for the geoip service. http://ipinfodb.com/register.php, and the key would go in modopts.ini -> [geoip] -> api_key.

    When the geoip library encounters an error it fails silently, so if it's not working you might not see any messages. Everyone uses the same ipinfodb account by default, so it's possible that it's being throttled.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From MRO@VERT/BBSESINF to echicken on Sunday, August 25, 2019 13:28:59
    Re: weather irc bot
    By: echicken to MRO on Sun Aug 25 2019 12:23 am

    OpenWeatherMap's only stated limit for the free tier is 60 requests per minu The library takes that into account, throttles requests, and maintains a cac I haven't heard of them suspending accounts, but maybe they temporarily disa them. I'll switch APIs if necessary, but they all have some kind of limit (apixu's is 10,000 requests/month).


    oh, i thought it was less than that.

    You could try updating exec/load/geoip.js. I made a change last night to ma it easier for people to use their own API key for the geoip service. http://ipinfodb.com/register.php, and the key would go in modopts.ini -> [geoip] -> api_key.

    When the geoip library encounters an error it fails silently, so if it's not working you might not see any messages. Everyone uses the same ipinfodb

    okay i'll give it another try in a bit.
    soon i'll be working 80hrs a week and wont have time for anything.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From MRO@VERT/BBSESINF to echicken on Sunday, August 25, 2019 14:51:46
    Re: weather irc bot
    By: MRO to echicken on Sun Aug 25 2019 01:28 pm

    Re: weather irc bot
    By: echicken to MRO on Sun Aug 25 2019 12:23 am

    OpenWeatherMap's only stated limit for the free tier is 60 requests per m The library takes that into account, throttles requests, and maintains a I haven't heard of them suspending accounts, but maybe they temporarily d



    okay, i grabbed everything off the cvs and added the line to
    modopts.ini
    [openweathermap]
    api_key = XXXXX (my api key)


    i edited the ircbots.ini file also.

    so i run the bot via jsexec, it joins the network and channel.

    i still get nothing when i issue a !weather command.

    do you want me to send you some files? not sure if i'm missing something here. ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From echicken@VERT/ECBBS to MRO on Sunday, August 25, 2019 16:50:47
    Re: weather irc bot
    By: MRO to echicken on Sun Aug 25 2019 14:51:46

    okay, i grabbed everything off the cvs and added the line to
    modopts.ini
    [openweathermap]
    api_key = XXXXX (my api key)

    There are two APIs being used - OpenWeatherMap, and IPInfoDB. If you register here:

    https://ipinfodb.com/register.php

    You can put your key into modopts.ini like so:

    [geoip]
    api_key = your_key

    This is separate from / in addition to the OpenWeatherMap API key.

    You don't strictly need a key for IPInfoDB - a default one is hard coded - but getting your own might help. I can't be sure, but the weather bot works for me and I'm using my own API key for that service.

    do you want me to send you some files? not sure if i'm missing something here.

    If you're up to date with CVS then we've got the same files. If you're updating scripts in exec/ and exec/load/ piecemeal, that would make it harder to say what's what.

    The only other thing I can think of would be to delete any "openweathermap_*" files in your sbbs/temp/ directory. Cached data lives there. I don't think that'll solve anything, but it's worth a shot as a troubleshooting step.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From MRO@VERT/BBSESINF to echicken on Sunday, August 25, 2019 16:43:26
    Re: weather irc bot
    By: echicken to MRO on Sun Aug 25 2019 04:50 pm

    okay, i grabbed everything off the cvs and added the line to modopts.ini
    [openweathermap]
    api_key = XXXXX (my api key)

    There are two APIs being used - OpenWeatherMap, and IPInfoDB. If you regist here:


    yeah i went back to your previous reply and got the ipinfodb api key.

    i sent you a msg through qwk with a link to my files.
    i grabbed a tarball from the cvs and then i grabbed the sbbsexec, sbbs_run, sbbs_dev files and tried it on a windows sbbs and still had nothing.

    it would connect to irc fine but no results. i also enabled the module in the.ini file.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::