Differences between revisions 18 and 19
Revision 18 as of 2016-10-25 18:02:30
Size: 3868
Editor: wilho
Comment:
Revision 19 as of 2016-10-25 18:17:05
Size: 3868
Editor: turmio
Comment:
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
 ** send back log from jt65emeA (maybe 15 last lines)
 ** send messages from jt65emeA as they appear on chat
 ** if user has not used bot previously it will ask user detail by using forcerepply function
 ** when user has suplied all detail, on next message bot will try to register user to jt65emeA chat (post userdata and get cookie)
 ** AND
 ** Send supplied message directly to jt65emeA chat
  * send back log from jt65emeA (maybe 15 last lines)
  * send messages from jt65emeA as they appear on chat
  * if user has not used bot previously it will ask user detail by using forcerepply function
  * when user has suplied all detail, on next message bot will try to register user to jt65emeA chat (post userdata and get cookie)
  * AND
  * Send supplied message directly to jt65emeA chat
hacker

wilho OH8ETB

description
Telegram bot which bridges messages from and to jt65emeA chat and shows spots from LiveCQ
started

2016-10-21

Telegram EME Bot

Summary:

Telegram bot which bridges messages from and to jt65emeA chat and shows spots from LiveCQ

Goals:

  • 2M EME Hams most used communication channel is jt65emeA web based chat (http://www.chris.org/cgi-bin/jt65emeA), which is basicly static http chat (from early 2000), so usability is not greatest possible. Usability is even worst if you want to use mobile devices.

  • Telegram is great messaging tool for desktop and for mobile devices, and it has great "bot" support. (https://telegram.org/)

  • Goal is to make telegram bot which will allow both way communication with jt65emeA chat.
  • Also i have plans to include other tools as well. Like spots from LiveCQ (http://www.livecq.eu/) and maybe things like moonrise/moonset based on user location.

  • Even i doubt that there will newer be that many users, planing and making all parts for multiuser

Plan / Tools:

  • python
  • telepot library for actual bot handling
  • pyculr for making http get/posts
  • ?BeautifulSoup lib for parsing data from http

  • every time some one send private message to bot, bot will create separate thread which will:
    • send back log from jt65emeA (maybe 15 last lines)
    • send messages from jt65emeA as they appear on chat
    • if user has not used bot previously it will ask user detail by using forcerepply function
    • when user has suplied all detail, on next message bot will try to register user to jt65emeA chat (post userdata and get cookie)
    • AND
    • Send supplied message directly to jt65emeA chat
  • Bot will fetch current spots from LiveCQ and send summary via private message when ever spot count will change (so you will get new summary any time there is some change)

Status:

  • basic functinalities are working, but lots of testing and error handling is missing.
  • Get user detail asking by bot (needed for jt65emeA site registeration) -- OK
  • Get messages from jt65emeA -- OK
  • Register to jt65emeA (get cookie via http post) -- OK
  • Send messages to jt65emeA -- OK
  • Store userdetails to file and get userdetails from file automaticly (using saved cookie) -- OK
  • Hilight messages and notify based call sign / name -- OK
  • Get LiveCQ spots and show spots shen spot count changes -- OK (this has been disabled, waiting for permissiong from LiveCQ)
  • implement "commands" like /change /listusers etc -- OK
  • make higlighing not-case-sensitive -- OK
  • time out for session, after this bot will remind how to open again -- OK
  • way to interact with other bot users (/to_other_users) -- OK

Todo:

  • lots of tweeking based on realibility / multiuser things
  • way of handle "disconnected" users (in a way timeout handles these by time), but if user left "chat" there will be lots of errors
  • disable echoing your send message (at this stage it is good for confirming that message has send correctly)

Basic user manual

  • Send message to wsjt_bot in telegram
  • Follow bots instructions
  • Bot is in test usage, so if you are using it now please remind that everything will not be ready and stable and please send me info about bugs you find - thank you!

There is Telegram group "EME Bot Users" where you could left feedback or otherwise discuss with other users.

Here link to join in group https://telegram.me/joinchat/BXVoxgnb5MuPSODgr8UWBw

Source code

* I have used bitbucket as a git repo. https://bitbucket.org/wilhoj/telegramemebot/

emebot1.png emebot2.png

Attachments

  • [get | view | diff] (2016-10-21 15:30:24, 84.5 KB) [[attachment:emebot1.png]]
  • [get | view | diff] (2016-10-21 15:30:33, 346.5 KB) [[attachment:emebot2.png]]
 All files | Selected Files: delete move to page
Normal Sort Sort + uniq Sort + uniq + count

CategoryProjekti